Advanced Embedded Programming | How to Prevent RAM or FLASH from Overloading?

Advanced Embedded Programming | How to Prevent RAM or FLASH from Overloading?

01Introduction: When developing with microcontrollers, issues related to RAM or FLASH usage often arise. Below, we analyze the factors affecting RAM and FLASH usage and how to optimize them. 02Analysis of RAM Usage Factors 1. Variable Storage Global Variables/Static Variables (Global Lifetime) uint32_t global_counter = 0; // Initialize global variable (occupies .data segment RAM) uint8_t … Read more

How Embedded Experts Optimize Microcontroller Programs from a Global Perspective

How Embedded Experts Optimize Microcontroller Programs from a Global Perspective

I am Lao Wen, an embedded engineer who loves learning.Follow me to become even better together!Program Structure Optimization 1. Program Writing Structure Although the writing format does not affect the quality of the generated code, certain writing rules should still be followed during actual programming. A clearly written program is beneficial for future maintenance. When … Read more

Microcontroller Program Optimization Process!

Microcontroller Program Optimization Process!

01 Program Structure Optimization 1. Program Writing Structure Although the writing format does not affect the quality of the generated code, certain writing rules should still be followed during actual programming. A clearly written program is beneficial for future maintenance. When writing programs, especially for statements like While, for, do…while, if…else, switch…case, and their nested … Read more