I Cant upload SPIFFS after reinstall

Hi. I’ve been using Plataform.io for a few days. Today I had to reinstall the software for a crash with the terminal part. After that I cant upload SPIFFS. It says “file too big”

I have another PC and works ok. The only thing i noticed is a difference in this line…

esptool -vv -cd nodemcu -cb 115200 -cp “COM3” -ca 3145728 -cf .pioenvs\nodemcuv2\spiffs.bin

On the working installation runs

esptool -vv -cd nodemcu -cb 115200 -cp “COM3” -ca 0x300000 -cf .pioenvs\nodemcuv2\spiffs.bin

How can I change that?

PS: I can upload any firmware build without problem

PS2: Sorry for my bad english

and

Are exactly the same because 0x300000 = 3145728. What’s the size of the SPIFFs binary you’re trying to upload (i.e. file size of .pioenvs\nodemcuv2\spiffs.bin)?

I’ve tried 3m and 1m using env flags and no one works. The same project uploads corectly online the other pc… If I can connect to mybwork PC I Will upload the log. Thx

This is my platform.ini file:

env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino

This is my main.c

#include <Arduino.h>

void setup() {
    // put your setup code here, to run once:
}

void loop() {
    // put your main code here, to run repeatedly:
}

data folder is empty and the bin size is 1028096 bytes

22/06/2018  14:30           259.696 firmware.bin

the output of the upload log

Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
SYSTEM: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 26 compatible libraries
Scanning dependencies...
No dependencies
"mkspiffs" -c data -p 256 -b 8192 -s 1028096 .pioenvs\nodemcuv2\spiffs.bin
MethodWrapper(["uploadfs"], [".pioenvs\nodemcuv2\spiffs.bin"])
Auto-detected: COM4
esptool -vv -cd nodemcu -cb 115200 -cp "COM4" -ca 3145728 -cf .pioenvs\nodemcuv2\spiffs.bin
esptool v0.4.13 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM4
setting address from 0x00000000 to 0x03145728
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start*** [uploadfs] Error 2

setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
Uploading 1028096 bytes from .pioenvs\nodemcuv2\spiffs.bin to flash at 0x03145728
erasing flash
size: 0fb000 address: 3145728
warning: Invalid size/address, too large: fb000 3145728
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
error: espcomm_upload_mem failed
================================================== [ERROR] Took 2.01 seconds 

I don’t know what to do. The same project upload ok on the same chip at another PC

I can reproduce this too after updating:

Updating espressif8266                   @ 1.7.1          [1.7.2]
Uninstalling espressif8266 @ 1.7.1:     [OK]
PlatformManager: Installing espressif8266 @ 1.7.2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
espressif8266 @ 1.7.2 has been successfully installed!

It did work on 1.7.1.

Does doing this modification on your platformio.ini also do the trick?

platform = espressif8266@1.7.1

Seems like this is a regression. Compared to an old upload run the start address where the SPIFFS is flashed changed.

Old, working:

Uploading 1028096 bytes from .pioenvs\nodemcuv2\spiffs.bin to flash at 0x00300000
erasing flash
size: 0fb000 address: 300000

New, nonworking:

Uploading 1028096 bytes from .pioenvs\nodemcuv2\spiffs.bin to flash at 0x03145728
erasing flash
size: 0fb000 address: 3145728
warning: Invalid size/address, too large: fb000 3145728
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed

This commit probably broke it: Automatically calculate maximum available sketch size based on LD scr… · platformio/platform-espressif8266@f5e2a37 · GitHub

2 Likes

Oh I know what could be the error. I said in the first post. PIO now gives the flash address in decimal instead of hexadecimal, somehow the tool doesn’t like it. @ivankravets?

Yes!, the spiffs.bin upload correctly now!

Yesterday i had to reinstall coz the terminal broke for no reasons. When I did that the espressif8266 sdk had to be updated. The terminal begin to work but the upload starts to fail

Thank You very much!

1 Like

This a bug and has been just fixed. Please upgrade dev/platform to v1.7.3.

P.S: @maxgerhardt, thank you so much that pinged me! :blush:

Thanks to both of you! I Will try it later on monday when I golpe back to work.

At the moment i’m using the solution provided for maxgerhardt

SUCCESS! Works perfect 1.7.3