-
Successful save prints:
>save() =undefined Erasing Flash..... Writing................... ERROR: Too big to save to flash (16984 vs 12284 bytes) Deleting command history and trying again... Erasing Flash..... Writing.............. Compressed 27200 bytes to 11492 Checking... Running onInit()...
Unsuccessful save prints:
>save() =undefined Erasing Flash..... Writing.................... ERROR: Too big to save to flash (18205 vs 12284 bytes) Deleting command history and trying again... Erasing Flash..... Writing............... ERROR: Too Running onInit()...
-
I came across a few times with the same error: "No code in Flash" when I toggle power of ESP-12. This time root of the problem is the code size. If I remove some part of application code, it loads and executes well, and it starts on power toggle. If I re-add that part of (unimportant) code, my application works OK, but it doesn't start when power is toggled. If
load()
function is executed, it prints "No code in Flash":_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.171 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >load() =undefined No code in flash!
Since ESP-12 has 4MB of flash memory, it shouldn't related with memory or application size, right?
-
@tve
require("ESP8266").logDebug(false)
solved the issue. Thank you... -
I'm using
Serial2.TX
for a specific purpose and withoutRX
pin, it satisfies my needs. As of now, I can useSerial2
by sending my datanaber
(meanshello
) as normal.With a fixed interval,
Wifi
module sends some garbage toSerial2
, so what I could capture is as follows:ernabernabernabernabernabernabernabernaber849614> Wifi event: probe request from station 74:f0:6d:09:91:54, rssi = -58 849644> Wifi event: probe request from station 74:f0:6d:09:91:54, rssi = -61 nabernabernabernaber850186> Wifi event: probe request from station 00:26:ab:e8:43:82, rssi = -61 850188> Wifi event: probe request from station 00:26:ab:e8:43:82, rssi = -62 850256> Wifi event: probe request from station 00:26:ab:e8:43:82, rssi = -62 850298> Wifi event: probe request from station 00:26:ab:e8:43:82, rssi = -62
How can I make these logs stopped?
-
c:\python27\python ..\esptool.py --port COM15 --baud 230400 write_flash --flash_freq 40m --flash_mode dio --flash_size 32m 0x0000 "boot_v1.5.bin" 0x1000 espruino_esp8266_user1.bin 0x37E000 blank.bin
This options didn't work for me with
espruino_1v86.tve_master_8d2f1b4_esp8266
. There is noboot_v1.5.bin
file the build in your link.Edit
As the latest build (1v86.171) uses
boot_v1.4....
, the old flashing options work as expected. -
I figured out the problem: It's all about my bundling script that uses uglifyjs where it drops
lastAddr
variable in FlashEEPROM by claiming "it's declared but not used". I changed appropriate flag of uglifyjs and all went ok. -
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.89 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >D0.write(0) =undefined >require('crypto') =function () { [native code] } >require('crypto').AES =undefined >require('crypto').PBKDF2 =undefined >process.env.GIT_COMMIT ="776a766f48165700aac7966fa3adde7aa9a6088f"
-
@Wilberforce I think that library will work for me, let me try it out.
@tve Actually we don't have to stream in a non-stop manner, we can take a breath for WDT in the process.
@allObjects you hit the nail on the head... We were considering putting another MCU (eg. STM32F030) for this kind of stuff...
-
-
Hi @tve,
Latest build seems to use espressif sdk 1.5, but README gives a command example for 1.4(b1):
ceremcem@cca-erik:espruino_1v86.tve_master_8d2f1b4_esp8266$ ls
blank.bin boot_v1.5.bin esp_init_data_default.bin espruino_esp8266_user1.bin >espruino_esp8266_user2.bin README_flash.txt wiflash.sh
ceremcem@cca-erik:espruino_1v86.tve_master_8d2f1b4_esp8266$ cat README_flash.txtHow to flash Espruino esp8266
*** To flash a 512KB esp8266 (e.g. esp-01) using the serial port use:
esptool.py --port [/dev/ttyUSB0|COM1] --baud 460800 write_flash \
--flash_freq 40m --flash_mode qio --flash_size 4m \
0x0000 "boot_v1.4(b1).bin" 0x1000 espruino_esp8266_user1.bin 0x7E000 blank.bin*** To flash a 4MB esp8266 (e.g. esp-12) using the serial port use:
esptool.py --port [/dev/ttyUSB0|COM1] --baud 460800 write_flash \
--flash_freq 80m --flash_mode qio --flash_size 32m \
0x0000 "boot_v1.4(b1).bin" 0x1000 espruino_esp8266_user1.bin 0x37E000 blank.bin*** Get esptool.py from https://github.com/themadinventor/esptool
*** To flash a 4MB esp8266 (e.g. esp-12) via wifi use (with appropriate hostname):
./scripts/wiflash espruino.local:88 espruino_esp8266_user1.bin >espruino_esp8266_user2.binWhen I load the firmware with the same command I was using before (which is just the same as in this README) by replacing
boot_v1.4(b1).bin
withboot_v1.5.bin
, I can only see random(?) hex flow in the serial console:f2nn\0x9elnn\0x9c\0xe2\0xec\0x0cb\0x1cp\0x0clb\0x0elrlp\0xf2n\0xe0\0x10\0x02\0x0c\0x0c\0x82\0x0cl\0x0c\0x0c\0x0c\0x0c\0x0c\0x0cb\0x0cn\0xe2|\0x02l\0x0cl\0x8e\0x8eb\0x8c\0xf2nn\0xee\0x00l\0x8c\0x8el`\0x02\0x90\0x12\0x12nn\0x0cl`\0x02\0x0e\0x02nr\0x8e\0x92\0x92n\0x0c\0x0c\0xe2\0xecl`\0x02p\0xf2n\0xe0\0x10\0x02\0x0c\0x0cr\0x8c\0x9c\0x9c\0xe2\0xe0\0x0c\0x0c\0x0c\0x0cb\0x0cn\0xe2|\0x02\0xec\0x8e\0x8e\0x8eb\0x8c\0xf2nn\0xee\0x00\0x0c\0x0cl`\0x02\0x90\0x12\0x12nn\0x0cl`\0x02\0x0e\0x02nr\0x8e\0x92\0x92n\0x0c\0x0c\0x02\0x8cl`\0x02p\0xf2n\0xe0\0x10\0x02\0x0c\0x0cr\0x8c\0x9c\0x9c\0xe2\0xe0\0xecl\0x0c\0x0cb\0x0cn\0xe2|\0x02l\0x8er\0x8c\0x0cb\0x8c\0xf2nn\0xee\0x00\0x0c\0x0cl`\0x02\0x90\0x12\0x12nn\0x0cl`\0x02\0x0e\0x02nr\0x8e\0x92\0x92n\0x0c\0x0c\0xf2ll`\0x02\0x0er\0x92\0x92n\0x0c\0x0c\0xf2ll`\0x02rl\0x8c\0x8cn\0x9c\0x8c\0xf2nn\0x9e\0x8c\0x9e\0xe2\0x8cr\0x12nnn\0x8c\0x0cl\0x8cbrrl\0x00\0x0c\0xec\0x12\0x92l\0xec\0x12\0x92\0x92\0x82\0x02\0x0c\0x0c\0x0c\0x0c\0x0c\0x8c\0x0c\0x0c\0x0clll~rl\0x00\0x0c\0xec\0x12\0x92llln\0x9c\0xe2\0x00\0x0c\0x0c\0x0c\0x0c\0x0c\0x0c\0x8c\0x0cl\0x92ll\0x0el\0x00\0x0c\0xec\0x12\0x92l\0x8c\0x90n\0xe0\0x8e\0x02n\0xec\0x92n~\0x12\0x02\0x8c\0x8cll\0xe0\0x80b\0x0c\0xec\0x8cllpb\0x82\0x02br\0x82\0x8c\0xecl`nl\0x8ep\0x8c\0xecl`bl`\0x02l\0x92\0x92n\0x02\0x0c\0x9en\0x8c\0x92\0xe2nl\0x9e|\0x12b\0x12\0x0c\0x0c\0x02l\0x0c\0x0c\0x0cl`\0x02rl\0x8c\0xe2\0xf2\0x92p\0x02\0x82nn\0x80l\0x12ll\0x0c\0x0c\0x02l\0x8eb\0xec\0x8e\0x02\0x0c\0x0c\0xe2\0xe2\0x92`\0x02rl\0x00l\0x9c\0x9e|\0x00\0x8cl\0xe0|\0x02\0x0c\0x0c\0x0c\0x8c\0x0cl\0xe
Loading seems to success though:
Connecting... Erasing flash... Took 0.08s to erase flash block Wrote 4096 bytes at 0x00000000 in 0.4 seconds (82.1 kbit/s)... Erasing flash... Took 1.68s to erase flash block Wrote 478208 bytes at 0x00001000 in 46.4 seconds (82.5 kbit/s)... Erasing flash... Took 0.08s to erase flash block Wrote 4096 bytes at 0x0037e000 in 0.4 seconds (85.5 kbit/s)... Leaving...
-
I need to dump a file content (while making some little changes on the fly) from ESP12 to its serial console. Filesize is about 140 KB (an image file), so the content shouldn't be copied into the RAM.
FlashEEPROM.readMem()
still (as of 1v86.66) seems to cause reset.Is there any workaround or something?
-
my.socket
:={ "type": 0, "#onconnect": function (e) { ... }, "opt": { "host": "example.com", "port": 1234 }, "sckt": 18, "conn": true, "#ondata": function (e) { ... }, "#onerror": function () { ... }, "#onclose": function () { ... }, "#onend": function () { ... }, "dSnd": "", "dRcv": undefined }
my.socket.write("hehe")
actually sends "hehe" to the server.my.socket.close()
:>my.socket.close() Uncaught Error: Function "close" not found! at line 1 col 11 my.socket.close() ^
But,
Socket.end()
seems to work as expected, with an acceptable delay. -
You mean by
this.socket.close()
? It's not working sinceUncaught Error: Function "close" not found!
.Here is my current workaround: Before calling
net.socket()
, I delete all members ofMyClass.socket
manually:... for (var member in this.socket) delete this.socket[member]; this.socket = net.connect(...
Edit:
This workaround seemed to free some memory but obviously does not prevent old sockets from connecting server when possible, hence consuming memory. (I don't understand what is going on...)
-
Hi everybody,
Do we have an option to cleanup socket object without a hard reset?
I'm connecting to a server with a tricky path and I need to try to reconnect with
net.connect
on any error. But this process consumes memory on every attempt.Minimal pseudo-like code is as follows:
function MyClass(....){ this.socket = null } MyClass.prototype.connect = function (){ this.socket = net.connect(....) } var my = new MyClass(..) my.connect() my.connect() my.connect()
-
-
There is no console, so I can not
reset()
. I am able toerase flash
and re-flash the firmware, but it didn't help.It may sound weird: although I can flash/re-flash and use other ESP's, I am not able to do so with this ESP as I told; but my colleague is able to flash it. That means it's absolutely releated with my computer (but how come I could flash/re-flash/load-app with the other ESP's?)
-
Yes, I would use it on ESP8266. You don't mean it's not implemented by hardware, do you?
-
-
-
Hi,
One of ESP8266 in our hands is not working while throwing the only message upon boot like the following:
e0\0x0c\0x0c\0x0c\0x0cb\0x0cn\0xe2|\0x02\0xec\0x8e\0x8e\0x8eb\0x8c\0xf2nn\0xee\0x00\0x0c\0x8el`\0x02\0x90\0x12\0x12nn\0x0c\0x8e\0x0el\0x0e\0x02nr\0x8e\0x92\0x92n\0x0c\0x0c\0x92\0x02l`\0x02p\0xf2n\0xe0\0x10\0x02\0x0c\0x0cr\0x8c\0x9c\0x9c\0xe2\0xe0\0xec\0x0c\0x0c\0x0cb\0x0cn\0xe2|\0x02l\0x8e\0x8e\0x0cb\0x8c\0xf2nn\0xee\0x00\0x0c\0x8el`\0x02\0x90\0x12\0x12nn\0x0cl`\0x02\0x0e\0x02nr\0x8e\0x92\0x92n\0x0c\0x0cr\0x02l`\0x02\0x0er\0x92\0x92n\0x0c\0x0cr\0x02l`\0x02rl\0x8c\0x8cn\0x9c\0x8c\0xf2nn\0x9e\0x8c\0x9e\0xe2\0x8cr\0x12nnn\0x8c\0x0cl\0x8cb\0x8ebp\0x82lb\0x0el\0x00\0x0c\0xec\0x12\0x92l\0xec\0x12\0x92\0x92\0x82\0x02\0x0c\0x0c\0x0c\0x0c\0x0c\0x8c\0x0c\0x0c\0x8elll~rl\0x00\0x0c\0xec\0x12\0x92llln\0x9c\0xe2\0x00\0x0c\0x0c\0x0c\0x0c\0x0c\0x0c\0x8c\0x0cl\0x92ll\0x0el\0x00\0x0c\0xec\0x12\0x92l\0x8c\0x90n\0xe0\0x8e\0x02n\0xec\0x92n~\0x12\0x02\0x8c\0x8cll\0xe0\0x80b\0x0c\0x0c\0x8e\0x8e\0x0c\0x12n\0x9eb\0x1c\0x92\0x8c\0x8eb\0x0crb\0x1c\0x92\0x8c\0x8eb\0x0c\0x12b\0x0ell\0x92\0x92n\0x02\0x0c\0x9en\0x8c\0x92\0xe2nl\0x9e|\0x12b\0x12\0x0c\0x0c\0x02l\0x0c\0x0c\0x0cl`\0x02rldon't use rtc mem data
The last sentence,
don't use rtc mem data
might give a clue but it's meaningless for me. What would it be? -
@tve if it weren't for you to warn me I would struggle with the following error:
Uncaught process.memory() didn't contain information about flash memory at line 1 col 215 ...tart||!a.flash_length)throw"process.memory() didn't contain ... ^ in function called from line 1 col 63 ...=new(require("FlashEEPROM")),Config.f.endAddr=Config.f.addr+... ^ in function "Config" called from line 1 col 611 ...inOutRx=14,cfg=new Config(1),defaultWifi={essid:"Android
Thanks....
-
Will it survive? :)