Notes on mcu_Flash

1. Check the memory map of the single-chip microcomputer to know the address memory range of the internal flash and Ram
2. Set the flash space in the relevant IDE according to the address 3.
Check the memory usage
Check the memory usage after the compiler compiles
insert image description here
Code is
the RO-data representation of the program code part The constant const temp defined by the program;
RW-data represents the initialized global variable
ZI-data represents the uninitialized global variable
ROM(Flash) size = Code+RO-data+RW-data; //program memory
RAM size = RW- data+ZI-data //
View the memory usage in the data memory.map
insert image description here
4. The starting address of the flash storage address is after the occupied address
insert image description here
5. MDK simulation method to view the specified flash address space
Input the specified address to view the address content
insert image description here

Reference: Calculation of the space occupied by
Program Size STM32 program && calculation of the starting address of FLASH storage

Guess you like

Origin blog.csdn.net/weixin_49048045/article/details/122472227