cancel
Showing results for 
Search instead for 
Did you mean: 

Porting __ramfunc from IAR to Atollic

Aakash Menon
Associate
Posted on August 10, 2017 at 04:01

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> FLASH

However 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 #stm32f
1 REPLY 1

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..