EmbeddedRelated.com
Forums
Jacob Beningo
Live online course · Jacob Beningo
AI for Embedded Developers
$100 off for EmbeddedRelated readers until Dec 6 · 5 live sessions, Dec 7-11
Discount ends in
21days 00hrs 28min 44sec
Learn More →

Startup file and linker script

Started by aakashmenon 9 years ago●2 replies●latest reply 9 years ago●1403 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 QL●August 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 aakashmenon●August 7, 2017

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