HUZZAH ESP Lua versions and flash address

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
heiko1234
 
Posts: 4
Joined: Mon Nov 16, 2015 1:06 pm

HUZZAH ESP Lua versions and flash address

Post by heiko1234 »

Hey,
the Huzzah ESP8266 comes with NodeMCU version 0.9.5 which is somewhat outdated (they are at 1.4/1.5 now).
When flashing newer versions they write that I have to also burn some other files
Also, in some special circumstances, you may need to flash blank.bin or esp_init_data_default.bin to various addresses on the flash (depending on flash size and type).
from https://github.com/nodemcu/nodemcu-firm ... -the-flash

Does anyone know the parameters for the Huzzah Esp?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: HUZZAH ESP Lua versions and flash address

Post by adafruit_support_mike »

We use nodemcu-flasher: https://github.com/nodemcu/nodemcu-flasher

It should do whatever is necessary.

User avatar
heiko1234
 
Posts: 4
Joined: Mon Nov 16, 2015 1:06 pm

Re: HUZZAH ESP Lua versions and flash address

Post by heiko1234 »

Thank you for your reply. My understanding is that the flasher is Win* only - which is not helpful on OS/X or any Linux (Raspberry comes to mind :-)

Could you please try to see if nodemcu-flasher lists the values somewhere and post them here?

User avatar
heiko1234
 
Posts: 4
Joined: Mon Nov 16, 2015 1:06 pm

Re: HUZZAH ESP Lua versions and flash address

Post by heiko1234 »

So looks like this is an ESP12 board (which I figured out via the FCC report and then later found etched on that metal shield on the board :-).
Reading

Code: Select all

node.info()
on the board reports 4MB Flash, so I think I can proceed with http://nodemcu.readthedocs.org/en/dev/e ... x-firmware

[update]

The above seems ok, was able to flash a new firmware with:

Code: Select all

$ python esptool.py --port /dev/cu.usbserial-AI02CSDU write_flash 0x00 ../nodemcu-master-15-modules-2016-02-18-08-33-47-integer.bin 0x3fc000 ../esp_iot_sdk_v1.4.0/bin/esp_init_data_default.bin
@adafruit: it would be cool if you could explicitly mention either the above or at least ESP-12 module with 4MB flash on https://www.adafruit.com/products/2471 . Perhaps also link to the above mentioned "Upgrading from 0.9.5" document.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: HUZZAH ESP Lua versions and flash address

Post by adafruit_support_mike »

I'll mention that to the folks who take care of the Learning System.

Thanks for posting the information on how you got it to work!

User avatar
bryanthompson
 
Posts: 4
Joined: Tue Aug 26, 2014 8:28 pm

Re: HUZZAH ESP Lua versions and flash address

Post by bryanthompson »

I'm trying to upgrade and am getting it to flash just fine, but on boot it is spraying noise to the serial port so I'm thinking i dont have all of the appropriate modules selected. Can anyone tell me which modules are recommended for a basic install? Thank you

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: HUZZAH ESP Lua versions and flash address

Post by adafruit_support_mike »

Check to make sure you have the correct baudrate. IIRC, the ESP8266 starts off at 74800.

User avatar
bryanthompson
 
Posts: 4
Joined: Tue Aug 26, 2014 8:28 pm

Re: HUZZAH ESP Lua versions and flash address

Post by bryanthompson »

Thanks Mike. I don't think that's the problem though -- I have tried on that and every other common baud rate.

After flashing with 1.5 and restarting, the blue LED on the esp module flashes wildly and luatool is unable to upload anything. I can re-flash, however. Going back to 0.9 makes it all work fine again.

I used the cloud builder for mcu, but there are a lot of options for modules to include. My best guess at this point is that there are modules I ought to be selecting that I'm not aware of. Do you know which modules were included in the 0.9 release that works?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: HUZZAH ESP Lua versions and flash address

Post by adafruit_support_mike »

Which ESP8266 board do you have?

User avatar
bryanthompson
 
Posts: 4
Joined: Tue Aug 26, 2014 8:28 pm

Re: HUZZAH ESP Lua versions and flash address

Post by bryanthompson »

The huzzah feather, which comes with 0.9.6.

I posted in this thread because OP seemed to have a similar issue, is also using the nodemcu cloud builder, and had 15 packages selected. OP seems to have gotten it to work while no combination of "modules" ive selected have made it work.

By default, the builder has 7 selected. OP has 15, and theres no documentation that notes which modules were included in the 0.9.6 build, which works.

I have selected a variety of software modules, built the firmware, erased, and uploaded (and ive tried every combination with and without the separate flash step for the init script) and what i end up with is a fast blink on the esp module's blue led and luatool fails to connect and upload a script or communicate with the module. If i erase and re-flash with 0.9.6, it all works again.

User avatar
bryanthompson
 
Posts: 4
Joined: Tue Aug 26, 2014 8:28 pm

Re: HUZZAH ESP Lua versions and flash address

Post by bryanthompson »

Update: I cloned fresh versions of esptool.py and luatool and tried flashing using the same process and images. This time, the erase_flash step took significantly longer (it returned almost instantly before) and the output from my flash command:

$ python esptool.py --port /dev/tty.SLAB_USBtoUART write_flash -fm dio -fs 32m 0x00 nodemcu-master-8-modules-2016-09-23-19-06-27-float.bin 0x3fc000 esp_init_data_default.bin

Looked more happy.

I tried a few baud rates on screen, and finally got the following:
$ screen /dev/tty.SLAB_USBtoUART 115200
Formatting file system. Please wait...

NodeMCU custom build by frightanic.com
branch: master
commit: 8e48483c825dea9c12b37a4db3d034fccbcba0bf
SSL: false
modules: file,gpio,net,node,rtctime,tmr,uart,wifi
build built on: 2016-09-23 19:05
powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
lua: cannot open init.lua
>

After entering node.restart() the device appears to have restarted and I can upload files.

The problem seems to be that my esptool was old, it didn't upload everything properly, and/or that I didn't know that it was sitting and waiting to format the file system.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: HUZZAH ESP Lua versions and flash address

Post by adafruit_support_mike »

Glad to hear that you got it working!

User avatar
Cagey
 
Posts: 5
Joined: Sun Oct 09, 2016 7:57 pm

Re: HUZZAH ESP Lua versions and flash address

Post by Cagey »

I am trying to reflash an ESP12 module and have managed to update the firmware using the NodeMCU tool. I had to build a custom firmware using the cloud service above but again I cannot get it to work. Once I reset the module it just rapidly flashes the blue led and does not respond. I have tried all the baud rates and just get blocks on 230400 and gibberish on everything else.

I think what I really need is the "stock" ESP12 image. Can you point me to such a thing please? The link above is for an earlier module...

Many thanks

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: HUZZAH ESP Lua versions and flash address

Post by adafruit_support_mike »

The NodeMCU installer is what we use in production. For other firmware, you'll probably need to check over at http://esp8266.com/

User avatar
Cagey
 
Posts: 5
Joined: Sun Oct 09, 2016 7:57 pm

Re: HUZZAH ESP Lua versions and flash address

Post by Cagey »

Thanks Mike. Yes, that is the tool that I am using also. What I am asking is which file you upload using that tool please? I tried some custom builds but there must be a default file that you are flashing. Do you have a copy of that please?

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”