Interrupts and Exceptions in Cortex-M

Interrupts and Exceptions in Cortex-M

Definition First, let’s look at the definitions of both in the authoritative guide for Cortex-M. 1 Exception Definition According to the authoritative guide for Cortex-M, an exception refers to an event that can alter the normal program flow. When an exception occurs, the processor pauses the currently executing task and executes a dedicated program to … Read more

MCUViewer: A GUI-Based Debugging Tool for Microcontrollers (MCUs)

MCUViewer: A GUI-Based Debugging Tool for Microcontrollers (MCUs)

Hey, embedded friends, are you still logging with UART, watching the serial output scroll line by line, which is tedious and time-consuming? Have you ever thought: what if there was a visual tool that could help you instantly understand variable changes and function execution times, could the debugging experience be elevated? The answer is — … Read more

Two Good Habits to Improve FPGA Development Efficiency

Two Good Habits to Improve FPGA Development Efficiency

Most people have encountered this situation: after putting in a lot of effort to fix the code and test files, you excitedly start running simulations, only to find that everything fails, and you have to spend more effort debugging. This article summarizes two good habits that can improve development efficiency and experience. They are called … Read more

Introduction to GDB and Usage Examples: Start Debugging Your Programs!

Introduction to GDB and Usage Examples: Start Debugging Your Programs!

When it comes to learning embedded systems, there is undoubtedly a lot to learn and remember. Writing this down helps me reconstruct problems and receive guidance from peers. 1. What is GDB? During our programming journey, we inevitably encounter program crashes, variable anomalies, and logical errors. This can be particularly frustrating for technical support workers … Read more

Detailed Explanation of Implicit Actions of Storage Model Pseudoinstructions in Assembly Language

Detailed Explanation of Implicit Actions of Storage Model Pseudoinstructions in Assembly Language

Implicit Behaviors of Storage Model Pseudoinstructions <span>.MODEL</span> pseudoinstructions not only define the storage model of the program but also automatically execute several important low-level settings. These implicit actions greatly simplify the writing of assembly language programs. Core Implicit Actions **Automatic Creation of Segment Group (DGROUP)**: Combines <span>_DATA</span>, <span>CONST</span>, <span>_BSS</span>, and <span>STACK</span> into a segment group … Read more

Detailed Explanation of Special Macro Operators in Assembly Language

Detailed Explanation of Special Macro Operators in Assembly Language

Overview of Macro Operators In assembly language macro processing, special operators provide fine control over macro parameter handling, making macro definitions more flexible and powerful. These operators are processed by the assembler during the macro expansion phase and do not affect the final generated code. Detailed Explanation of Five Special Macro Operators 1. Forced Replacement … Read more

Introduction to Embedded Software Development for ARM Cortex-M3/M4 (Part 2)

Introduction to Embedded Software Development for ARM Cortex-M3/M4 (Part 2)

Software Development Process: (1) Create a project, specifying the location of source files, compilation targets, memory configuration, and compilation options. (2) Add files to the project. (3) Set project options, such as compiler optimization options, memory mapping, and output file types. (4) Compile and link. (5) Flash programming, downloading the program to flash memory. (6) … Read more

Detailed Explanation of the Cortex-M3 Embedded System Programming Model (Part 2)

Detailed Explanation of the Cortex-M3 Embedded System Programming Model (Part 2)

This is a further refinement of the Cortex-M3 programming model, covering more specific implementation details and key operations: 1. Refinement of Register Groups 1. Detailed Explanation of Special Registers CONTROL Register (32 bits, modifiable only at privileged level) Bit 0 (`nPRIV`): 0 = Privileged mode (can access all resources) 1 = Unprivileged mode (restricted access) … Read more

In-Depth Understanding of the GCC Toolchain: The Cornerstone and Advanced Guide for Embedded Development

In-Depth Understanding of the GCC Toolchain: The Cornerstone and Advanced Guide for Embedded Development

In embedded system development, the GCC toolchain is an indispensable core tool. It is not just a set of compilers but also supports the entire process of building, debugging, and optimizing programs. This article will systematically introduce you to the various components of the GCC toolchain, its working mechanisms, debugging and optimization techniques, along with … Read more