Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

#14 Startup Code Part-2: Replacing the vector-table, embedded software build process

73.5K views on YouTube

The objective of this lesson is to replace the default vector table from the IAR library with your own.

To achieve this, you first need to understand the embedded software build process. You will look inside the object files (ELF format) to see what “relocatable code” really means. You will also see how the linker resolves the cross-module references and how the rules are different for objects included directly and object libraries.

Finally, you will start writing your own startup code with your own vector table. At the end of the lesson, you see that your vector table is used instead of the default one.

In the next lesson, you will see how to properly initialize your vector table with the stack pointer and addresses of the interrupt handlers.

——
Resources:

Companion web page for this video course:
https://www.state-machine.com/quickstart

GitHub repository for projects for this video course:
https://github.com/QuantumLeaps/modern-embedded-programming-course

Links used in this lesson:
Article “Library order in static linking”
http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking

YouTube playlist of the course: