[NXP][MIMXRT1189] MCUBoot RAM Load for CM33 app [Hyperram/DTCM] #98573
Replies: 5 comments 1 reply
-
|
Hi @DerekSnell + dt_chosen(chosen_flash PROPERTY "zephyr,flash")
+ dt_reg_addr(chosen_flash_address PATH ${chosen_flash})
- set(imgtool_args --align 1 --load-addr ${chosen_ram_address} ${imgtool_args})
+ set(imgtool_args --align 1 --load-addr ${chosen_flash_address} ${imgtool_args})I have also modified the application to use chosen {
zephyr,flash = &itcm;
zephyr,sram = &hyperram1;
};
// HyperRAM region for CM33 data
hyperram1: memory@38100000 {
/* Infineon S80KS2562 256 Mb */
device_type = "memory";
reg = <0x38100000 DT_SIZE_M(1)>;
zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM)>;
};
In this case, the MCUboot can copy the cm33 image to itcm and jump to it, but the image itself has problem to run: *** Booting MCUboot v2.2.0-141-gd5b0dcb9aaee ***
*** Using Zephyr OS build 16f4d6c23e40 ***
I: Starting bootloader
I: Primary slot: version=0.0.0+0
I: Image 0 Secondary slot: Image not found
I: Image 0 RAM loading to 0x1ffe0000 is succeeded.
D: boot_validate_slot: slot 0, expected_swap_type 0
D: bootutil_img_validate: flash area 0x14014b34
D: bootutil_img_hash
D: bootutil_tlv_iter_begin: type 65535, prot == 0
D: bootutil_img_validate: TLV off 23672, end 24004
D: bootutil_tlv_iter_next: searching for 65535 (65535 is any) starting at 23672 ending at 24004
D: bootutil_tlv_iter_next: TLV 16 found at 23676 (size 32)
D: bootutil_img_validate: EXPECTED_HASH_TLV == 16
D: bootutil_tlv_iter_next: searching for 65535 (65535 is any) starting at 23708 ending at 24004
D: bootutil_tlv_iter_next: TLV 1 found at 23712 (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 23744 ending at 24004
D: bootutil_tlv_iter_next: TLV 32 found at 23748 (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 24004 ending at 24004
D: bootutil_tlv_iter_next: TLV 65535 not found
I: Image 0 loaded from the primary slot
D: Left boot_go with success == 1
I: Bootloader chainload address offset: 0x1ffe0000
I: Image version: v0.0.0
I: Jumping to the first image slot
When I debug CM33 app with the |
Beta Was this translation helpful? Give feedback.
-
|
Hi @javad123javad , If you want to use the MCUboot RAM Load feature with |
Beta Was this translation helpful? Give feedback.
-
|
Hi @javad123javad ,
Use these commands to build and flash the EVK board: Some details about this patch and the changes made:
Console output: Let me know how this works for you, or if you have any questions. Best regards |
Beta Was this translation helpful? Give feedback.
-
|
Hi @javad123javad , You need to put more effort in troubleshooting your custom board. You can use the debugger with the MCUboot app to confirm if the RAM load is using the correct addresses, the source address in flash and the destination address in HyperRAM. And if so, you can confirm if the image copied to HyperRAM is read correctly, or if the image validation is failing for other reasons. Like in the debugger, after the image is loaded to HyperRAM, dump that image and compare with the expected image in flash. Or step through the MCUboot code to see why the validation fails. You also have the working example on the EVK I shared, so you can compare the RAM load feature between them to see what is different.
Yes, the patch I provided does the same. This is warning comes from the mcuboot.overlay that removes the Let us know what you find |
Beta Was this translation helpful? Give feedback.
-
|
Hi @javad123javad , What are the first two lines in the generated file blinky/zephyr/zephyr.signed.hex ? The file from my example shows that the blinky image will be programmed at 0x38020000, which is the In the generated file blinky/zephyr/zephyr.map , what is the Have you compared your generated blinky/zephyr/.config with the same file from my example, to see how they compare? Or can you share yours? Some Kconfigs to confirm are:
Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We are trying to use MCUboot RAM load feature on MIXRT1189 SOC on our custom board to load the application into Hyperram (folowing your article in MCUboot RAM Loading with Zephyr ).
We tried loading the CM33 application into HyperRAM. It appears that the image is successfully copied and the MCUboot header is correctly decoded; however, it fails to parse the TLV tags.
Are there any specific considerations we should take into account for this SoC? On our custom board, the HyperRAM is connected to FlexSPI1 and the Flash is connected to FlexSPI2 (in the reverse configuration compared to the MIMXRT1180_EVK).
The project configuration is as follows:
sysbuild/mcuboot.conf:sysbuild/mcuboot.overlay:blinky/prj.conf:board overlay:
I also found another problem in
zephyr.map:We expect thart
__text_region_startbe mapped to0x0000000038000XXXwhile it is mapped to0x00000000388007fcwhich has overlap withzephyr,sramregion for.dataand.bssBeta Was this translation helpful? Give feedback.
All reactions