liveBook · Manning

Vector table section

As explained in Embedded Software with Rust

A linker output section containing the processor’s vector table.

A vector table section places startup addresses in FLASH: its first entry sets the initial stack pointer to the top of RAM, and its second entry points to the reset handler. KEEP directives preserve the reset vector and exception handlers from linker garbage collection. section 4.1.3

SECTIONS
{
  .vector_table :
  {
    LONG(ORIGIN(RAM) + LENGTH(RAM));     /* Initial stack pointer (
        top of RAM) */
    KEEP(*(.vector_table.reset_vector))   /* Reset vector (
        entry point) */
    KEEP(*(.vector_table.exceptions))     /* Other exceptions and
    interrupts */
  } > FLASH

Linker-script example defining the vector table output section and retaining its entries. section 4.1.3

How Embedded Software with Rust covers it

How deep it goes
Defines the FLASH output section and KEEP directives, while noting that the stack grows down from RAM rather than occupying a separate section.
Examples
Uses a linker-script listing with a RAM-end stack address and retained reset and exception entries.
What you can do after
Configure a linker script to place the initial stack pointer, reset vector, and exception entries in FLASH.
How it connects
Connects linker scripts with the stack pointer, reset handler, exception handlers, and linker garbage collection.

This explainer was generated by Manning's knowledge graph from the text of Embedded Software with Rust. The section links point to the parts of the book it draws on.