Left here for archival purposes.

User avatar
By sej7278
#5685
zeroday wrote:
alonewolfx2 wrote:
zeroday wrote:yes, the pre_build/0.9.4 is build with old xp vm. the file api works fine....

so how can we resolve file api problem? maybe its sdk problem?


I have push a fix to github. please have a try.


i still think its not working 100%

i can upload main.lua and write init.lua, and connect to wifi etc.

but calling dofile("main.lua") or node.heap() causes random reboots still, and node.restart() seems to bootloop rather than just reboot once and i had to power it off.

Code: Select all>     print(wifi.sta.getip())
192.168.0.209
>   file.open("init.lua","w")
> file.writeline([[print("Simon's ESP8266")]])
>   file.close()
> node.restart()
> bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> dofile("main.lua")
> IP:   192.168.0.209
print(node.heap())
14792
> node.restart()
> bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> print(node.heap())
15672
> dofile("main.lua")
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
Simon's ESP8266
> > node.restart()
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> print(node.heap())
15672
> dofile("main.lua")
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
Simon's ESP8266
> [A[A[A[B[B[B[B[B[B[B[B[B
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> dofile("main.lua")
> IP:   192.168.0.209

> print(node.heap())
14792
>  print(node.heap())
14792
>  dofile("main.lua")
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
Simon's ESP8266
>


just to be sure i am doing the right thing, i'm building using:

Code: Select allmake
cd app/
FLAVOR=debug ./gen_misc.sh
 ../tools/gen_flashbin.py ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin
mv eagle.app.flash.bin ../bin/
cd ../bin/


then i have to copy esp_init_data_default.bin and blank.bin from the pre_build/0.9.2/4M-flash directory, as those files don't seem to get created by the compilation process - is this correct, seems odd using 4mb 092 files for a 512k 094 firmware....?

the i flash using:

Code: Select all esptool.py --port /dev/ttyUSB0 write_flash 0x00000 eagle.app.v6.flash.bin 0x10000 eagle.app.v6.irom0text.bin 0x7c000 esp_init_data_default.bin 0x7e000 blank.bin


my resulting files are:

Code: Select all354K  eagle.app.flash.bin
7.2M  eagle.app.v6.dump
52K   eagle.app.v6.flash.bin
290K  eagle.app.v6.irom0text.bin
8.3M  eagle.app.v6.S
User avatar
By alonewolfx2
#5690
zeroday wrote:
alonewolfx2 wrote:
zeroday wrote:yes, the pre_build/0.9.4 is build with old xp vm. the file api works fine....

so how can we resolve file api problem? maybe its sdk problem?


I have push a fix to github. please have a try.

it seems fixed now. i tried some examples and working. but i am not sure.something went wrong. if i flash my esp with prebuild 20141222 binaries dnstest.lua working fine. myfile.lua working fine. when i build from source code , file system working but examples sometimes working sometimes just restarting esp.
if i direct upload 4 binaries to the chip with flashtool 0,9,3 free heap 16643 but firstly i am doing 4 binaries combining and flash to the chip free heap 17020. what am i missing?
User avatar
By sej7278
#5709
alonewolfx2 wrote:it seems fixed now. i tried some examples and working. but i am not sure.something went wrong. if i flash my esp with prebuild 20141222 binaries dnstest.lua working fine. myfile.lua working fine. when i build from source code , file system working but examples sometimes working sometimes just restarting esp.
if i direct upload 4 binaries to the chip with flashtool 0,9,3 free heap 16643 but firstly i am doing 4 binaries combining and flash to the chip free heap 17020. what am i missing?


lol, doesn't sound fixed then does it? i'm getting the same random reboots.

are you building the same way as me? what platform?
User avatar
By zeroday
#5718
sej7278 wrote:
i still think its not working 100%

i can upload main.lua and write init.lua, and connect to wifi etc.

but calling dofile("main.lua") or node.heap() causes random reboots still, and node.restart() seems to bootloop rather than just reboot once and i had to power it off.

Code: Select all>     print(wifi.sta.getip())
192.168.0.209
>   file.open("init.lua","w")
> file.writeline([[print("Simon's ESP8266")]])
>   file.close()
> node.restart()
> bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> dofile("main.lua")
> IP:   192.168.0.209
print(node.heap())
14792
> node.restart()
> bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> print(node.heap())
15672
> dofile("main.lua")
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
Simon's ESP8266
> > node.restart()
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> print(node.heap())
15672
> dofile("main.lua")
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
Simon's ESP8266
> [A[A[A[B[B[B[B[B[B[B[B[B
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
0�~�4�!��AOAE�a��$��2:�I��O&��C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4

POWERED OFF HERE

Simon's ESP8266
> dofile("main.lua")
> IP:   192.168.0.209

> print(node.heap())
14792
>  print(node.heap())
14792
>  dofile("main.lua")
bB�Ǧ�Sb9���J���ȝH�WΦ�C�NodeMcu 0.9.4 build 20141222  powered by Lua 5.1.4
Simon's ESP8266
>


just to be sure i am doing the right thing, i'm building using:

Code: Select allmake
cd app/
FLAVOR=debug ./gen_misc.sh
 ../tools/gen_flashbin.py ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin
mv eagle.app.flash.bin ../bin/
cd ../bin/


then i have to copy esp_init_data_default.bin and blank.bin from the pre_build/0.9.2/4M-flash directory, as those files don't seem to get created by the compilation process - is this correct, seems odd using 4mb 092 files for a 512k 094 firmware....?

the i flash using:

Code: Select all esptool.py --port /dev/ttyUSB0 write_flash 0x00000 eagle.app.v6.flash.bin 0x10000 eagle.app.v6.irom0text.bin 0x7c000 esp_init_data_default.bin 0x7e000 blank.bin


my resulting files are:

Code: Select all354K  eagle.app.flash.bin
7.2M  eagle.app.v6.dump
52K   eagle.app.v6.flash.bin
290K  eagle.app.v6.irom0text.bin
8.3M  eagle.app.v6.S


1, esp_init_data_default.bin and blank.bin are from espressif, they are identical for each flash size.
2, node.restart() works fine here. any one give it more test?