Running from RAM, build/zephyr/zephyr.bin missing reset vector #69630
-
I'm working on a project based on NXP MIMXRT106x processor. The design does not include any flash and the intention is to download the image over USB. I have found some discussion threads that cover this topic here on zephyr forum as well as parts on the NXP forums. I'm currently using zephyr 3.5.0. A good discussion of the modifying zephyr to build into ram was here: I also found important tips for the loading process on the NXP forums here: @DerekSnell has been an important contributor in these discussions, thanks you! For my initial testing I'm working on MIMXRT1062-EVKB. I see my code running when I perform west debug. However when I look into build/zephyr/zephyr.bin I don't find any isr vectory, and most importantly there isn't a reset vectory After loading I verfied this: (.venv) C:\Users\antho>blhost -u 0x15A2,0x0073 -- read-memory 0x0000000 8 What am I missing to properly build zephyr.bin? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @asteriskSF , You can check the zephyr.map file from the linker, generated with the zephyr.bin file. The vector table is located at Best regards |
Beta Was this translation helpful? Give feedback.
-
For some reason the vector table is being placed at 0x2000 Does it need to be at address 0x0 for correct operation? |
Beta Was this translation helpful? Give feedback.
-
Hi @asteriskSF , When the ROM bootloader boots the app, like booting from flash, the boot ROM needs to be told where the vector table is. But since you are loading to RAM, you will be booting the app manually using the bootloader tools. Like using the blhost The vector table location is also configured in the ARM core's VTOR register, which does have an alignment requirement. I don't recall what alignment is required for the M7 core (you can review the VTOR documentation to confirm), but I know the offset of 0x2000 works, as would 0x0. The reason the Zephyr app places the vector table at offset 0x2000 is because of the setup for flash boot. The boot ROM for the RT1xxx devices needs the IVT and FCB at specific offsets in the flash, and the flash image header used for Zephyr defaults to placing the vector table at offset 0x2000. Since you are not booting from flash, these are not required. But I suggest you prove out your app executing first with the vector table at 0x2000, before you modify the image further. Best regards |
Beta Was this translation helpful? Give feedback.
Hi @asteriskSF ,
The vector table does not need to be at 0x0, although you could place it there. It will also work at 0x2000.
When the ROM bootloader boots the app, like booting from flash, the boot ROM needs to be told where the vector table is. But since you are loading to RAM, you will be booting the app manually using the bootloader tools. Like using the blhost
execute
command that you found at this post.The vector table location is also configured in the ARM core's VTOR register, which does have an alignment requirement. I don't recall what alignment is required for the M7 core (you can review the VTOR documentation to confirm), but I know the offset of 0x2000 works, as would 0x0.
T…