1. Install esp-open-sdk. This was as easy as cloning repository and calling make.
2. Set path to the toolchain created in step one, some thing like
export PATH=/home/k/BUILD/esp-open-sdk/xtensa-lx106-elf/bin/:$PATH
3. Clone nodemcu-firmware repo, call make (without any -jX parameter, for some reason this does not work for me).
4. Use esptool.py to prepare and flash images:
esptool.py elf2image app/.output/eagle/debug/image/eagle.app.v6.out
esptool.py write_flash 0x00000 app/.output/eagle/debug/image/eagle.app.v6.out-0x00000.bin 0x10000 app/.output/eagle/debug/image/eagle.app.v6.out-0x10000.bin
However, when attempting to flash I get the following error:
Connecting...
Erasing flash...
Writing at 0x0000ac00... (100 %)
Erasing flash...
Traceback (most recent call last):
File "../esp8266/esptool.py", line 400, in <module>
esp.flash_begin(len(image), address)
File "../esp8266/esptool.py", line 178, in flash_begin
raise Exception('Failed to enter Flash download mode')
Exception: Failed to enter Flash download mode
And upon boot the chip keeps spilling data at an unknown baud rate. :s
Flashing a pre built firmware works fine.
Edit: I used 0x1 instead of 0x10..0
Btw, for ease you can just use "make flash" for flashing.
Fr4gg0r wrote:Btw, for ease you can just use "make flash" for flashing.
Yep, that's working as of yesterday, it seems. Introduced in this commit - https://github.com/nodemcu/nodemcu-firm ... c04bde7c3c I guess.