Tangwx

Tangwx

博客网站

View current flash usage with map file in STM32.

View the current flash usage using the map file in STM32#

The map file is located in the Listings folder.

image-20230406194320450

Run the program before adding flash read and write operations, and check how much space the program occupies in the flash using the .map file.

image-20230406194122886

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," the flash of F103RCT6 is 256KB, which belongs to the high-capacity product. The page size of its flash is 2K, so only the first 6 pages, page 0 to page 5, are used to store the program. The remaining part, page 6 to page 127, can be used for other purposes.

image-20230406194020346

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.