1.with_mcuboot
功能:同时构建mcuboot和 app 支持一键下载到内部外部flash (验证XIP)
此示例基于samples/sysbuild/with_mcuboot 更改
编译
| west build -p always -b art_pi --sysbuild 1.with_mcuboot
|
下载
- 同时下载到内部flash和外部flash,需保证外部下载算法在cubeprogrammer中
log
| *** Booting MCUboot v2.2.0-118-gaa4fa2b6e173 ***
*** Using Zephyr OS build v4.2.0-3958-gb42209d06c5c ***
I: Starting bootloader
D: context_boot_go
I: Image index: 0, Swap type: none
D: boot_validate_slot: slot 0, expected_swap_type 0
D: bootutil_img_validate: flash area 0x8009ed8
D: bootutil_img_hash
D: bootutil_tlv_iter_begin: type 65535, prot == 0
D: bootutil_img_validate: TLV off 20052, end 20384
D: bootutil_tlv_iter_next: searching for 65535 (65535 is any) starting at 20052 ending at 20384
D: bootutil_tlv_iter_next: TLV 16 found at 20056 (size 32)
D: bootutil_img_validate: EXPECTED_HASH_TLV == 16
D: bootutil_tlv_iter_next: searching for 65535 (65535 is any) starting at 20088 ending at 20384
D: bootutil_tlv_iter_next: TLV 1 found at 20092 (size 32)
D: bootutil_img_validate: EXPECTED_KEY_TLV == 1
D: bootutil_find_key
D: bootutil_tlv_iter_next: searching for 65535 (65535 is any) starting at 20124 ending at 20384
D: bootutil_tlv_iter_next: TLV 32 found at 20128 (size 256)
D: bootutil_img_validate: EXPECTED_SIG_TLV == 32
D: bootutil_verify_sig: RSA key_id 0
D: bootutil_tlv_iter_next: searching for 65535 (65535 is any) starting at 20384 ending at 20384
D: bootutil_tlv_iter_next: TLV 65535 not found
D: Left boot_go with success == 1
I: Bootloader chainload address offset: 0x0
I: Image version: v0.0.0
I: Jumping to the first image slot
*** Booting Zephyr OS build v4.2.0-3958-gb42209d06c5c ***
Address of sample 0x90000000
Hello sysbuild with mcuboot! art_pi
|
参考:
https://github.com/zephyrproject-rtos/zephyr/discussions/68729?utm_source=chatgpt.com
https://docs.zephyrproject.org/latest/samples/sysbuild/with_mcuboot/README.html
https://docs.zephyrproject.org/latest/build/sysbuild/index.html