-
Notifications
You must be signed in to change notification settings - Fork 13.3k
EEPROM location was changed #6531
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
Comments
Current eeprom location:
Arduino/libraries/EEPROM/EEPROM.cpp Line 44 in 5d609fd
Arduino/tools/sdk/ld/eagle.flash.4m2m.ld Line 18 in 5d609fd
In 2.5.2: Arduino/tools/sdk/ld/eagle.flash.4m2m.ld Line 18 in 8b899c1
By calliing Sorry for this change, it should be documented for next release. |
You can also try to add 4096 to the offset of your data, without calling |
Working. Thank you. For what old address will be reserved in next framework version? |
It should not change anymore. |
May I assume, that now we have 8 KB of EEPROM? Many thanks for help. It is working perfectly. |
@byq13 #5989 addressed a bug in the calculation of the SPIFFS end address. In a cormer case, it could theoretically corrupt the filesystem. I now realize the fix shifts the location of tbe EEPROM, so after an update the EEPROM data wouldn't be seen by the class. Notes: |
For 2.6, I'll fix the EEPROM sector to point back to the same address as it was, by making boards.txt.py calculate it using the old (busted) formula and removing the implicit calculation in eeprom.cpp. This will make EEPROM backwards compat w/o any changes for users. For 3.0 we may move it to the last sector after the FS, but IMO that's probably not worth the trouble and breakage. |
@earlephilhower |
Thanks for checking that. This bug report was very timely and caught a subtle problem! |
When the FS_END was adjusted to end on a full block (i.e. rounded down) to avoid filesystem issues, but _FS_end was changed. The EEPROM library used _FS_end to implicitly calculate the start of the EEPROM data, so this means after the _FS_end fix, EEPROM data written with prior releases would "disappear." Avoid the issue by explicitly calculating the EEPROM start location in the linker, using the same formula as prior release. Fixes esp8266#6531
Please try PR #6537 . It should restore the location so you can read old data correctly. |
When the FS_END was adjusted to end on a full block (i.e. rounded down) to avoid filesystem issues, but _FS_end was changed. The EEPROM library used _FS_end to implicitly calculate the start of the EEPROM data, so this means after the _FS_end fix, EEPROM data written with prior releases would "disappear." Avoid the issue by explicitly calculating the EEPROM start location in the linker, using the same formula as prior release. Fixes #6531
In the thirst place I have update to v2.5.2 and it was working ok, but when I have downloaded the newest branch from GIT, then I have discovered problem with EEPROM.
In the newest branch EEPROM location was changed.
My problem is that I have put authentication key there. Now I have to have access to it.
EEPROM function is working fine. In v2.52 and with the newest. It is just not the same part of the flash memory.
How can I have access to old EEPROM location with the newest Arduino framework from GIT?
ESP-12S with 4MB, - 4M2M=4MB (FS:2MB OTA:~1019KB)
The text was updated successfully, but these errors were encountered: