From 847c2f5b5e25f0463e82d850e9ac269a0e2ff0e7 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Mon, 29 Apr 2024 23:25:33 -0600 Subject: [PATCH] mcuboot builds with `west build -p -b mellifera_rev1 ../mcuboot/boot/zephyr/ -- -DCONF_FILE=$(pwd)/boot.conf ` --- app/prj.conf | 5 ++++- boot.conf | 40 ++++++++++++++++++++++++++++++++++++++++ west.yml | 6 ++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 boot.conf diff --git a/app/prj.conf b/app/prj.conf index 39523c0..f87ca25 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -19,4 +19,7 @@ CONFIG_CHARACTER_FRAMEBUFFER=y CONFIG_CBPRINTF_FP_SUPPORT=y CONFIG_BT=y -CONFIG_BT_DEVICE_NAME="Mellifera" \ No newline at end of file +CONFIG_BT_DEVICE_NAME="Mellifera" + +CONFIG_BOOTLOADER_MCUBOOT=y +CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y \ No newline at end of file diff --git a/boot.conf b/boot.conf new file mode 100644 index 0000000..bdabedb --- /dev/null +++ b/boot.conf @@ -0,0 +1,40 @@ +CONFIG_PM=n + +CONFIG_BOOT_SIGNATURE_TYPE_NONE=y + +CONFIG_MAIN_STACK_SIZE=10240 +# CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_ENCRYPT_IMAGE=n + +CONFIG_BOOT_UPGRADE_ONLY=n +CONFIG_BOOT_BOOTSTRAP=n + +### mbedTLS has its own heap +# CONFIG_HEAP_MEM_POOL_SIZE is not set + +### We never want Zephyr's copy of tinycrypt. If tinycrypt is needed, +### MCUboot has its own copy in tree. +# CONFIG_TINYCRYPT is not set +# CONFIG_TINYCRYPT_ECC_DSA is not set +# CONFIG_TINYCRYPT_SHA256 is not set + +CONFIG_FLASH=y + +### Various Zephyr boards enable features that we don't want. +# CONFIG_BT is not set +# CONFIG_BT_CTLR is not set +# CONFIG_I2C is not set + +CONFIG_LOG=y +CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL +### Ensure Zephyr logging changes don't use more resources +CONFIG_LOG_DEFAULT_LEVEL=0 +### Use info log level by default +CONFIG_MCUBOOT_LOG_LEVEL_INF=y +### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y +CONFIG_CBPRINTF_NANO=y +### Use the minimal C library to reduce flash usage +CONFIG_MINIMAL_LIBC=y + diff --git a/west.yml b/west.yml index 6bb551c..b80894a 100644 --- a/west.yml +++ b/west.yml @@ -8,11 +8,14 @@ manifest: remotes: - name: zephyrproject-rtos url-base: https://github.com/zephyrproject-rtos + - name: mcu-tools + url-base: https://github.com/mcu-tools projects: - name: zephyr remote: zephyrproject-rtos revision: main + # revision: v3.6.0 import: # By using name-allowlist we can clone only the modules that are # strictly needed by the application. @@ -20,3 +23,6 @@ manifest: - cmsis # required by the ARM port - hal_nordic # required by the custom_plank board (Nordic based) - hal_stm32 # required by the nucleo_f302r8 board (STM32 based) + - name: mcuboot + remote: mcu-tools + revision: v2.0.0