NodeMCU vs Bare ESP-12E?
Posted: Thu Mar 05, 2020 3:02 am
I confess that my problem statement isn't fully formed here. I am hoping that someone will be able to point me in a direction.
My situation is this.
1) I am working on a hobby project and have successfully used Arduino with a NodeMCU 1.0 board.
2) I am now trying to deploy my app onto a standalone ESP-12E module. I am stumped.
Background:
* I am well versed at this point in GPIO0/GPIO2/GPIO15, all of that.
* I am a professional embedded programmer and EE by trade. I've busted out my meters and oscilloscope and all that along the way. I mention this not out of any conceit, but just so you are aware that whatever mistakes I am making are not likely to be overly naive ones.
Situation:
1) I can talk to my ESP8266 with a FTDI cable. I see console messages at 74880 baud that say things like "boot mode (3,6)".
2) I *appear* to be able to successfully flash the device. I have used assorted tools, including the ESP8266 Download Tool, NodeMCU-PyFlasher, and the Arduino IDE. All of these appear to give successful flashes.
3) But when I go to reboot and then run my Arduino sketch (I am using Manual flash and reboot, not DTR/RTS, since the FTDI cable does not carry those signals over), it just fails. Boot loops or else gobbledy-gook on the console, depending on exactly what I try.
I fear that I may have pseudo-bricked the device? At one point during my efforts I told the Arduino IDE to Tools/Erase Flash/All Flash Contents.
Was that a mistake? Does this mean that I've deleted, for example, the nonOS-SDK?
Or did my "bare" ESP-12E come with no SDK at all and I need to install it?
I'm at the point of preparing to go back to bare bare metal and just going with the Espressif Getting Started guide, including possibly rebuilding the entire SDK. I have tried to reflash using the ESP8266 Download tool, but I don't currently understand all the "bin" and "blank" and "user" files you put into ESP8266 Download tool, and what values to use for addresses in the right-hand column.
I also took a wild stab in the dark at cloud-compiling my own NodeMCU build at NodeMCU-build.com, but after I flashed it, it fared no better - my Arduino sketch still dies after a reset.
I feel like somehow after I flash my Arduino sketch, the processor isn't restarting at the correct address. But I don't understand all the issues involved.
Any advice or tips out there? I've been at this for several days, and it's quite murky. I can't tell if I've hosed my device, or if I'm just doing something else wrong, or?? I could try another device, but the current device is now well-soldered into my project, and I'd be looking at a few hours to swap in another. My sense is that the device is just fine and that this is a software issue.
Thanks for any tips,
Brad
My situation is this.
1) I am working on a hobby project and have successfully used Arduino with a NodeMCU 1.0 board.
2) I am now trying to deploy my app onto a standalone ESP-12E module. I am stumped.
Background:
* I am well versed at this point in GPIO0/GPIO2/GPIO15, all of that.
* I am a professional embedded programmer and EE by trade. I've busted out my meters and oscilloscope and all that along the way. I mention this not out of any conceit, but just so you are aware that whatever mistakes I am making are not likely to be overly naive ones.
Situation:
1) I can talk to my ESP8266 with a FTDI cable. I see console messages at 74880 baud that say things like "boot mode (3,6)".
2) I *appear* to be able to successfully flash the device. I have used assorted tools, including the ESP8266 Download Tool, NodeMCU-PyFlasher, and the Arduino IDE. All of these appear to give successful flashes.
3) But when I go to reboot and then run my Arduino sketch (I am using Manual flash and reboot, not DTR/RTS, since the FTDI cable does not carry those signals over), it just fails. Boot loops or else gobbledy-gook on the console, depending on exactly what I try.
I fear that I may have pseudo-bricked the device? At one point during my efforts I told the Arduino IDE to Tools/Erase Flash/All Flash Contents.
Was that a mistake? Does this mean that I've deleted, for example, the nonOS-SDK?
Or did my "bare" ESP-12E come with no SDK at all and I need to install it?
I'm at the point of preparing to go back to bare bare metal and just going with the Espressif Getting Started guide, including possibly rebuilding the entire SDK. I have tried to reflash using the ESP8266 Download tool, but I don't currently understand all the "bin" and "blank" and "user" files you put into ESP8266 Download tool, and what values to use for addresses in the right-hand column.
I also took a wild stab in the dark at cloud-compiling my own NodeMCU build at NodeMCU-build.com, but after I flashed it, it fared no better - my Arduino sketch still dies after a reset.
I feel like somehow after I flash my Arduino sketch, the processor isn't restarting at the correct address. But I don't understand all the issues involved.
Any advice or tips out there? I've been at this for several days, and it's quite murky. I can't tell if I've hosed my device, or if I'm just doing something else wrong, or?? I could try another device, but the current device is now well-soldered into my project, and I'd be looking at a few hours to swap in another. My sense is that the device is just fine and that this is a software issue.
Thanks for any tips,
Brad