This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zephyr MCUBoot Application Debug - deadbeef everywhere

I have an Zephyr application on the nRF5340 that I've been working on.  I can debug fine in SES without a boot loader.  However, when I add MCUBoot into the mix then everything loads and starts from SES, but if I break then the addresses, registers, etc, all look incorrect and show "deadbeef".  If I set a breakpoint on a line in my application it is never hit.  Is there some trick to setting up SES properly so I can debug in the presence of MCUBoot?

This is what I have in my prj.conf with this issue occurs:

CONFIG_SECURE_BOOT=y

CONFIG_BOOTLOADER_MCUBOOT=y

Parents
  • Hi again!

    Did some more research/testing on this and figured out that my suggestion most likely won't work. The issues you are seeing are due to SECURE_BOOT being enabled (not the MCUBoot bootloader) as the immutable bootloader rejects the debugging image flashed from SES due to the format being different (.elf vs .hex). I have yet to figure out how to solve this, but the check must be disabled (temporarily) at least. Will update you when I know more.

    Edit: while SECURE_BOOT is indeed the culprit the issue is not the image validation.


    Best regards,
    Carl Richard

Reply
  • Hi again!

    Did some more research/testing on this and figured out that my suggestion most likely won't work. The issues you are seeing are due to SECURE_BOOT being enabled (not the MCUBoot bootloader) as the immutable bootloader rejects the debugging image flashed from SES due to the format being different (.elf vs .hex). I have yet to figure out how to solve this, but the check must be disabled (temporarily) at least. Will update you when I know more.

    Edit: while SECURE_BOOT is indeed the culprit the issue is not the image validation.


    Best regards,
    Carl Richard

Children
No Data
Related