Developing the Linker Script and Startup File
In this chapter, we undertake an in-depth exploration of the core components of embedded bare-metal programming, focusing on three critical areas: the microcontroller memory model, the writing of the linker script, and the startup file.
First, we’ll explore the microcontroller memory model to understand how memory is organized and utilized. This knowledge is important for accurately allocating program code and data sections within the microcontroller memory. Next, we’ll go through the intricacies of writing linker scripts. These scripts are essential for correctly mapping our program to the appropriate sections of the microcontroller’s memory, ensuring that the executable runs as intended.
Finally, we will learn about the startup file and then proceed to write our own, focusing on initializing the vector table and configuring Reset_Handler
.
In this chapter, we’re going to cover the following main topics...