Forums

Startup file and linker script

Started by aakashmenon 5 years ago2 replieslatest reply 5 years ago825 views
Hello all,

I am working on porting code from IAR EWARM to Atollic TrueStudio. This big project is divided in 3 parts, Bootloader, Firmware A and Firmware B, all three are different projects and are separate images that need to be flashed into the microcontroller (STM32- cortex m3). I have two questions
1. How should the startup.s be modified so that I can copy the vector table from FLASH into RAM. I have relocated the vector table address using VTOR.2. Similarly how should i port __ramfunc (IAR directive that helps run code out of RAM). I have used __attribute(section("RAMFN")) and added RAMFN to the linker script. Is that all?

I am new to linker script and low level programming. Any advise when it comes to porting code and references for the same would be helpful.

Thanks,
Aakash
[ - ]
Reply by QLAugust 7, 2017

You might want to watch the "Modern Embedded Systems Programming" video course. Specifically, lessons-13, 14, and 15 talk about startup code and linker scripts. Lessons-19 and 20 talk about using the GNU-ARM toolset with Eclipse-based IDE.

[ - ]
Reply by aakashmenonAugust 7, 2017

Thank you for your reply. I'll try and watch the videos right away.