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
FlashEEPROM.readMem() causes reset on esp8266 #837
Comments
Thanks - I guess this might be something to do with how flash memory is mapped into the address space. Presumably For now, just use |
Okay, |
@ceremcem - can this be closed ? |
@MaBecker readMem still resets the esp8266 |
@gulfaraz - can you add sample code ? |
@MaBecker Is my sample code passing your tests? |
@ceremcem - did some testing
|
@gfwilliams - I guess this has todo with "ESP reads 4byte from flash" https://github.com/espruino/Espruino/blob/master/src/jswrap_espruino.c#L751 Can you give some hints how to fix this ? |
The ESP8266 is incapable of reading just a single byte from flash memory, it must read 4. There is a bit of code somewhere - an exception handler - which will handle the exception and read the single byte. I think @tve was against it at the time as it's pretty slow, but I think in this case it might be a good idea. Modifying all of Espruino so it never attempts to access a single byte element of a flat string at any point would be a bit of a nightmare (and would leave the code looking pretty ragged) - but the exception handler would fix the few cases where it was a problem. |
So its f.read() for now and lets close this. |
While following the documentation, I faced with the following situation:
The text was updated successfully, but these errors were encountered: