-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
mkspiffs crashes when invoked with negative size parameter #190
Comments
Confirm that I also get this bug with d1 mini pro - 128mbit flash Pretending the mini pro only has 64mbit of flash works |
Same problem here with 16MB flash chips. Any news on the fix? |
When using littlefs, build filesystem image will not prompt an error, but the bin file is wrong, file size is 4GB |
CC @valeros in the linked thread people are still experiencing this issue |
I especially observed that when you make the filesystem with the workaround, if you try to do an httpupdate or an update by opening locally a file that was stored in the filesystem, it fails. example of code via localfile: File file = LittleFS.open("firmware.bin", "r"); output: example of code via httpupdate: } if (upload.status == UPLOAD_FILE_WRITE) { output: |
I changed the bitmask from 0xFFFFFF to 0x1FFFFFF in %USERPROFILE%\.platformio\platforms\espressif8266\builder\main.py
|
Hi. @ctbenergy 's workaround gives me an md5 mismatch and corrupted program. I also tried littlefs without luck. If anyone could point out how I'd calculate the values for mkspiffs / esptool. That would be very much appreciated. Edit: |
The bug still exists. Interestingly the upload with Arduino IDE (the old one) works. So, what's the problem to fix this here? |
^ -- CC @valeros |
The bitwise shifting does not work and I would like to use the full capacity of the device. |
It's worked for me. |
Mich hatt es auch erwischt mit mehreren 16 MB Flash-Chips von Aliexpress ("D1 MINI PRO 16M")
Die obere Änderung mit 0x1FFFFFF geht bei mir nicht.
Und Fange einfach den Fehler ab und ändere ihn in ein richtigen Wert zur Weiterverarbeitung, ist zwar nicht das optimalste aber es funktioniert.
Es muß ja ein Grund geben das man es nicht ändert seit Jahren, aber so wäre es sicherlich vertretbar für alle. („Das sind nur Zwei Zeilen ohne die Anzeige“)
|
This issue is not SPIFFS specific, it happens with LittleFS as well and still exists, see https://github.com/platformio/platform-espressif8266/blob/master/builder/main.py#L92-L115 @valeros any chance to get that fixed soon? |
This works for me. |
Adding to the discussion that |
As detailed in https://community.platformio.org/t/building-uploading-spiffs-fails-error-3/11160/6?u=maxgerhardt, for the
platformio.ini
:and creating a
data/
folder with one sample file inside it, thepio run -t uploadfs
task will fail with a fatal error when creating the 14MB SPIFFS section, as dictated by the linker file,Because it cannot allocate
-2121728
bytes. The error lies within the correction code for theSPIFFS_START
andSPIFFS_END
variables which is done in this codeplatform-espressif8266/builder/main.py
Lines 88 to 111 in b866c29
The code transforms the original values
to
thus yielding a negative length for the SPIFFS section. This error seems to occur for large 16MB / 128MBit flash chips. There might be other cases in which this correction logic is wrong?
When
esptool
flash starts at 0 as the comment says, why not subtract the start address of the flash,0x40200000
, from both addresses? I don't understand the correction logic at the moment.The text was updated successfully, but these errors were encountered: