Search code examples
nodemcuesp32

Flashing NodeMCU on ESP32


ESP8266 and ESP32 noob here. I bought a couple of ESP32 modules and I'm trying to install NodeMCU on them (they came with just some sample code).

I created a firmware image using the cloud builder and tried to flash it to the device (later on, I built it myself too, same result). After some experimentation I found that the bootloader expects the firmware to start at 0x1000 in the flash, instead of 0x0000 (I read the original flash content to confirm that), so I flashed the firmware at 0x1000. I can confirm using read_flash (or other methods) that the firmware has been flashed correctly. But when I connect to the serial port to see what the output is, I get this at the beginning:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x01,hd_drv:0x00,wp_drv:0x04
mode:DIO, clock div:2
load:0x260513e7,len:0
load:0x46007200,len:65534
1162 mmu set 00010000, pos 00010000
load:0x65920020,len:-491131
1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000
1162 mmu set 00090000, pos 00090000
1162 mmu set 000a0000, pos 000a0000
1162 mmu set 000b0000, pos 000b0000
ets Jun  8 2016 00:22:57

And after that this looping over and over again:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x01,hd_drv:0x00,wp_drv:0x04
mode:DIO, clock div:2
load:0x260513e7,len:0
load:0x46007200,len:65534
1162 mmu set 00010000, pos 00010000
load:0x65920020,len:-491131
1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000
1162 mmu set 00090000, pos 00090000
1162 mmu set 000a0000, pos 000a0000
1162 mmu set 000b0000, pos 000b0000
ets Jun  8 2016 00:22:57

At this point I'm quite lost in what could possibly be wrong, any help is appreciated.


Solution

  • Ultimately - the solution is to use esp32 branch of nodemcu, as indicated in my comment above. The standard branch only works on ESP8266.