2017-08-09 07:01 PM
Hello,
I am working on porting code from IAR EWARM to Atollic Truestudio for STM32F103RD microcontroller. For the __ramfunc IAR directive I have added __attribute__((long_call,section('.RAMFN'))) and modified the linker script to
.data :
{ . = ALIGN(4); _sdata = .; /* create a global symbol at data start */ *(.data) /* .data sections */ *(.data*) /* .data* sections */ . = ALIGN(4); _ramfn_start = .; *(.RAMFN) *(.RAMFN*) _ramfn_end = .; _edata = .; /* define a global symbol at data end */ } >RAM AT> FLASHHowever I am not sure if/how the startup file needs to be modified. I am new to linker script and low level programming. Any advise when it comes to porting and references for the same would be helpful.
Thanks,
Aakash
#stm32-ram #flash-stm32 #stm32f2018-08-10 06:00 AM
IAR and Keil implement table driven unpackers for the load region automatically generated by the linker.
For GNU/GCC based tools you will be responsible for adding code in startup.s to copy data from FLASH to RAM, using your symbols. Review the code in startup.s to understand what it is doing, and step through it to confirm the areas it is moving.