-
Notifications
You must be signed in to change notification settings - Fork 13
Add support for rp2350 and dynamic flash sizing. Update to modern SDK. (extended) #9
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
base: master
Are you sure you want to change the base?
Conversation
Tzvetomir Stoyanov: - Use SDK defines to check for PICO platform in the C code.
Usually FOTA is used as an external library to a project. There are a few compile time options, that the user of the library can tweak depending on the use case. Currently these can be changed only by modifying the FOTA CMake file. Allowing user to define these options in its CMake files simplifies the FOTA library integration.
In Mbed TLS 3.x and later, some functions are renamed to match the new API conventions. Added compatibility check and defines to handle both old and new versions of the API.
|
fixes #8 |
JZimnol
left a comment
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! Please update also README's "Prerequisites" section and memory layout.
First round of review done. Unfortunately I cannot test it on pico2w as I don't have any.
CMakeLists.txt
Outdated
| if(${PICO_PLATFORM} STREQUAL "rp2350-arm-s") | ||
| set(CPU "2350") | ||
| else() | ||
| set(CPU "2040") | ||
| endif() |
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.
I think when you use PARENT_SCOPE in the same if above, you don't have to repeat it here.
Like:
if(${PICO_PLATFORM} STREQUAL "rp2350-arm-s")
set(CPU "2350" PARENT_SCOPE)
else()
set(CPU "2040" PARENT_SCOPE)
endif()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.
I've removed setting CPU in the function and made the other one with global scope.
src/bootloader_app.c
Outdated
| #include <pico/stdlib.h> | ||
|
|
||
| #include <pico_fota_bootloader/core.h> | ||
| #include <stdlib.h> |
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.
<pico/stdlib.h> is already included above
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.
pico/stdlib.h is not the same as stdlib.h. I don't know if it's still needed but during development I needed something from the "real" stdlib.h
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.
Build passes without #include <stdlib.h>, I've removed it.
Updated documentation with latest changes: - Support for Pico2 W. - File system block reservation.
This patch updates the project to the current version of the SDK. It adds support for rp2350 and uses the flash size as set by the SDKs board file.
Based on @MelanieT's PR #5 with a few additional changes:
Tested on PicoW / RP2040.
Tested on Pico2 W / RP2350.