Skip to main content
Graduate
April 25, 2025
Solved

reserving a section of internal flash for FatFs

  • April 25, 2025
  • 2 replies
  • 448 views

Hi, I wanted to know if it is possible and how to approach reserving/allocating a section of internal flash (The Resource section) for a FatFs file?

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    TBH it's woefully ill suited to FatFs..

    You can hide areas from the LINKER via the LINKER SCRIPT (.ld) or the SCATTER FILE (.sct) depending on your tools. The Linker can only use space you tell it about, so you can shrink sizes and make holes, which it will then NOT USE.

    FatFs works a lot better with the QSPI NOR FLASH 4KB sectors (very slow to write), or with eMMC / MicroSD cards

    2 replies

    Technical Moderator
    May 2, 2025

    Hello @Priyank 

    Did you try to check the example provided in the X-CUBE-EEPROM package.

    Graduate II
    May 2, 2025

    TBH it's woefully ill suited to FatFs..

    You can hide areas from the LINKER via the LINKER SCRIPT (.ld) or the SCATTER FILE (.sct) depending on your tools. The Linker can only use space you tell it about, so you can shrink sizes and make holes, which it will then NOT USE.

    FatFs works a lot better with the QSPI NOR FLASH 4KB sectors (very slow to write), or with eMMC / MicroSD cards