This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil avoids copying the non-root code region to RAM during startup.

Hi

I am working on STM32G4 with Keil, ARMCompiler6.13.

There is critical code executing in CCMRAM (start address is 0x10000000) , I want to load this region once when cold boot (my program is able to detemine cold boot or upgrade boot), and will not be changed after even firmware upgrade.

  

But when the program jumps to the Reset_Handler after firmware upgrade, the CCMRAM was refreshed.I want to keep CCMRAM remain not change during startup.

Then I tried to add "UNINIT" to the CCMRAM region in .sct file, but it doesn't work.

I checked the "Application Note 241 ARM Compiler C Library Startup and Initialization", found the ram is initialized by "__scatterload()" function, then I tried to override this function, but looks it is impossible because there is compressed data in RW region, I don't know how to decompress it.

could someone help on this? could user customize the load function for CCMRAM?

thanks!

Parents Reply Children