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
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
4. The starting address of the flash storage address is after the occupied address
5. MDK simulation method to view the specified flash address space
Input the specified address to view the address content
Reference: Calculation of the space occupied by
Program Size STM32 program && calculation of the starting address of FLASH storage