Skip to content
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 support for DISCO_L475VG_IOT01A #6

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sudotensor
Copy link

Currently, the script for building the MCUboot example, mcuboot.sh, uses the old mbed-cli (V1) to build the bootloader and primary application as the MCUboot port for Mbed OS lacks support for the new mbed-tools and was built right before the transition. The Mock example, however, uses mbed-tools.

Note: mbed-tools is also known as Mbed CLI 2. This new tool makes use of "Ninja as a build system, and CMake to generate the build environment and manage the build process in a compiler-independent manner." More information can be found here.

A pull request has been issued at mcu-tools/mcuboot#1153 to add support for CMake; work on this wasn't trivial and involved generous help from @LDong-Arm to resolve. The library information file for the MCUboot example now points to this fork. Subsequently, CMakeLists.txt files were added to the bootloader and application directories of the MCUboot FOTA example to facilitate the mbed-tools build workflow.

This added support for CMake also saw a number of smaller changes (resolving header paths and updating the app configuration json file). The mcuboot.sh script was updated to use mbed-tools and README.md files for both the repository and examples were updated accordingly. The examples have been verified to work as expected on DISCO_L475VG_IOT01A.

Other notable changes include the use of pyocd for flashing the binaries, with the script now accepting a -f or --flash option instead of the board's mount point, and an updated clean routine that only cleans the builds and generated files when specified to do so; previously, the dependencies and generated files were automatically cleaned on a failed exit.

Sudarshan Sreeram added 6 commits September 2, 2021 11:43
* Update library information for bootloader and application

The mcuboot.lib files now point to lambda-shuttle/mcuboot, which
contains support for CMake.

* Resolve include path for secondary_bd.h

The path now includes the full path to this header, which lives under
the flash_map_backend folder of the mbed-mcuboot port's include
directory.

* Update bootloader and application app configurations

* Add CMakeLists.txt for target application

* Add CMakeLists.txt for target bootloader

* Set target application c_lib to "small" in mbed_app.json
* Update mcuboot.sh to use mbed-tools

* Add DISCO_L475VG_IOT01A as option for target board

* Use pyocd for flashing the target binaries

The scripts now take in a -f or --flash option instead of the mount path
of the board to flash the binaries.

* Update clean routine to only clean when option is set

* Fix target binary paths in mcuboot.sh

This commit also includes a number of other fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant