Skip to content

Commit

Permalink
boards: frdm_mcxa156: enable MCUboot support
Browse files Browse the repository at this point in the history
- Enables a MCUboot support for frdm-mcxa156.
- Enables MCUMgr OTA and MCUBoot recovery for frdm-mcxa156.

Signed-off-by: Andrej Butok <[email protected]>
  • Loading branch information
butok committed Dec 19, 2024
1 parent 4986126 commit 8f11e29
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
15 changes: 15 additions & 0 deletions boards/nxp/frdm_mcxa156/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# FRDM-MCXA156 board

# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0

if BOARD_FRDM_MCXA156

if BOOTLOADER_MCUBOOT
choice MCUBOOT_BOOTLOADER_MODE
# Board only supports MCUBoot via "upgrade only" method:
default MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY
endchoice
endif #BOOTLOADER_MCUBOOT

endif # BOARD_FRDM_MCXA156
6 changes: 6 additions & 0 deletions boards/nxp/frdm_mcxa156/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0

choice MCUBOOT_MODE
default MCUBOOT_MODE_OVERWRITE_ONLY
endchoice
29 changes: 29 additions & 0 deletions boards/nxp/frdm_mcxa156/frdm_mcxa156.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
sw0 = &user_button_2;
sw1 = &user_button_3;
pwm-0 = &flexpwm0_pwm0;
mcuboot-button0 = &user_button_2;
};

chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash;
zephyr,flash-controller = &fmu;
zephyr,code-partition = &slot0_partition;
zephyr,console = &lpuart0;
zephyr,shell-uart = &lpuart0;
zephyr,uart-mcumgr = &lpuart0;
};

leds {
Expand Down Expand Up @@ -138,3 +141,29 @@ zephyr_udc0: &usb {
status = "okay";
num-bidir-endpoints = <8>;
};

&flash {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
read-only;
};
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(424)>;
};
slot1_partition: partition@7a000 {
label = "image-1";
reg = <0x0007a000 DT_SIZE_K(424)>;
};
storage_partition: partition@e4000 {
label = "storage";
reg = <0x000e4000 DT_SIZE_K(112)>;
};
};
};

0 comments on commit 8f11e29

Please sign in to comment.