Current Lua downloadable firmware will be posted here

User avatar
By marcelstoer
#55351
amadeus84 wrote:Using esp-12 (4Mbit = 512kB version). These were bought sometime in 2015


That sounds wrong or at least suspicious. ESP-12 have 4MB flash memory. If you're uncertain about the module have a look at wiki/doku.php?id=esp8266-module-family.

As per http://nodemcu.readthedocs.io/en/latest ... g-firmware the right command is this:

Code: Select allesptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m 0x00000 <nodemcu-firmware>.bin 0x3fc000 esp_init_data_default.bin


To make sure you have a proper firmware binary I suggest you use the cloud builder or the Docker image for starters. If this works you can still resort to building the firmware yourself.
User avatar
By amadeus84
#55356 I was aware about the command you suggested (also at https://nodemcu.readthedocs.io/en/master/en/flash/) but
    - I kept assuming I have 512kB
    - I have 2 files (0x00000.bin and 0x10000.bin) to flash rather than a single one.

I did create a nodemcu firmware with the cloud builder and flashing THAT with 0x3fc000 for esp_init_data_default.bin did the trick.

Any suggestions what the command should be for flashing my own 0x00000.bin and 0x10000.bin? Table 4-2 in this espressif documentation

https://espressif.com/en/support/explor ... rted-guide

says the 2nd bin file goes to 0x40000 on a 4MB chip. I tried that but I get garbage again. Perhaps options like -fm and -fs in esptool.py?


Incidentally, I want to compile my own because (a) it's more fun and (b) I want to

#define IP_FOWRARD 1 # rather than 0

in app/include/lwipopts.h. And that's because I want to see if I can use the esp module as a wifi repeater. Wouldn't that be awesome?
User avatar
By marcelstoer
#55357
amadeus84 wrote:Any suggestions what the command should be for flashing my own 0x00000.bin and 0x10000.bin?


Replace

Code: Select all0x00000 <nodemcu-firmware>.bin


with

Code: Select all0x00000 0x00000.bin 0x10000 0x10000.bin
User avatar
By amadeus84
#55359 I swear to God I tried that (with 0x10000.bin at 0x10000). I did not use the -fm and -fs options though. This is the complete command that worked:

Code: Select allesptool.py -p /dev/ttyUSB0 write_flash -fm dio -fs 32m 0x00000 0x00000.bin 0x10000 0x10000.bin 0x3fc000 esp_init_data_default.bin


The espressif documentation
https://espressif.com/en/support/explor ... rted-guide
says 0x40000 for eagle.irom0text.bin but I guess that's not the same as 0x00000.bin and 0x10000.bin. Is it correct to say that the addresses of the various files depends on what's in those files?

At any rate, I'm glad it finally works, thank you very much!