Aurix 275 C-STEP Move code from RAM to FLASH

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

cross mob
lock attach
Attachments are accessible only for community members.
Not applicable
Hello,

I am currently using Infineon Triboard with Aurix 275 C-STEP.

All the code is presently running from RAM. I want to move this to ROM.

Please suggest the required changes in .lsl file(attached)

Compiler: Tasking 4.3r3

Thank you...!!!

Regards,
Dilip
0 Likes
5 Replies
Not applicable
Hello Dilip.Reddy.Mavuram,

unfortunately I cannot find any user-defined code sections in the .lsl file you attached. Are you sure you attached the right file?
0 Likes
Not applicable
Hello,

yeah...this is what i am using.

Can u please tell me what exactly is missing?

Is it .text.* section or something else.

Thankyou...!!!

Regards,
Dilip
0 Likes
Not applicable
According to your .lsl your code already executes from ROM. You have to add sections to execute them from RAM instead if that's your intention.

E.g.

group(run_addr= mem:mpe:dspr0, copy)
{
select ".text.project.function_executed_from_dspr0";
}


will execute the selected functions from DSPR0 ram.
0 Likes
User13020
Level 1
Level 1
But in this way i guess the function will be stored in the DSPR0 only during first flash operation. Once the system is reset the function will no longer be available in DSPR0. So how do we ensure it is copied to DSPR0 during every start up ?
0 Likes
User13836
Level 6
Level 6
50 likes received 50 solutions authored 100 sign-ins
The _c_init function which is called by the C startup code takes care of initializing the functions. Because the 'copy' keyword is used in the group definition for the group to which the code sections which need to be initialized are assigned:

group(run_addr= mem:mpe:dspr0, copy)
{
select ".text.project.function_executed_from_dspr0";
}

the linker is instructed to add the required copy information (start address in flash, target address in RAM and number of bytes to copy) to the copy table and this copy table is processed by the _c_init function. As a result the function is initialized before the 'main' function is called by the startup code.

Best regards,
Ulrich

TASKING tools support
0 Likes