nRF Connect SDK child image per-board configuration discards associated prj.conf in 2.6.1

When building a project using a custom board, as well as both the b0 and mcuboot bootloaders enabled, board-specific child image configuration causes the build system to ignore the project-specific configuration.

I'm using the following directory structure:

<wk> - Workspace directory
<wk>/<prj> - Project directory
<wk>/<prj>/prj.conf - Core project configuration
<wk>/<prj>/build - Builds
<wk>/<prj>/boards - Boards
<wk>/<prj>/boards/arm/<example>/ - a copy of the nrf5340dk configuration, renamed to something other than nrf5340dk to test if the build system handles custom boards differently than in-tree boards
<wk>/<prj>/child_image/b0/boards/<example>_cpuapp.conf

core project configuration includes the following:

CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_SECURE_BOOT=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

The file <wk>/<prj>/child_image/b0/boards/<example>_cpuapp.conf must contain the contents of <wk>/nrf/samples/bootloader/prj.conf and <wk>/nrf/samples/bootloader/boards/nrf5340dk_nrf5340_cpuapp.conf or it will fail to build.

This relates to https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/config_and_build/multi_image.html#permanent_configuration_changes_to_child_images

and  Compile ERROR "undefined reference to `sys_clock_cycle_get_32'" with custom board

  • If you open the terminal in VS Code, you can compare the west build command when it works and when it fails. I'm wondering if the extension might be appending some arguments to the build command that override the default behavior when it fails.

  • At this point, since forcing the build configuration to use prj.conf instead of the cache, I haven't been able to reproduce the problem I was running into.  On the other hand, I've run into 3 blue screen of deaths plugging in and removing the USB cable, as well as apparently permanently locking the access port on an nRF52DK during one of those BSODs.  I think we can close this issue for now, but I need to open tickets for the other things that have cropped up.

Related