-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Flash-size agnostic mode, problem with spi_flash_* functions #9027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
When building with The runtime selected configuration is based on the same code as in
This symbol does not exist by default so you provided one: can you show its content ? Can you also tell
|
It doesn't matter if I use eagle.flash.auto.ld, use FLASH_MAP_OTA_FS or remove FLASH_MAP_SETUP_CONFIG at all - I get FS not working. Checked. System configuration, ESP.getFlashChipRealSize(), ESP.getFlashChipSize() are correct. My build environment is VSCode with Platformio Core 6.1.11 Home 3.4.4 I used SDK: 2.2.2-dev(38a443e) (default). Same result in 2.2.1 and PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122
So, SDK still use incorrect chip size from bin file. And this value is used for bounds checking if flash read/write functions. At least in 2.2.2 SDK. Yes, I can use board with bigger flash size to compile bin, but in this case attempts to read/write flash beyond end will not be catched by SDK on boards with less flash. So, long story short
|
I need to reproduce.
|
Uh oh!
There was an error while loading. Please reload this page.
Basic Infos
Platform
Settings in IDE
Problem Description
I'm trying to make "Flash-size agnostic build". Firmware still depends on selected ldscript flash size in SDK functions spi_flash_*. FS not working if firmware was build with ldscript flash size less than actual.
Steps to reproduce:
Problem: incorrect value in flashchip->chip_size is used by spi_flash_* functions for bounds checking. Flash read above 1M fails.
Possible fix:
flashchip->chip_size = ESP.getFlashChipRealSize();
(somewhere in the code)
The text was updated successfully, but these errors were encountered: