NCS doesnt create correct bootloader for custom board

Hello,

I am not able to get a working bootloader. I am using the following environment:

- NCS 2.4.0

- blinky PWM example

- nRF52840 dev kit, and custom board based on nRF52840

- using the standard way of creating bootloader image (CONFIG_BOOTLOADER_MCUBOOT=y).

I am using 2 versions of blinky, running on two boards: nRF52840 dev kit and custom board. The modified blinky implements just a simple change - using LEDs as defined on the custom board. For this reason I am using a nRF52840 overlay file.

The standard blinky example works on both boards (although on the custom board in ends up in idle state as PWM cant be started due to different LEDs definition and there is no other task to do).

When using the modified blinky, the bootloader cannot start on any of the boards, it gets stuck on invalid boot image looping on FIH_PANIC.

The application runs ok w/o bootloader.

I tried to switch back to NCS 2.3.0, 2.2.0, 2.1.0 and the problem is present there as well. I believe that the problem is related to using the board overlay file but I cant identify which part of the device tree is making problem - I only added my own LED PWM definition. Probably some other part needs to be disabled from the nRF52840 dev kit.

The problem I am facing is similar to

Blinky w/ JLink Unable to Find Bootable Image - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

Can you please advise me where can be the problem, what to try, ... ?

Thanx.

Best regards,

peter

Parents
  • Hello again,

    it looks the problem is related to using mcuboot.conf file. My custom board uses external LFCLK source that is not configured during kernel start so I have to configure using RC oscillator instead and thus to use mcuboot.conf file.

    When I removed the mcuboot.conf file, the dev kit was able to start and run the application. The custom board waits in a loop for starting LFCLK, that is ok, as LFCLK cant start in this case.

    The mcuboot.conf file is simple:

    CONFIG_BOARD_ENABLE_DCDC=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    and the CMakelists.txt file contains:
    set(mcuboot_OVERLAY_CONFIG
      ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf
    )

    So I need a help - to identify what is wrong with my mcuboot.conf configuration?
    Best regards,
    peter
Reply
  • Hello again,

    it looks the problem is related to using mcuboot.conf file. My custom board uses external LFCLK source that is not configured during kernel start so I have to configure using RC oscillator instead and thus to use mcuboot.conf file.

    When I removed the mcuboot.conf file, the dev kit was able to start and run the application. The custom board waits in a loop for starting LFCLK, that is ok, as LFCLK cant start in this case.

    The mcuboot.conf file is simple:

    CONFIG_BOARD_ENABLE_DCDC=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    and the CMakelists.txt file contains:
    set(mcuboot_OVERLAY_CONFIG
      ${CMAKE_CURRENT_LIST_DIR}/mcuboot.conf
    )

    So I need a help - to identify what is wrong with my mcuboot.conf configuration?
    Best regards,
    peter
Children
No Data
Related