Difference between revisions of "STM32 HAL LittleFS"

From Stm32World Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Category:STM32]][[Category:STM32 Development]]{{metadesc|{{PAGENAME}}}}
 
[[Category:STM32]][[Category:STM32 Development]]{{metadesc|{{PAGENAME}}}}
 
This page contains some notes getting [https://github.com/littlefs-project/littlefs LittleFS] running using parts of the internal flash memory.  For now this will be targeting [[Black Pill]] boards with the [[STM32F411]] [[MCU]].
 
This page contains some notes getting [https://github.com/littlefs-project/littlefs LittleFS] running using parts of the internal flash memory.  For now this will be targeting [[Black Pill]] boards with the [[STM32F411]] [[MCU]].
 +
 +
== Modifying Linker Script ==
 +
 +
The linker script <pre>STM32F411CEUX_FLASH.ld</pre> defines the layout of the memory - both flash and ram of the STM32F411 MCU.  At the beginning is:
 +
 +
<pre>
 +
/* Memories definition */
 +
MEMORY
 +
{
 +
  RAM    (xrw)    : ORIGIN = 0x20000000,  LENGTH = 128K
 +
  FLASH    (rx)    : ORIGIN = 0x8000000,  LENGTH = 512K
 +
}
 +
</pre>

Revision as of 02:08, 21 June 2021

This page contains some notes getting LittleFS running using parts of the internal flash memory. For now this will be targeting Black Pill boards with the STM32F411 MCU.

Modifying Linker Script

The linker script

STM32F411CEUX_FLASH.ld

defines the layout of the memory - both flash and ram of the STM32F411 MCU. At the beginning is:

/* Memories definition */
MEMORY
{
  RAM    (xrw)    : ORIGIN = 0x20000000,   LENGTH = 128K
  FLASH    (rx)    : ORIGIN = 0x8000000,   LENGTH = 512K
}