How to access internal flash on esp8266?


#1

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)
print('reading')
print(ff[0],ff[1],ff[2])

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


#2

Can anybody help me? Thanks!


#3

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.


#4

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