跳转至

2.app

2.mcuboot.md

功能:独立构建 mcuboot 和 app (xip)

1
2
3
4
5
6
7
# 1) 独立构建 mcuboot(默认加签名)
west build -p always -b art_pi -d build-mcuboot $HOME/zephyrproject/bootloader/mcuboot/boot/zephyr

# 2) 构建应用并自动生成已签名镜像(用同一把私钥签名)
west build -p always -b art_pi -d build-app 2.app -- \
  -DCONFIG_BOOTLOADER_MCUBOOT=y \
  -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE="\"$HOME/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem\""
1
2
3
4
5
# 刷 bootloader
west flash -d build-mcuboot

# 刷app
west flash -d build-app --hex-file build-app/zephyr/zephyr.signed.hex

log

image-20250923231325626