Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions boards/nxp/mr_canhubk3/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0


if BOARD_MR_CANHUBK3_S32K344_MCUBOOT

choice BOOTLOADER
default BOOTLOADER_MCUBOOT
endchoice

# Use direct-XIP mode (dual-slot) on S32K3
choice MCUBOOT_MODE
default MCUBOOT_MODE_DIRECT_XIP
endchoice

choice BOOT_SIGNATURE_TYPE
default BOOT_SIGNATURE_TYPE_RSA
endchoice

endif # BOARD_MR_CANHUBK3_S32K344_MCUBOOT
2 changes: 2 additions & 0 deletions boards/nxp/mr_canhubk3/board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ board:
vendor: nxp
socs:
- name: s32k344
variants:
- name: mcuboot
31 changes: 31 additions & 0 deletions boards/nxp/mr_canhubk3/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,37 @@ For example, to erase and verify flash content:

west flash -r trace32 --startup-args elfFile=build/zephyr/zephyr.elf loadTo=flash eraseFlash=yes verifyFlash=yes

MCUboot
=======

This board supports app chain-loading using MCUboot.

Build & Flash
-------------

To build MCUboot and the ``flash_shell`` sample application together and
generate HEX files suitable for flashing, run:

.. code-block:: console

west build -p -b mr_canhubk3/s32k344/mcuboot samples/drivers/flash_shell --sysbuild
west flash

The resulting artifacts are:

* MCUboot: ``build/mcuboot/zephyr/zephyr.hex``
* App (unsigned): ``build/flash_shell/zephyr/zephyr.hex``

Troubleshooting
---------------

If MCUboot prints “Image in the primary slot is not valid” or stalls after
“Jumping to the first image slot”, the app was likely signed with a 512-byte header.
Re-sign with --header-size 0x400 and re-flash.

Do not add an IVT to MCUboot-chainloaded applications;
it’s only emitted for standalone/XIP images or MCUboot itself.

Debugging
=========

Expand Down
Loading
Loading