Posts

Showing posts with the label start up code

What is a start-up code in an MCU?

Image
Start Up code of an MCU Starting up an MCU (Microcontroller Unit) involves executing a sequence of instructions that initializes the various on-chip peripherals and sets up the processor’s operating environment. This sequence of instructions is often referred to as the “startup code"  and is typically provided as part of the development tools provided by the chip manufacturer. The startup code is responsible for configuring several hardware and software aspects of the MCU to prepare it for the application code to run. Details of these tasks is as below: Stack Pointer Initialization : Stack Pointer points to the memory location in RAM which will be used by the program to store the function call stacks and the local variables for each function call. Data Section Initialization : Data Section in the memory layout contains the initialized global and static variables. Block Started by symbol (BSS) Initialization : BSS Section in the memory layout contains uninitialized global and sta...