-
Notifications
You must be signed in to change notification settings - Fork 448
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
don't go through runtime initializers when there is no OTA command #2697
don't go through runtime initializers when there is no OTA command #2697
Conversation
I've verified that my problem is solved with this change, but I haven't given OTA much testing at this point. |
Leave that to the main app instead, so we don't reset peripherals twice.
d522866
to
ecea8bd
Compare
OTA works on my Pico W |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to rebuild all 3 OTAs and add them to the PR, please. The IDE doesn't even look at the /ota
directory or the source files there. they are included as an opaque blob since they have duplicated symbols from the main app.
Done. Note that the OTA build currently tries to copy riscv header files somewhere and fails:
Let me know if you want me to clean that up in this PR as well |
One thing to note: I'm reordering the runtime_init priorities a little, because reading the LFS to check if there is an OTA available requires working memset/memcmp/memcpy, which is wired to the bootrom functions and therefore requires And now that I think of it, it might make sense to also |
Could you, please? I have it in my own tree but I forgot to |
There doesn't appear to be anything referencing arduino-pico/lib/rp2350-riscv/platform_inc.txt Lines 1 to 2 in 66af359
|
-edit- You're right, it shouldn't be copied over in the R5 case and it's better not to create a directory and put files into it when those files won't actually ever be used. If you can make it so just the rp2040 and rp2350 builds to it that would be very much appreciated and much cleaner SW engineering! |
A quick run of OTAFromFile on the Pico2 using both ARM and RISC-V modes seems to still work, so this looks good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, no effect on Pico2 ARM or RISC-V (there's no mem-ops there, ROM doesn't include much at all and is very slow).
Float/double aren't in LittleFS so no worries about including that (softfp would blow up the 12KB we reserve for OTA code so this seems safe) but they could be moved up.
The bit operations probably will be used, good point. I'm not sure the filesystem needs to do CLZs and POPCOUNT, but we have a GZIP decompressor that can run under OTA which in my experience is going to want those special builtins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good now. Tested Pico2 and Pico and GZip compressed OTA, no issues seen.
Leave that to the main app instead, so we don't reset peripherals twice.
See discussion here: #2686