-
Notifications
You must be signed in to change notification settings - Fork 286
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
Add LittleFS for BL602 #1159
Add LittleFS for BL602 #1159
Conversation
Thanks, how much does it increase the resulting OTA file? |
Actual binary increases by 40KB to 780KB, we have 800KB limit there. |
Was it tested with OTA? Last time I checked we were barely at OTA limit
…On Sun, Mar 31, 2024, 8:03 AM giedriuslt ***@***.***> wrote:
Actual binary increases by 40KB to 780KB, we have 800KB limit there.
Compressed OTA increases by 21KB to 417KB, we have 544KB limit there. So
should be no issues.
—
Reply to this email directly, view it on GitHub
<#1159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMGZ6YWCEUYNDV23EOTDVDY26RLZAVCNFSM6AAAAABFP2AHEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGU3DQOJVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, OTA works without any issues after my recent fixes. I uploaded it more than 10 times while testing, no issues. |
I don't know much about BLdevCube versions, can you elaborate on "Offsets are currently static, so only supports layout from BLDevCube 1.4.8."? |
Partition layout file is different between 1.4.8 and 1.8.9
while in 1.8.9 it starts later at 0x1A2000.
So to avoid accidentally writing to wrong place, i made it to support 1.4.8 layout and added check in initialization. If layout is not as expected, little fs won't work, but everything else should be fine |
does this explain why when OTA flashing BL602 update on top of a 1.8.9 flashed device it didn't come back up? I had to revert to 1.4.8 UART flash to bring it back to life and OTA. this was in the recent past, not this build |
I have 4mb BL602 if you need anything testing |
I'll do a methodical end-to-end test from 1.4.8 flash to OTA upgrade then same again from blank using 1.8.9. testing lfs after each OTA. I've just OTAd to this PR and lfs works. I could have sworn I used 1.4.8 to flash it but I MAY have used the 1.8.9 partition file with 1.4.8 BLDC, and the 4mb one at that. Will update with test findings later. |
I don't think this should matter. OTA code reads partition layout, so should work regardless. |
OK. with 1.4.8: -whole chip erase with 1.8.9: -whole chip erase
|
dunno if this helps at all but these are the boot logs from each. same PR build of OBK. only difference is the BLDC used and the config/partition files. I had chatgpt compare differences but im not ultimately sure what the big picture is regarding errors in one but not the other |
@divadiow so do you think it's safe to merge it? |
in my test the device locked when creating autoexec if OBK conversion was with 1.8.9 BLDC + new 2mb partition config file. I could repeat the same test more times? @giedriuslt does "not work" mean a locked-up device requiring reboot if you attempt to create autoexec?
I have not tried this on a 2mb device, but you'd think me using the 2mb partition file would create the same partition layout. |
I'm also curious about the way forward with usage of 1.4.8 and 1.8.9+ and the historical use of both to free devices with OBK. Should everyone be required to reflash with 1.8.9 so development of BL602 can progress without concern for old partition layout? |
I would not expect it to crash. I expected it to show error. I think this needs to be investigated. |
I'll repeat the same test more. And try with 2mb other device |
@giedriuslt was one of your tests flash fresh using 1.8.9 then OTA to PR then try create autoexec? |
hmm. I've flashed the dev board 3 times. full chip erase in between. each does the same load access fault before the chip dies when creating autoexec. first 2 flashes were with 2mb toml and 3rd with 4mb toml. this is the full log from reboot after OTA to PR then through to final hang on autoexec.bat creation I have not tried a different device yet. do I need to? |
So, I fixed the crash, file creation did not check if LittleFS is available, but now UI app needs to be fixed, because it reports save complete while api returns 400 error. |
updated to 1159_merge_29e43a1447bf on device flashed with 1.8.9 and now the device doesn't hang when attempting to create autoexec. shame this means only users who flashed with 1.4.8 will get LittleFS when 1.8.9 and the new partition layout are probably the way forward.
but excellent work still! |
Thanki you for testing. I think I wil merge it for now . Hopefully we can also support alternate partition format soon... |
🎉 This PR is included in version 1.17.541 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
xref to issue using OTA Zengge exploit and expecting LFS: https://www.elektroda.com/rtvforum/viewtopic.php?p=21323714#21323714 |
This adds LittleFS support for BL602 as requested in #1117
It is using media partition, which is defined in partition layout, but unused. Offsets are currently static, so only supports layout from BLDevCube 1.4.8.
Scripts also work.