Current Lua downloadable firmware will be posted here

User avatar
By pronoyc
#67056 Hello, I am using an ESP8266-ES12 (32m)

So I built the latest 2.1.0-master_20170521 version and I followed the following steps:

1. Erase flash:
Code: Select allesptool.py --port /dev/cu.usbXXXX write_flash

2. Flash esp_init_data_default.bin (extracted from app/sdk/esp_iot_sdk_v2.1.0/bin) and flashed it a 0x3fc000
Code: Select allesptool.py --port /dev/cu.usbXXXX write_flash -fm dio -fs 32m 0x3fc000 esp_init_data_default.bin

3. Flash 0x00000.bin at 0x00000 and 0x10000.bin at 0x10000
Code: Select allesptool.py --port /dev/cu.usbXXXX write_flash -fm dio -fs 32m 0x00000 0x00000.bin 0x10000 0x10000.bin


These steps work and I can see the prompt after "Erasing file system" for version 1.5.4 but for version 2.1.0, after the file system erase, all I see is garbage on the serial port. What am I missing here?
User avatar
By marcelstoer
#67159
pronoyc wrote:What am I missing here?


Not sure you're missing anything but the process can be simplified. I understand you manually build on Linux thus the 0x00000.bin and 0x10000.bin files?

A couple of notes:
- Erasing flash is done using the `erase_flash` command rather than `write_flash` (possibly a typo in your post).
- Current versions of esptool.py (2.0 was released today, check with `esptool.py version`) don't need the -fs parameter because they support auto-size detection (on by default).
- If you use the -fs parameter the value is in MB rather than Mb with current esptool.py versions, see https://github.com/espressif/esptool/#f ... h_size--fs
- With current versions of NodeMCU you don't need to flash the init data manually. The firmware does that automatically on boot if necessary, see https://nodemcu.readthedocs.io/en/lates ... -init-data.

pronoyc wrote:all I see is garbage on the serial port


Have you tried setting baud to 115200 explicitly? I assume that this works ok though as you'd otherwise not see the file system erase messages.
User avatar
By pronoyc
#67229
marcelstoer wrote:A couple of notes:
- Erasing flash is done using the `erase_flash` command rather than `write_flash` (possibly a typo in your post).

Yes, that was a typo, I did use erase_flash successfully

marcelstoer wrote:- Current versions of esptool.py (2.0 was released today, check with `esptool.py version`) don't need the -fs parameter because they support auto-size detection (on by default).

Ah, I haven't seen that one, I am still using 1.3 which seems to work fine with Nodemcu v1.5.4.1

marcelstoer wrote:- If you use the -fs parameter the value is in MB rather than Mb with current esptool.py versions, see https://github.com/espressif/esptool/#f ... h_size--fs

That is so weird, maybe it ignores the value because it flashed fine with the older version. But I will specify it in MB from now on. Thanks for catching that.

marcelstoer wrote:- With current versions of NodeMCU you don't need to flash the init data manually. The firmware does that automatically on boot if necessary, see https://nodemcu.readthedocs.io/en/lates ... -init-data.


Unfortunately that didn't work either. I tried just flashing 0x00000.bin and 0x00001.bin and I also tried a build from nodemcu-build website listed in the docs but no success.

pronoyc wrote:all I see is garbage on the serial port

marcelstoer wrote:Have you tried setting baud to 115200 explicitly? I assume that this works ok though as you'd otherwise not see the file system erase messages.


I did that too. I also see "Formatting file system, please wait" message, so I know that the baud is correct.