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,

    Are you adding DFU support for your Blinky sample or is this happening just with the sample from the SDK? If you are adding the DFU support could you tell me whatever changes you have made to the main application. If you have followed any guide like this please let me know .So that I will get more idea on what's happening on the Application side.

    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.

    Does that mean you were using nRF connect programmer App for flashing the Thingy53 and was working fine?

    I want to make sure that it's not an issue with the improper installation of SDK and toolchain manager. I hope you have followed all the steps mentioned in this tutorial. Have you tried flashings any other sample and ended up successfully?

    Kind Regards,

    Abhijith

  • I've slowly started to try and change configuration options to get something to work but the original problem was there with the unchanged example using the Blinky sample from the SDK. Without any changes the samples perform a multi-image build.

    I've tried flashing with the VSCode extension, `west flash`, `nrfjprog` and the nRF Programmer application. All result in the same behavior. The system doesn't appear to boot into the main application and the light never blinks. When debugging it appears to be a bootloader issue.

    When I attach my JLink and use the RTT Viewer from Segger I don't see any output from this board. To check I grabbed a separate Thingy:53 that's running the "peripheral_uart" example that was flashed over USB and that outputs logging information over RTT. I'm afraid to try flashing with the JLink on a separate board so that I don't soft lock that one as well.

    Does that mean you were using nRF connect programmer App for flashing the Thingy53 and was working fine?

    Yes when I was programming using DFU build output over USB I didn't have any issues. My theory on this is when using the USB programming I'm just updating the application and network core code and not the bootloader. It seems all of my problems started as soon as I reflashed the bootloader as part of the flashing with the JLink.

    As far as I can tell I don't have any toolchain install issues. Since I flashed with JLink no examples work for me even the precompiled versions from here: https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-53/Downloads

Reply
  • I've slowly started to try and change configuration options to get something to work but the original problem was there with the unchanged example using the Blinky sample from the SDK. Without any changes the samples perform a multi-image build.

    I've tried flashing with the VSCode extension, `west flash`, `nrfjprog` and the nRF Programmer application. All result in the same behavior. The system doesn't appear to boot into the main application and the light never blinks. When debugging it appears to be a bootloader issue.

    When I attach my JLink and use the RTT Viewer from Segger I don't see any output from this board. To check I grabbed a separate Thingy:53 that's running the "peripheral_uart" example that was flashed over USB and that outputs logging information over RTT. I'm afraid to try flashing with the JLink on a separate board so that I don't soft lock that one as well.

    Does that mean you were using nRF connect programmer App for flashing the Thingy53 and was working fine?

    Yes when I was programming using DFU build output over USB I didn't have any issues. My theory on this is when using the USB programming I'm just updating the application and network core code and not the bootloader. It seems all of my problems started as soon as I reflashed the bootloader as part of the flashing with the JLink.

    As far as I can tell I don't have any toolchain install issues. Since I flashed with JLink no examples work for me even the precompiled versions from here: https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-53/Downloads

Children
No Data
Related