How to build also zephyr mcuboot?

When am nrf52 zephyr project has CONFIG_BOOTLOADER_MCUBOOT=y in it’s prj.conf file, its default build builds two images, of mcuboot and of the app respectively and a merged image that include both. This is an example that demonstrate it

However, under platformio, only the app is built and the child image of the mcuboot is not. Any idea how how to change a platformio project to generate also the child image of the MCU boot?

CONFIG_GPIO=y
CONFIG_BOOTLOADER_MCUBOOT=y
[env:nrf52_dk]
platform = nordicnrf52
board = nrf52_dk
framework = zephyr

Here is a log of a standard non platformio build which creates the two images. + rm -rf ./build+ west build -b nrf52840dk_nrf52840 --pristine-- west build: - Pastebin.com

Also, this is the list of files in the non platformio project after the build. The build files are under the blinky/build directory. blinkyblinky/buildblinky/build/.ninja_depsblinky/build/.ninja_logblinky/ - Pastebin.com

I’ve seen multiple topics about this but no developer support for it yet. But strangly also noone opened an issue about building with MCUBoot, looking at Search · org:platformio MCUBoot · GitHub. Could you open one at Issues · platformio/platform-nordicnrf52 · GitHub?

Thanks @maxgerhardt , I created this bug MCUBOOT image is not built with zephyr CONFIG_BOOTLOADER_MCUBOOT=y · Issue #150 · platformio/platform-nordicnrf52 · GitHub

MCUBOOT is an important aspect of zephyr because it allows firmware updates by end users, via a cable or via BLE over the air.

1 Like

@maxgerhardt, BTW, I think that this is a general zephyr issue rather than nrf52 since MCUBOOT is a general feature of zephyr and doesn’t even require BLE or wireless connectivity. Move it to a more general issue bucket?

Sadly there’s no “PlatformIO Zephyr integration” repo, it’s always done per MCU platform, so the nrF52 repo is the closest one.

1 Like