I've got a bunch of ESP-01 (ESP8266) which are pre-flashed with some AT firmware from Ai-Thinker. When I boot them up, I see "Ai-Thinker Technology Co. Ltd. ready". I've got a hobby project where I program an ATMEGA16 to interface a wifi connection via AT commands over serial/UART to the ESP. This is quite cumbersome, and requires a lot of hardware (crystals etc).
The ESP units are capable of "hosting" and running a small program directly on the chip, so I want to learn how to do that Looking at an Instructable, it seems so easy; just upload a lua file (init.lua) and it will run. However, I then understand that the ESP will need to be running the NodeMCU firmware (obviously) which expects this file + can interpret and run it.
So then I got esptool and made a custom build of NodeMCU (at https://nodemcu-build.com/) using the 7 default/suggested modules (file, GPIO, net, node, timer, UART, WiFi). Esptool seems to be able to successfully flash the binary (with GPIO0 pulled low/GND) but after reboot I see problems in the log:
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 27444, room 16
tail 4
chksum 0xef
load 0x00000000, len 0, room 4
tail 0
chksum 0xef
ho 12 tail 0 room 4
load 0x00000000, len 0, room 12
tail 0
chksum 0xef
csum 0xef
csum err
ets_main.c
Note the "csum err" at the end. The flashing succeded at 100% and even verified the hash of data.
So, I try to erase the flash, and revert back to the AT firmware -- downloaded from Released Firmware — ESP-AT User Guide documentation but then I get this log from the bootloader (at 74480 baud):
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40210010, len 711800, room 16
and I don't see any "ready" (at 115200 baud).
Where do I go from here? Am I making life unnecessarily hard by using the (old?) ESP8266, rather than the new ESP32 modules? What I want is a (relatively) simple + small unit for IoT projects -- sometimes running directly off the ESP, other times used with a separate ATMEL chip.