STM32F407 - Flash Size issue #224
Replies: 9 comments
-
The F4 flash is split into sectors. 0 to 3 are 16 kB, 4 is 64 kB and the rest are 128 kB. You can change the sector to use with define OTA_STORAGE_STM32_SECTOR in boards.local.txt Create a file boards.local.txt next to boards.txt file in hardware package. There you can set build.extra_flags for individual boards, like this:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
C:\Users\user\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0 maxsize is the space for the sketch. sector 5 starts at 128 kB so it is 131072 bytes in sector 0 to 4 (128 kB is 131072 bytes) |
Beta Was this translation helpful? Give feedback.
-
Hello I created the board.local.txt file but I still have the same issue that not enough space is available |
Beta Was this translation helpful? Give feedback.
-
did you restart the IDE? |
Beta Was this translation helpful? Give feedback.
-
Yes have restarted platformio multiple times , |
Beta Was this translation helpful? Give feedback.
-
PlatformIO? maybe it has the boards package somewhere else or it doesn't process local.txt files |
Beta Was this translation helpful? Give feedback.
-
Thanks for all your help I managed to get it working by adding -DOTA_STORAGE_STM32_SECTOR=9 as a build flag in platformio.ini i attached below for anyone as a reference in future |
Beta Was this translation helpful? Give feedback.
-
so yes, Arduino doesn't have a project configuration file. that is better in plaformio |
Beta Was this translation helpful? Give feedback.
-
Hello I have been using this great library for OTA over Wifi of my project using STM32F407VE mcu with 512kb of flash.
Everything was working fine for months but now as my code evolves the .bin file is getting large and 155kb in size and with this size the update will be halted with serial message "There is not enough space to store the update. Can't continue with update."
After that I have updated the MCU from STM32F407VE 512KB to STM32F407VG 1Mb but the issue still happen , can it be the Internalstorage class is calculating the available space wrong for the STM32F407VG ?
STM32F407VE compilation details - firmware uses of Flash: [=== ] 30.2% (used 158208 bytes from 524288 bytes)
STM32F407VG compilation details - firmware uses of Flash: [== ] 15.1% (used 158208 bytes from 1048576 bytes)
Beta Was this translation helpful? Give feedback.
All reactions