Home | Projects | Notes > ARM Cortex-M3/M4 Processor > Startup File

Startup File

 

Importance of Startup File

 

Write the Startup File

Instruction

  1. Create a vector table for your microcontroller. Vector tables are MCU-specific.

  2. Write a startup code which initializes .data and .bss section in SRAM. (Reset_Handler())

  3. Call main()

Startup file can be a C file (.c) or an assembly file (.s).

[!] Note: Vector table information can be found in the MCU Reference Manual. Different exceptions for different microcontrollers. Check the documentation!

 

vector-table

 

1. Create a Vector table

2. Write the Reset_Handler()

3. Call main()

 

C Standard Library Integration

Newlib

Newlib Nano

 

locating-newlib-and-newlib-nano

 

Library Integration

 

Low-Level System Calls

low-level-system-calls-1

 

 

low-level-system-calls-2

 

 

Floating-Point ABI

 

Example of a Startup File

 

References

Nayak, K. (2022). Embedded Systems Programming on ARM Cortex-M3/M4 Processor [Video file]. Retrieved from https://www.udemy.com/course/embedded-system-programming-on-arm-cortex-m3m4/