Dear Champs,
I am asking this for our customer.
The user wants to move many functions from flash to RAM, and each function has a specified location.
We are aware that we can use
#pragma CODE_SECTION(func1, "func1_section");
in the .cmd, they use
func1_section :
LOAD = FLASH_BANK0_SEC1,
RUN = RAMLS0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
Questions:
1. Can they allocate RAM location in .c directly for better code management?
Like
#pragma CODE_SECTION(func1, 0x0000);
#pragma CODE_SECTION(func2, 0x0100);
#pragma CODE_SECTION(func2, 0x0200);
...
2. Instead of using what we know repetitively in both .c and .cmd. Is there any simpler/easier way for them to allocate many functions, each at a specified RAM location?