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 Reply Children
  • Hi Priyanka,

    when building the mcuboot image I am getting this warning, could point to the root cause:

    === child image mcuboot - begin ===
    loading initial cache file D:/Dev/zephyr_blinky/blinky_pwm/build/mcuboot/child_image_preload.cmake
    CMake Warning (dev) at D:/Dev/zephyr_blinky/blinky_pwm/build/mcuboot/child_image_preload.cmake:7 (set):
    Syntax error in cmake code at

    D:/Dev/zephyr_blinky/blinky_pwm/build/mcuboot/child_image_preload.cmake:7

    when parsing string

    d:\ncs\toolchains\31f4403e35\opt\bin\python.exe

    Invalid escape sequence \3

    Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
    "cmake --help-policy CMP0010" for policy details. Use the cmake_policy
    command to set the policy and suppress this warning.
    This warning is for project developers. Use -Wno-dev to suppress it.

    Please pass this to the developers.

    Best regards,

    peter

  • Hi Priyanka,

    the above mentioned warning is probably not relevant to the bootloader image problem. I tried NCS v2.0.0 where the warning is not present and the bootloader problem is present also there.

    Best regards,

    peter

Related