Blinky w/ JLink Unable to Find Bootable Image

I recently got my Segger JLink Ultra+ working with the nRF tool suite but after programming my Thingy:53 dev board once it no longer boots correctly. Prior to using the JLink I was using the DFU programming over USB without issue but the need for real time debugging pushed me to the JLink approach.

Currently I've gone back to the blinky application under the Zephyr samples in the SDK folder. I'm using SDK v.2.4.0 and am able to build the blinky application for the thingy53_nrf5340_cpuapp_ns without issue. The problem comes after I flash or debug.

The code bootloader code apears to hit this section and fail:

    if (FIH_NOT_EQ(fih_rc, FIH_SUCCESS)) {
        BOOT_LOG_ERR("Unable to find bootable image");

        mcuboot_status_change(MCUBOOT_STATUS_NO_BOOTABLE_IMAGE_FOUND);

#ifdef CONFIG_BOOT_SERIAL_NO_APPLICATION
        /* No bootable image and configuration set to remain in serial
         * recovery mode
         */
        boot_serial_enter();
#endif

        FIH_PANIC;
    }

The above code is from the file "C:\ncs\v2.4.0\bootloader\mcuboot\boot\zephyr\main.c"

When the system hits this conditional fih_rc = 357913941

From stepping through the code it looks like the "context_boot_go" panics because the boot_swap_type somehow ends up being BOOT_SWAP_TYPE_PANIC. This seems to occur in the file "C:\ncs\v2.4.0\bootloader\mcuboot\boot\bootutil\src\loader.c" around line 2234

What could be causing the bootloader to not find the blinky image? Is there something I need to erase or clear or reprogram? I'm stuck and this is really stalling out progress on my project.

Parents
  • Hello,

    Can you try any of the samples from the SDK instead of the precompiled binary files for the Thingy. For eg: try the basic blinky and try beacon sample (for testing BLE). Build the program for the target board thingy53_nrf5340_cpuapp, you can try using both west and from vscode. After a successful build, try to flash from the VScode and also from the Programmer App. For doing it from the programmer App you need to flash the zephyr.hex file inside the build folder(ncs\v2.4.0\zephyr\samples\basic\blinky\build\zephyr) See the sreenshot below:

     

    Are you using the latest version of the J-link and command line tools? Please share the versions. You can find this by running nrfjprog --version inside the command prompt. 

    Please upload the logs both from the programmer app and from VScode. I hope you are connecting the External debug probe properly as mentioned in here.

    Kind Regards,

    Abhijith

  • I had some time today to attempt your suggestions here is what I found. Apologies for the poorly formated posts the form wouldn't let me insert my logs as code so I had to put them directly into the message. Let me know if there is anything more I can upload to help troubleshoot this.

    Summary of Results:

    It appears that v2.4.0 fails for me when the network core is involved, BLE is utilized, or if I compile for the "_ns" version of the target hardware.

    • blinky - thingy53_nrf5340_cpuapp = pass
    • blink - thingy53_nrf5340_cpuapp_ns = fail
    • beacon - thingy53_nf5340_cpuapp = fail

    Notes:

    • Programming with the "zephyr.hex" did not work. I think you meant the "merged_domains.hex" file.
      • According to build outputs description the merged_domains.hex contains both the complete application core and the complete network core hex files.

    Hardware Setup:

    $ nrfjprog --version
    nrfjprog version: 10.21.0 external
    JLinkARM.dll version: 7.88h

    Blinky (PASS):

    • Copied the "blinky" example from `C:\ncs\v2.4.0\zephyr\samples\basic\blinky` to the folder `C:\Users\zach\Documents\repositories\nrf\blinky`
    • Opened and configured with VSCode
    • I built the blinky code using the nRF Conenct extension in VSCode and then flashed the board.

    Blinky Logs:

    See attached zip file for log file

    BLE Beacon (FAIL):

    • Copied the "beacon" example from `C:\ncs\v2.4.0\zephyr\samples\bluetooth\beacon` to the folder `C:\Users\zach\Documents\repositories\nrf\beacon`
    • Opened with VSCode and configured same as Blinky above
    • Compiled and flashed using VSCode nRF Connect Extension

    BLE Beacon Logs:

    See attached zip file for log file.

    build & flash logs.zip

Reply
  • I had some time today to attempt your suggestions here is what I found. Apologies for the poorly formated posts the form wouldn't let me insert my logs as code so I had to put them directly into the message. Let me know if there is anything more I can upload to help troubleshoot this.

    Summary of Results:

    It appears that v2.4.0 fails for me when the network core is involved, BLE is utilized, or if I compile for the "_ns" version of the target hardware.

    • blinky - thingy53_nrf5340_cpuapp = pass
    • blink - thingy53_nrf5340_cpuapp_ns = fail
    • beacon - thingy53_nf5340_cpuapp = fail

    Notes:

    • Programming with the "zephyr.hex" did not work. I think you meant the "merged_domains.hex" file.
      • According to build outputs description the merged_domains.hex contains both the complete application core and the complete network core hex files.

    Hardware Setup:

    $ nrfjprog --version
    nrfjprog version: 10.21.0 external
    JLinkARM.dll version: 7.88h

    Blinky (PASS):

    • Copied the "blinky" example from `C:\ncs\v2.4.0\zephyr\samples\basic\blinky` to the folder `C:\Users\zach\Documents\repositories\nrf\blinky`
    • Opened and configured with VSCode
    • I built the blinky code using the nRF Conenct extension in VSCode and then flashed the board.

    Blinky Logs:

    See attached zip file for log file

    BLE Beacon (FAIL):

    • Copied the "beacon" example from `C:\ncs\v2.4.0\zephyr\samples\bluetooth\beacon` to the folder `C:\Users\zach\Documents\repositories\nrf\beacon`
    • Opened with VSCode and configured same as Blinky above
    • Compiled and flashed using VSCode nRF Connect Extension

    BLE Beacon Logs:

    See attached zip file for log file.

    build & flash logs.zip

Children
Related