Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Winnie
Level 1
Level 1
First reply posted First question asked Welcome!

i need to place a section in flash0 0x81000000, and allocate specific user function into it.

i just add following code into .lsl file:

section_layout :vtc:linear
{
group (ordered, run_addr = mem:pfls0[0x01000000])
{
reserved "MY_RESERVE" (size = 16k);
}

group SPECIAL_FUNCTIONS ( ordered, contiguous, run_addr = mem:pfls0[0x01000000])
{
select ".text.canids.hello";
}
}

but, the compiler reports errors as : "syntax error: absolute location in memory for group does not map to space mpe:vtc:linear"

how should i do? or is there another method to asign flash section?

0 Likes
1 Solution
User13836
Level 6
Level 6
50 likes received 50 solutions authored 100 sign-ins

I suppose there is a typo in the address offset value. Instead of using offset 16 MB within segment 0x8 where no physical on chip memory does exist you probably want to use offset 0x100000 (1MB) instead where pflash0 memory does exist.

In addition if you want to place a section within a reserved range, you need to permit this use case by adding alloc_allowed=absolute to the reserved entry. 

Plesae try:

section_layout :vtc:linear
{
group (ordered, run_addr = mem:pfls0[0x00100000])
{
reserved "MY_RESERVE" ( alloc_allowed=absolute, size = 16k);
}

group SPECIAL_FUNCTIONS ( ordered, contiguous, run_addr = mem:pfls0[0x00100000])
{
select ".text.canids.hello";
}
}

Best regards,

Ulrich Kloidt
TASKING tools support

 

View solution in original post

0 Likes
5 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

Why you will place anything in this region? Finally this region is not readable and writeable. Any access will result in a bus error.

0 Likes
Winnie
Level 1
Level 1
First reply posted First question asked Welcome!

Thank you for your reply!

I need to update TC397 specific pflash section through the CAN bus to achieve some code update.

I refer to the following guidance to modify the lsl file:

Winnie_0-1681298539469.pngWinnie_1-1681298631785.png

OR is there a flash area reserved for users in TC397?

 

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

dw_0-1682573086186.png

or you can decrease the 0x100 0000 to retry.

 

Can you try this code?

0 Likes
Di_W
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received

@User13836 Could you please have a look? Thanks!

0 Likes
User13836
Level 6
Level 6
50 likes received 50 solutions authored 100 sign-ins

I suppose there is a typo in the address offset value. Instead of using offset 16 MB within segment 0x8 where no physical on chip memory does exist you probably want to use offset 0x100000 (1MB) instead where pflash0 memory does exist.

In addition if you want to place a section within a reserved range, you need to permit this use case by adding alloc_allowed=absolute to the reserved entry. 

Plesae try:

section_layout :vtc:linear
{
group (ordered, run_addr = mem:pfls0[0x00100000])
{
reserved "MY_RESERVE" ( alloc_allowed=absolute, size = 16k);
}

group SPECIAL_FUNCTIONS ( ordered, contiguous, run_addr = mem:pfls0[0x00100000])
{
select ".text.canids.hello";
}
}

Best regards,

Ulrich Kloidt
TASKING tools support

 

0 Likes