Anudeep
Anudeep

Reputation: 11

Issues with custom build NodeMCU Firmware, After flashing the custom build firmware to ESP-12E module giving the following error messages

Flashed NodeMCU_float_0.9.6-dev_20150704 on ESP-12E module gpio,timers,file,wifi, mqtt ,tcp and udp connections are working with no issues but i tried HTTP requests like HTTP GET and POST now this time it's giving error

attempt to index global 'http' (a nil value))

HTTP GET request code

http.get("http://httpbin.org/ip", nil, function(code, data)
    if (code < 0) then
      print("HTTP request failed")
    else
      print(code, data)
    end
  end)

it's giving the error messages as

PANIC: unprotected error in call to Lua API (test.lua:1: attempt to index global 'http' (a nil value))

I thought that the Firmware version i am using Flashed NodeMCU_float_0.9.6-dev_20150704 is not included HTTP module and built the custom build firmware with http,mqtt,net,node,wifi,timer,uart,file and gpio after flashing this custom build firmware contentiously sending the error message

ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 29308, room 16 
tail 12
chksum 0x9c
ho 0 tail 12 room 4
load 0x3ffe8000, len 2228, room 12 
tail 8
chksum 0xe5
load 0x3ffe88b4, len 8, room 0 
tail 8
chksum 0x86
csum 0x86
Fatal exception 0(IllegalInstructionCause):
epc1=0x40270858, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4026d205, depc=0x00000000

with 748800 baud rate

Upvotes: 1

Views: 695

Answers (1)

Marcel St&#246;r
Marcel St&#246;r

Reputation: 23535

You need to make sure that you also flash the esp_init_data_default.bin to its correct location.

Get Espressif NON-OS SDK 1.5.1 and extract esp_init_data_default.bin. Then flash it to address 0x7c000.

With esptool the command would be as follows:

esptool.py --port <USB-port-with-ESP8266> write_flash -fm dio -fs 32m 0x00000 <nodemcu-firmware>.bin 0x7c000 esp_init_data_default.bin

See http://nodemcu.readthedocs.io/en/master/en/flash/#upgrading-from-sdk-09x-firmware for details.

Upvotes: 1

Related Questions