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

Detailed Explanation of Simplified Segment Definition Techniques in Assembly Language

Detailed Explanation of Simplified Segment Definition Techniques in Assembly Language

Overview of Simplified Segment Definition In assembly language programming, the new version of the assembler provides a method for simplified segment definition, which is more convenient compared to complete segment definitions. The simplified segment definition automatically handles segment attributes through predefined storage models, significantly reducing the burden on programmers. Core Advantages of Simplified Segment Definition: … Read more

Assembly Language Day 01

Assembly Language Day 01

0x00 This article is dedicated to daily learning and note sharing to help everyone learn assembly language. Why learn assembly language? Because in red-blue confrontations, our tools are often detected and killed by some AV/EDR. Therefore, we need to counter AV, which is the evasion technique. To learn evasion techniques, we must start from the … Read more

Setting Breakpoints and Monitoring Variables in C++

Setting Breakpoints and Monitoring Variables in C++

Setting Breakpoints and Monitoring Variables in C++ In C++ development, debugging is a crucial step. By setting breakpoints and monitoring variables, we can better understand the execution flow of the program and quickly locate issues. This article will detail how to use breakpoints and variable monitoring in C++, along with corresponding code demonstrations. What is … Read more