Unable to find bootable image

Hello,

From time to time I am getting the error "Unable to find bootable image" when I start a debug session in SES-NE v5.60.

FIH_CALL(boot_go, fih_rc, &rsp);
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
BOOT_LOG_ERR("Unable to find bootable image");
FIH_PANIC;
}

So, I deleted the whole content of the build folder and re-built the solution and produced a new merged,hex file. But the error persists. If I keep erasing/rebuilding the solution eventually I can start the debug session. Sometimes it takes many retries before it starts working again. I am wasting a lot of precious time that I cannot afford to waste.

Could someone please help sort this problem out ?

Why is this happening randomly?

What can be done to prevent it from happening?

If it cannot be prevented then how can it be fixed without wasting a long time on rebuilding the solution many times?

Thank you.

Kind regards

Mohamed

Parents
  • Hi Mohamed,

    When you download the application from SES NE, the image header needed by MCUBoot is missing. So it is expected that MCUBoot will not find a bootable image. When using MCUBoot, you need to flash the merged.hex file, and as this is not done automatically, you need to do it manually. Then you can subsequently debug by selecting to debug without downloading. To avoid this, you could consider testing/debugging without using MCUBoot, or migrating to nRF Connect for VS Code, which is the only IDE we recommend going forward (and also the only supported IDE for the latest nRF Connect SDK releases).

    Einar

  • Hi... I facing same issue with Visual Studio also. After wasting a week, I re-created the same project again, merged my files from faulty project to new.

    In VSC, on left side penal, under Actions -> flash is used to run the build, then there is no issue.

    But, during Actions->Debug, sometimes same issue occurs of and then. I facing this issue in Asset Tracker sample application, in which I adding custom code. Please suggest solution.

  • Is it so that you only see this issue if you rebuild and debug without selecting Actions -> Flash first? If so, this is as expected, and the reason is that you need to program the full merged.hex as if not, the bootloader will not recognize the application as it has changed, and boot validation will fail. This is the expected behavior when using a bootloader, and the solution is to flash the merged hex file first in this case (for instance with Actions -> Flash), and then debug.

  • Hi. I tried following methods:

    1. Programmed merged.hex using Programmer of nRF Connect. Then, program runs continuously properly. But in this, it is not possible to stop at any breakpoint.

    2. Programmed the nRF9160DK directly from Actions-> Flash. In this case also, program runs properly, but not possible to stop execution at any breakpoint.

    Then, after above two methods, tried: Actions-> Debug. The nRF9160DK is automatically re-programmed for Debug Configuration, but image error occurs and program never reach to main(). I got fed up of this issue and seems that will have to create whole project and add again custom code to sample code of Asset_tracker. If this issue occurs near last stage of a large project, causes wastage of too much time. 

  • Hi Mexco,

    I understand your frustration .

    2. Programmed the nRF9160DK directly from Actions-> Flash. In this case also, program runs properly, but not possible to stop execution at any breakpoint.

    Then, after above two methods, tried: Actions-> Debug.

    So, to clarify, has your merged.hex changed between step 2 and Actions->Debug?

    If this is NOT the case then there is no reason for the error. However, if the merged.hex has changed then, as Einar said, you must do Actions-> Flash followed by Actions->Debug.

    I hope this helps.

    Kind regards

    Mohamed

Reply
  • Hi Mexco,

    I understand your frustration .

    2. Programmed the nRF9160DK directly from Actions-> Flash. In this case also, program runs properly, but not possible to stop execution at any breakpoint.

    Then, after above two methods, tried: Actions-> Debug.

    So, to clarify, has your merged.hex changed between step 2 and Actions->Debug?

    If this is NOT the case then there is no reason for the error. However, if the merged.hex has changed then, as Einar said, you must do Actions-> Flash followed by Actions->Debug.

    I hope this helps.

    Kind regards

    Mohamed

Children
Related