This is the second post in our “Zero to main()” series.
Last time, we talked about
bootstrapping a C environment on an MCU before invoking our
main function. One
thing we took for granted was the fact that functions and data end up in the
right place in our binary. Today, we’re going to dig into how that happens by
learning about memory regions and linker scripts.
This is a companion discussion topic for the original entry at https://interrupt.memfault.com/blog/how-to-write-linker-scripts-for-firmware