-->
Page 1 of 1

help w/ getting basic blink example running on NodeMCU board

PostPosted: Sat Dec 12, 2015 10:56 am
by jadamcrain3
Hi all,

If this isn't the correct channel, please let me know where I should have posted this. I am struggling to get a blinky running on my nodemcu board. My end goal is to get a C++ communications library running on esp8266 that I've previously gotten running on AVR/ARM arduino boards using Atmel's tools, but I'm having trouble getting a basic example to run:

https://github.com/automatak/esp8266-dnp3

This was based on an example that I found here:

https://github.com/esp8266/source-code- ... ter/blinky

You can pretty much ignore my module definitions for my C++ library. They're not being included or linked ATM. I am using a newly installed esp-open-sdk toolchain (https://github.com/pfalcon/esp-open-sdk).

Everything builds correctly and the unit appears to flash correctly, but nothing blinks. I've tried LEDs on all the GPIO pins, nothing. The board is definitely good b/c I've been able to build and flash blink examples using the Arduino 1.6.6 IDE. Unfortunately, I can't use the Arduino toolchain b/c it has a very particular format it expects libraries to be in. Refactoring my existing x-platform C++ library to "Arduino format" is unacceptable.

I am starting to believe that the issue is in one of two areas:

1) I am not correctly creating the binary flash image from the elf file
2) I am not correctly flashing the unit

Does anyone know the magic incantations for esptool.py for nodemcu to perform these actions? The Arduino toolchain appears to use a C-based .exe for doing the flashing.

Other questions:
Why do some examples create a single binary blob from the elf and flash to 0x00000 whereas the default seems to be to create two blobs and flash to 2 separate addresses.

What I really need is a working starting point for a nodemcu board w/ a working makefile.

Many thanks for any help you can provide.

-Adam

Re: help w/ getting basic blink example running on NodeMCU b

PostPosted: Mon Dec 14, 2015 2:26 pm
by jadamcrain3
The magic incantation for the NodeMCU is use the "dio" spi mode when flashing. This entails adding the flag "-fm dio" to the esptool.py command line after the "write_flash" command.

Re: help w/ getting basic blink example running on NodeMCU b

PostPosted: Tue Mar 22, 2016 1:31 am
by thewall7
jadamcrain3 wrote:The magic incantation for the NodeMCU is use the "dio" spi mode when flashing. This entails adding the flag "-fm dio" to the esptool.py command line after the "write_flash" command.


Thanks so much for this answer..phew... :D