View current flash usage using map file in STM32#
The map file is located in the Listings folder.
Run the program before adding flash read and write operations, and check the amount of flash space occupied by the program through the .map file.
Load space: CODE + RO (const variables or string constants) + RW-data initialized data
Execution space: CODE + RO
After power-on, the RW-data initialized data is moved from flash to RAM, so the execution space will be slightly smaller.
Based on the load space, Size: 0x00002fec = 12268B < 12KB. According to the "STM32F10xxx Flash Programming Reference Manual", it is known that the flash of F103RCT6 is 256KB, which belongs to a large capacity product. The page size of its flash is 2K, so only the first 6 pages, page 0 to page 5, can be used to store the program. The remaining part, page 6 to page 127, can be used for other purposes.