How to access internal flash on esp8266?


I tried to access the internal flash on a NodeMCU V2 board with code following, the code was halt on the line ‘ff = flash.FlashFileStream(start_address,512)’, because I don’t see ‘reading…’ on the console. I’ve tried different start_address but with no luck.

start_address = 0x402F0000
ff = flash.FlashFileStream(start_address,512)

It’s recommended to ‘begin using it from secure addresses towards the end the bytecode (start address of the bytecode can be found in the log console of Zerynth Studio during the uplink operation), leaving a minimum safe place to minimize the chance of clashes.’ but I don’t understand how to find the secure addresses. Can someone help me to access the internal flash? and here’s the output while uploading:

[info] Handshake
[info] symbols: 3
[info] membase 3FFF163C
[info] romstart 4026F000
[info] flash 00091000
[info] Erasing flash
[info] Sending Bytecode: 36144 bytes ( available 593920 )
[info] Uplink done


Can anybody help me? Thanks!


Hi @Zhang_Lance,

unfortunately this seems an issue related to our implementation of the esp8266 read flash function and we will surely fix it with the next patch.
Let me know if you have an urgent need.


there’s no rush, but can you tell me when the next patch will be released?


Hi @Zhang_Lance,

we do not have a precise date a the moment, but you can expect it roughly in two/three weeks.