-
Notifications
You must be signed in to change notification settings - Fork 13.3k
update SDK to 2.1.0+ #3278
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
update SDK to 2.1.0+ #3278
Conversation
8MB/16MB support appears to be working, needs esptool-ck from this branch: feature/8m_16m. Formatting SPIFFS on a 16MB flash currently takes ~330 seconds. Need to speed up flash erase by exposing the 64kB block erase function. SPIFFS uploading over serial doesn't work yet. Needs some additional changes to esptool. |
I have a comment on "Optimise SPIFFS parameters": SPIFFS has an issue with write/delete cycles of "big" files creating lots of fragmentation. There are open issues for that in the SPIFFS repository: I wrote a unit test to reproduce the issue I can share. A solution is quite simple:
https://github.com/pellepl/spiffs/wiki/Configure-spiffs#spiffs_gc_max_runs for more information.
|
Hey,
This worked perfectly fine with the 1.x.x SDK. Any idea why pgm_read_byte causes: Fatal exception 3(LoadStoreErrorCause): Thanks! EDIT: This fixed it for me: |
ESP.deepSleep still only takes uint32_t not uint64_t, but system_deep_sleep does appear to work now with the extended uint64_t sleep times. Terrific, thanks so much for this. |
@torntrousers and @igrr might be a "bad" calculator here but does the uint64_t mean ESP's can now sleep for 585m years? |
@pieman64 The hardware RTC timer is still 32-bit, so the limit is now 2^32 / RTC_TIMER_FREQ seconds instead of 2^32 / 1000000 seconds. @NiklasFauth: that's very interesting, we have a fix for pgm_read_byte merged already... So you have replaced the assembly version of pgm_read_byte with the version mentioned in the issue? |
Thats interesting about the RTC timer. What is the value of RTC_TIMER_FREQ - is that what system_rtc_clock_cali_proc() returns? Trying system_rtc_clock_cali_proc() it returns 24716, so 2^32 / 24716 = 173772 secs or 48 hours, is that right? |
@torntrousers previously it was around 72 minutes so if your calculation is right then 48 hours is considerably longer, but not the 585m years my "bad" calculator came up with. |
Just as FYI I've got nowhere trying the > 2^32 deepsleep intervals, as far as I can tell they just don't work and wakeups are often seemingly random short intervals. No answers about what should be possible or what the actual max sleep time should be from the espressif bbs. |
@torntrousers did you apply the Core patch at http://www.esp8266.com/viewtopic.php?p=67729#p67729 before carrying out your tests? @igrr you stated
but what does this calculate out to, approximately, as there is some confusion over the calculation? See also #3302 for reference to the patch by @5chufti to include the missing |
@igrr I am looking to use the extended deepSleep durations and what I did was look through all the changes in this pull request and manually edited the relevant files that I believe referred to deepSleep. But what I didn't do was select any of the new binaries. Which of binary files are deepSleep related? |
@pieman64 I would suggest to swap everything under tools/sdk (to get sdk 2.1.0) |
@5chufti @igrr one last question (hopefully).
|
take the tools/sdk part from the 2.1.0 branchs zip and you are ok |
@5chufti I did that earlier today and I am still getting the old maximum of 72m with anything above this giving modulus 72. |
hmmm, what does sdk/include/user_interface.h say about "system_deep_sleep"? |
Has any progress been made on this SDK update work? |
Wish Arduino support ESP-Mesh last version (version 1.3) too. Thank you |
@igrr For the WifiManager testing, I did some reference testing with the current latest git (basically just tried out all the examples that don't have mqtt), and I think I understand what to look for. I am now trying to build with this update_sdk_2.1.0 branch. I'm a bit confused. The file tools/sdk/version says 2.0.0_16_08_09. In the same dir, changelog.txt doesn't seem to contain the 2.1.0 chanelog. I started to doubt whether I did the whole git thing correctly (I'm rather new to github), but looking at the changed files here on github, I don't see changes for those files. Also, the files in my local git seem to match with what github says (i.e.: the file headers have the new MIT license thing). Are the contents for the above version and changelog.txt files expected? Or did I mess something up? Or is this PR incomplete still? This is what I did, in case I messed something up: |
Hi, |
Indeed, i forgot to update the version and changelog files. Will do. |
8308fe8
to
cbb9282
Compare
Updated to the latest non-OS SDK. There's another small but very important update landing this week, so holding off merging this until then. Will work on the rest of 8M/16M support in a separate PR. |
For distribution the binaries may be compressed.
with a compress ratio of more than 40 %. For example:
|
cbb9282
to
fb3a8a0
Compare
@Juppit upx is known to trigger some virus scanners, do you think it is really worth it? We don't update the gcc toolchain when updating the SDK, so it doesn't look like an issue related to SDK updates. |
I realize that it has become old fashioned to save resources. :-) |
@igrr I just got the Wemos D1 pro boards with 16MB, so I can now help with testing that. Is there anything specific I should look at? |
@devyte I think basic support for 8/16 is there: one can upload binaries above 4M mark using esptool-ck, and linker scripts for 8/16MB are included. Performance of SPIFFS on 8M and 16M partitions is pretty bad though, in part due to flash erase times. For example, formatting a 16M partition takes enough time for me to grab a coffee in the next room... So there's some optimization work that needs to be done to make such large SPIFFS partitions more usable. |
#3215
Todo:
8MB/16MB support