Most of us don’t realize how spoiled we are with the different development environments available on the internet. If someone wants to start a blank project on a new [ARM/DSP/…] platform, he usually fires up the dedicated Integrated Development Environment (IDE) and starts coding a C/C++ program. However, there are many initialization routines and scripts required with your program before it can run correctly. In his great article, [Andrew] explains to us what these are by starting a blank project without using any IDE.

As you can see in the above picture, [Andrew]’s project is made around an Atmel SAM4E microcontroller. The chosen toolchain is the arm-none-eabi-gcc from GNU Tools for ARM Embedded Processors. The first part of the article starts with a simplified explanation on how/why your code and variables are split into different memory sections (.bss, .data, .rodata, .text), then [Andrew] details how the linker script will put these sections at different physical addresses depending on your microcontroller’s memory layout. He also shows us how to take care of the stack placement, vector table, variable (non)initialization, and C Runtime. For information, the latter is executed when your processor starts, it is in charge of setting up the stack pointer, initializing the RAM, setting up the standard library and calling the main().

A very nice introduction on the very low level routines running on most processors out there.