当前位置:网站首页>How does STM32 know the usage of FLASH

How does STM32 know the usage of FLASH

2022-08-09 08:41:00 Running a small rabbit

1. Load Region LR_IROM1 (Base: 0x00000000, Size: 0x0002dec8, Max: 0x00080000, ABSOLUTE)
//Program ROM loading space size: 188104 = 183k

Execution Region ER_IROM1 (Exec base: 0x00000000, Load base: 0x00000000, Size: 0x0002de68, Max: 0x00080000, ABSOLUTE)
//Program ROM execution space size: 188008
The reason why the SIZE of the execution space is smaller than the load space is that some RW type variables (initial values ​​of global variables) are copied to the RAM space when the program is running.But they all have the same max space.

2. Huada MCU is similar to STM32, FLASH is divided into 64 sectors, each sector is 8K, a total of 512K of space.The starting address is 0x00000000, and my program uses 183K, which is 23 sectors.There are also 41 free sectors. This part of the space can store the data during the running of the program, and it will not disappear after the power is turned off. I use it to access the modified value of the global variable.In this way, the modification parameters can be directly modified by the host computer, instead of downloading the program every time.

原网站

版权声明
本文为[Running a small rabbit]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208090833523889.html