Difference between firmwares esp8266_4mb and esp8266 ? #5946
Replies: 1 comment
-
Posted at 2017-12-27 by @MaBecker The main reason is that with a 4MB board it is possible to use a 4MB:1024/1024 flash map. With this map type a max flash size of 962560 byte and 16 pages to save code is defined. This flash areas are free to use:
Posted at 2017-12-28 by Polypod Thanks @MaBecker for your reply, Things are ... more confusing now :P 1 / build 8266
and get
2 / build 8266 4mb
3 / build 8266 4mb combined found here : http://www.espruino.com/binaries/espruino_1v95_esp8266_4mb_combined_4096.bin. I think it's the one you are referring to. is it described somewhere ? It has 1700 vars, no Graphics. I used the "4mb-c1" you posted in the other thread, and it worked perfectly. I understand the flash available is only the last 2MB, so not possible to have modules running from flash.
(updated following)
For this version, you mention 16 pages of saved code available, that's 64kb. How is it possible to store as much code in them ? If I use the WebIDE, the board throw a UNFINISHED STRING when the transfer reach 10kb. I guess there is no memory for larger transfer. Is there another way ?
Posted at 2017-12-28 by @MaBecker Espruino offers these two builds for esp8266 to download:
Check README_flash.txt how to use esptool.py for different flash sizes ( 4MB 1024/1024 note is waiting for commit) Not sure if E.setBootCode is the best way in this case Add the initial parts in Posted at 2017-12-28 by Polypod Thanks again Mabe, for your reply. I made a copy/paste mistake earlier, now it's updated. The esp8266 4mb not combined version (found here) get me :
It says 512/512. Is it the first or the second build ? Using the 4mb combined, from the WebIDE, I managed to upload 16kb of code, 4kb by 4kb, and the total took 1300 blocks, and it can't be saved with save(), too big :
I fail to grasp the rationale behind these 16 pages for saved code and how are we supposed to fill them. Ok, I can fill 12kb of the 64kb reserved for saving code. Is there a way to use the resting 52kb ? is there a way to execute them from flash (like with save-on-send/E.memoryArea) ? Posted at 2017-12-28 by @MaBecker
Yes, correct with setting from ESP8266_BOARD.py Note: save() will compress the code and then write to flash What about Minification? Hmm, are you sure process.memory() is the correct output, because it say What about your heap size?
As more vars you configure as less heap memory you have :-) So with GRAPHICS and 1600 var get "freeHeap": 10936 to work with. Posted at 2017-12-28 by Polypod It was 16kb of minified code I uploaded and tried to save. This is the output I get from the "4mb combined", 1700 blocks and no graphics:
Posted at 2017-12-28 by @MaBecker Graphics is a build in module, what about some reading on how to use modules ... try this code as a simple check if the firmware has Graphics included
Posted at 2017-12-29 by Polypod Thanks a lot Mabe for all your replies. I learned a few things, but honestly, I still feel a bit lost between builds, flash maps, etc. It seems there is 1700 blocks no graphics in the 4mb combined build from http://www.espruino.com/binaries/espruino_1v95_esp8266_4mb_combined_4096.bin.
Posted at 2017-12-29 by @MaBecker
This is how the release 1v95 looks like:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-12-19 by Polypod
Hi,
I have a esp8266 board with 4mb. I can safely run both of these versions right ?
I know there is a difference between these two configurations of firmware. The 4MB version has additional graphics library, but only 1600 jsvars (and not 1700). This is defined by these files :
https://github.com/espruino/Espruino/blob/master/boards/ESP8266_BOARD.py
https://github.com/espruino/Espruino/blob/master/boards/ESP8266_4MB.py
But why does the code save at a different place ? The 4MB version saved code use 16 pages of flash (64kb) instead of 3 (kb), but the board still cannot take more than 10kb at once, when I use the WebIDE. Is there a way to use these pages in the _4mb firmware ?
In the 4MB version, save() erase the 6 first pages returned by require("Flash").getFree(), I use for my custom modules to run from flash. Possibly caused by the 16pages of flash erased. But I don't understand, are they free to use or not ?
Beta Was this translation helpful? Give feedback.
All reactions