flash partitioning

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
tecdroid
Posts: 27
Joined: Thu Apr 08, 2021 6:22 am

flash partitioning

Post by tecdroid » Tue Jun 01, 2021 7:32 pm

hi, i just wondered why writing about 350kb into stm32 flash results in about 90kb free disk space.. .. and found the solution.. or half of it in stm32f405.ld

Code: Select all

/* Specify the memory areas */
MEMORY
{
    FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
    FLASH_ISR (rx)  : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
    FLASH_FS (rx)   : ORIGIN = 0x08004000, LENGTH = 112K /* sectors 1,2,3,4 are for filesystem */
    FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 896K /* sectors 5,6,7,8,9,10,11 */
    CCMRAM (xrw)    : ORIGIN = 0x10000000, LENGTH = 64K
    RAM (xrw)       : ORIGIN = 0x20000000, LENGTH = 128K
}
so, one sector seems to be the boot loader and 4 of 12 sectors are used for the file system.. ok to me.. but what is the FLASH_TEXT part. Is it neccessary to have it that big?

Post Reply