IAR Startup Process

IAR Startup Process

MCU Startup Process The MCU startup process refers to the sequence between: MCU reset –> main(). After the MCU is reset, it willstart executing from the reset vector,initialize the Stack pointer to point to the end of the designated Stack area, and thencall the __low_level_init function for related initialization. For detailed processes, please refer to … Read more

4 Questions to Understand the Startup Principles of MCUs

4 Questions to Understand the Startup Principles of MCUs

1. Where does the MCU read code when it first starts up?After the CPU is powered on, it is designed to read code from address 0x00000000; it first reads two words in succession, which are the initial value of the stack pointer and the address of the reset exception handler; then it jumps to execute … Read more

What Happens Before the Main Loop in Microcontrollers

What Happens Before the Main Loop in Microcontrollers

For those new to microcontrollers, it is common to start writing code from the main() function — as if the microcontroller will obediently execute instructions as soon as main() runs. However, before the main loop (the loop logic within the main() function) starts, the microcontroller must first complete a series of “preparatory tasks”, similar to … Read more

From Keil to GCC: Who Handles Memory Initialization During Embedded Program Startup?

From Keil to GCC: Who Handles Memory Initialization During Embedded Program Startup?

In embedded development, many engineers often wonder: after powering on the program, how are global and static variables initialized? Is the underlying memory operation logic the same from Keil MDK-ARM to the GCC cross-toolchain? Today, we will break down this core issue and understand the complete process from chip power-up to the execution of the … Read more

The Complete Process from Powering Up to Running an MCU

The Complete Process from Powering Up to Running an MCU

For embedded developers, the MCU acts like a tireless little steward, responsible for directing electronic devices to complete various tasks. But have you ever thought about how this “little steward” is awakened from a completely “asleep” state to gradually enter a working state the moment you power on the device? The startup process behind this … Read more

Embedded Development Skills: Further Familiarization with MCU Startup Process from STM32’s Startup and Linker Files

Embedded Development Skills: Further Familiarization with MCU Startup Process from STM32's Startup and Linker Files

Line-by-Line Analysis of the Linker File In the previous article, we analyzed the startup file, and here we will supplement an important C function within the startup file. /** * @brief Setup the microcontroller system * Initialize the FPU setting, vector table location and External memory * configuration. * @param None * @retval None */ … Read more

How Microcontrollers Execute Programs

How Microcontrollers Execute Programs

1 Introduction To understand how microcontrollers execute programs, it is essential to first comprehend the components of a microcontroller. This article uses the 80C51 microcontroller as an example to explain how programs run within a microcontroller. 2 Components of a Microcontroller The internal hardware structure of the 8051 microcontroller includes: Central Processing Unit (CPU): This … Read more

Understanding the Microcontroller Startup Process (STM32) for Hardware Engineers, Including a Troubleshooting Manual for Startup Issues

Understanding the Microcontroller Startup Process (STM32) for Hardware Engineers, Including a Troubleshooting Manual for Startup Issues

As a hardware engineer, have you ever encountered these issues: The circuit board shows no response after power is applied, like a “brick”. The program occasionally starts, but sometimes hangs. Peripheral initialization is abnormal, yet the code logic is correct. These issues stem from startup process anomalies 80% of the time! Let’s learn about the … Read more

Unveiling ARM Cortex-M Startup: From Power-On to Your main() Function

Unveiling ARM Cortex-M Startup: From Power-On to Your main() Function

Today, let’s delve into a seemingly basic yet often overlooked topic — what exactly happens from the moment you press the reset button until your <span>main()</span> function begins execution? Overview of the Startup Process: The Journey of System Awakening Imagine your MCU as a robot just awakened. It needs to get dressed (load the stack), … Read more

Unveiling ARM Cortex-M Startup: From Power-On to Your main() Function

Unveiling ARM Cortex-M Startup: From Power-On to Your main() Function

Today, let’s delve into a seemingly basic yet often overlooked topic — what exactly happens from the moment you press the reset button until your <span>main()</span> function begins execution? Startup Process Overview: The Journey of System Awakening Imagine your MCU as a robot just awakened. It needs to get dressed (load the stack), understand its … Read more