-
Notifications
You must be signed in to change notification settings - Fork 15
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
New modular OTA structure #101
Merged
AniruddhaKanhere
merged 12 commits into
FreeRTOS:main
from
chuyue-luo-arm:dev/chuluo01/modular-ota
Dec 5, 2024
Merged
New modular OTA structure #101
AniruddhaKanhere
merged 12 commits into
FreeRTOS:main
from
chuyue-luo-arm:dev/chuluo01/modular-ota
Dec 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove the ota_for_aws_iot_embedded_sdk component, as we will be replacing it with the new modular OTA. Signed-off-by: Chuyue Luo <[email protected]>
Add a crt-helpers/ directory within applicatons/helpers. Within this directory, add a custom implementation of `strnlen` (based on TF-M's `tfm_strnlen` implementation). This is required because the Arm Compiler for Embedded (v6.21) does not support `strnlen`. Signed-off-by: Chuyue Luo <[email protected]>
Add the Jobs-for-AWS-IoT-embedded-sdk repository as a submodule. This library is used to interact with AWS IoT Jobs (remote operations that are sent to and executed on devices connected to AWS IoT). It is one of the two libraries that must be integrated to allow the new modular OTA to be used - second library (aws-iot-core-mqtt-file-streams-embedded-c) is integrated in a later commit. In addition, the required integration CMake files to build the component are added. Signed-off-by: Chuyue Luo <[email protected]>
Two patches are added for the Jobs-for-AWS-IoT-embedded-sdk library: - The Jobs library assumes the OTA job is signed using ECDSA. However, we currently use RSA. Therefore, add a patch to change the check for an ECDSA signature to a check for an RSA signature. - The Jobs library contains calls to the `strnlen` function. However, this function is not supported by the Arm Compiler for Embedded (v6.21). Therefore, add a patch which replaces these calls with calls to our custom implementation `app_strnlen`. Signed-off-by: Chuyue Luo <[email protected]>
Add the aws-iot-core-mqtt-file-streams-embedded-c repository as a submodule. This library allows files from a stream (an abstraction for a list of files) to be transferred to an IoT device. It is the second of the two libraries that must be integrated to allow the new modular OTA to be used. In addition, the required integration CMake files to build the component are added. Signed-off-by: Chuyue Luo <[email protected]>
The aws-iot-core-mqtt-file-streams-embedded-c library uses the `strnlen` function, which is not supported by the Arm Compiler for Embedded (v6.21). Therefore, add a patch which replaces the call to `strnlen` with a call to our custom implementation `app_strnlen`. Signed-off-by: Chuyue Luo <[email protected]>
THe MQTT File Streams library allows a MQTTFileDownloader_config.h file to be provided, which defines custom values for build configuration macros. This commit adds a MQTTFileDownloader_config.h file for the keyword detection example. This file defines the block size that should be used when downloading the firmware image. Signed-off-by: Chuyue Luo <[email protected]>
Add a patch for FreeRTOS OTA PAL PSA to allow it to work with the new modular OTA structure. This patch does the following: - Update header includes to remove headers from the old ota-for-aws-iot-embedded-sdk library, replace these with headers from the new Jobs-for-AWS-IoT-embedded-sdk library - Remove usage of data structures from ota-for-aws-iot-embedded-sdk library, replace these with data structures from Jobs-for-AWS-IoT-embedded-sdk library. Signed-off-by: Chuyue Luo <[email protected]>
Add an OTA orchestrator as a helper within the applications/ directory. The OTA orchestrator uses functionality from the Jobs and MQTT File Streaming libraries to enable OTA updates. In addition, update the keyword detection CMakeLists.txt to allow this example to use the new modular OTA. Signed-off-by: Chuyue Luo <[email protected]>
Update speech recognition CMakeLists.txt and add MQTTFileDownloader_config.h file to allow this example to use the new modular OTA. Signed-off-by: Chuyue Luo <[email protected]>
Update object detection CMakeLists.txt and add MQTTFileDownloader_config.h file to allow this example to use the new modular OTA. Signed-off-by: Chuyue Luo <[email protected]>
Update FreeRTOS IoT Libraries Tests CMakeLists.txt and add MQTTFileDownloader_config.h file to allow the tests to use the new modular OTA. Signed-off-by: Chuyue Luo <[email protected]>
urutva
approved these changes
Dec 5, 2024
AniruddhaKanhere
approved these changes
Dec 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Update FRI to use the new modular OTA structure:
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.