New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a additional ESP8266 board with 4MB:1024/1024 #1110
Comments
When you do this, please can you also make a |
ESP8266_4MB_BOARD.py Perhaps should be ESP8266_4MB.py 1mb for save area seems a lot! |
Good point! Yes of course.
ok so it is ESP8266_4MB.py |
Good point. 1MB does seem like overkill. I guess even 50k would be more than enough. Personally I'd say you should pack everything into the first 1MB (including saved code), and then you can leave a full 3MB for the user to do what they want (including 1MB for wifi firmware updates and still 2MB free for user data). |
so we have 13 pages for save using 4MB: 1024/1024 gives you 2 times 1 MB user flash
and add the rest can be added as free Flash Areas, not sure if it makes sense to have to big areas
|
Just wondering - could we not just create a 1MB image? It would then be compatible with all 1MB devices too - so pretty much everything, it just wouldn't allow OTA firmware updates on 1MB parts? |
ok, fs why not, just have to check that there is enough heap space left. |
fs shouldn't take up heap. I guess if it does, it might be a code page table that does - but it should be easy enough to put in flash. |
perfect, so module fs is set too. |
I am looking for a greater save() size. I use 1183 JSVars and have 9k of code so 12KB of storage is not enough. A save() size of 64KB or 128KB would be nice. |
Hi @MaBecker! Would you mind sharing the board file and other required changes before it gets to master? |
@opichals check https://github.com/MaBecker/Espruino
Edit: Sorry it is broken, have to fixit ..... |
@Kyklas ok lets start with 16 pages for save() |
@gfwilliams continue working on this issue - please let me know if this is the correct way. My understanding is that
will create a
and so on.... |
Sounds good - but I'd ditch the change to the Makefile and would put https://github.com/espruino/Espruino/blob/master/boards/PUCKJS.py#L43 |
THANKS, that makes it very simple! |
Next steps:
|
I would like to test a firmware with greater storage. @MaBecker if you have a image available I would like to try. I have ESP-12F devices i.e 4MB flash. I am wondering what the ESP8266 RAM limitations are. How much RAM is available to execute JS ? Is JS Code dynamically loaded from Flash for execution ? |
Hi @Kyklas, sorry not now, at the moment I am very busy with other things. |
@MaBecker hi, I follow the method you say, compile, but the system_get_flash_size_map function always returns 4, what is the problem? |
Or, send a 1MB file plus esp_init_data_default.bin and blank.bin, will try that |
thx,but where are esp_init_data_default.bin and blank.bin downloading? |
@gfwilliams not sure if this is what you have in mind
|
Splitting 2x1MB up in 4x256k on third partition and 1x1008k on forth partition - any comments? |
For those who like to sneak in, just committed to my Espruino fork. |
@MaBecker - please add:
This will use the last 1Mb, at location 3Mb as a file system. |
@wilberforce - fyi: the third partition is not completely free on a 4MB 1024/1024, but second is totaly free, so I will change the addFlashArea settings like this:
|
adding FILESYSTEM and FLASHFS eats to much heap space, is there optimization potential in this libraries?
|
Unfortunately with 4096 flash page size,. it also requires 4096 of RAM as the current buffer for read and write operations. So it will always require at least this additional space. Possibly some of the strings could be moved to ROM, however I'm not sure it is worth the effort. |
Summary:
|
Have to give up to save wifi and code in first partition, because
|
adding 'FILESYSTEM' and 'FLASHFS' make no sense, because it is using to much heap space. I think Flash storage Module, any js type , web pages, css, js and images or something similar would be nice to have for systems with poor resources like the ESP8266. |
@gfwilliams please take a brief look and give some advice to make sure that this is still going in the right direction - thanks |
Looks fine to me... |
@MaBecker : Thank you for the release of the 64k flash save memory. @ALL : I have downloaded and flash the new firmware on my ESP8266 yesterday. Unfortunately I am still facing an "Out of Memory" errors. I think i may have just too much JS Code/Vars for the ESP to handle. I would like to know how much JS Code I can have in the ESP RAM. The IDE reports around 9k of JS Code sent. I am using the MQTT module and using it with so much code leads to errors. I am using close to 700+ JS Vars as well. How is the RAM Memory of the ESP8266 split between JS Code and JS Var ? Could http://www.espruino.com/EspruinoESP8266 be updated to bring information about the limitation of the ESP8266 ? I may go for the ESP32 since the ESP8266 limitations are reach with program with moderate complexity. |
Inspired by @pedro [4MB: 1024/1024](Proposed, and implemented, some enhancements (1Mb + 1Mb firmware, resizable jsvars size, ...)) it is time to create a ESP8266_4MB_BOARD.py to have more space for firmware, modules and flash and keep ESP8266_BOARD.py as is.
@gfwilliams please add label ESP8266
The text was updated successfully, but these errors were encountered: