4

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, ...

Get Bare-Metal Embedded C Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.