At the end of Chapter 3 we covered the reset sequence of the Cortex-M0 and briefly introduced the vector table. Now we will look at the program image in more detail.
A program image for the Cortex-M0 microcontroller often contains the following components:
• Vector table
• C startup routine
• Program code (application code and data)
• C library code (program codes for C library functions, inserted at link time)
Vector Table
The vector table can be programmed in either C language or assembly language. The exact details of the vector table code are tool chain dependent because vector table entries require symbols created by the compiler and linker. For example, the initial stack pointer value is linked to stack region address symbols generated by the linker, and the reset vector is linked to C startup code address symbols, which are compiler dependent. For example, in the RealView Development Suite (RVDS), you can define the vector table with the following C code:
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.