Problems building an example (matter light bulb) on a "custom board" that is identically configured as the dev kit nRF54L15DK

Hi everyone,

I'm using the nRF Connect SDK 3.0.2 and the nRF Connect Toolchain 3.0.1 with the matter ‘light_bulb’ example.

I just want to do the following:

1) Get exactly the same binary file merged.hex, but created with my own custom board files, e.g. board ‘myDK’.
2) As a second step, disable the use of the external flash memory mx25r64, creating a new partition table (just 2 smaller partitions inside the internal flash)

Sounds simple, but I'm having problems with it.

My first steps with the SDK were really promising. The examples work right away, but every change led to errors.

I've tried a lot:
Create my own board files (with VSCode-Wizzard) – within the project, outside in a separate directory. Change/create overlays and pm_static* but in the end all failed with errors regarding the mcuboot partition settings, missing arguments für --size and --offset, missing FLASH_DEVICE_ID etc.

I was working in bare metal projects for years now and wanted to see how a "state-of-the-art" SDK feel like, but it's very frustrating ...

What is the easiest way to accomplish this? Is shouldn't be that much of actions necessary!? The first part took only 2 minutes, but it does not build.

Thank you for your help!

/NoRG

Parents
  • Yes, these are the detailed steps:

    - create an application by copying the light_bulb example
    - create build config "build" -> works
    - create board "mydk" in an external folder, added path to BOARD_ROOT (settings of VS-Extension)
    - create build config "myDKConf" wit board "mydk", base config: prj.conf

    [11/23] Generating new Factory Data...
    FAILED: light_bulb_mydk/zephyr/factory_data.hex ... nrfconnect/nrfconnect_factory_data.schema --offset  --size
    generate_nrfconnect_chip_factory_data.py: error: argument --offset: expected one argument

    - pm_static_nrf54l15dk_nrf54l15_cpuapp.yml nach pm_static_mydk_nrf54l15_cpuapp.yml kopiert

    -> Partition manager failed: Incorrect amount of gaps found in static configuration. There must be exactly one gap in the static configuration to support placing the dynamic partitions (such as 'app'). Gaps found (2):0xd800-0x165000 0x17d000-0x172000 The most common solution to this problem is to fill the smallest of these gaps with statically defined partition(s) until there is only one gap left. Alternatively re-order the already defined static partitions so that only one gap remains.
    Failed to partition region flash_primary, size of region: 1462272

    (base) xxx:projects/nordic/light_bulb_mydk $ find . -name \*.overlay       
    ./sysbuild/mcuboot/app.overlay
    ./sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay
    ./sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay
    ./sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay
    ./sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay
    ./boards/nrf7002dk_nrf5340_cpuapp.overlay
    ./boards/nrf54l15dk_nrf54l15_cpuapp_ns.overlay
    ./boards/nrf5340dk_nrf5340_cpuapp.overlay
    ./boards/nrf21540dk_nrf52840.overlay
    ./boards/nrf52840dk_nrf52840.overlay
    ./boards/nrf54l15dk_nrf54l15_cpuapp.overlay

    Where shall I put what overlay?

    I did:

    - sysbuild/mcuboot/boards $ cp nrf54l15dk_nrf54l15_cpuapp.conf mydk_nrf54l15_cpuapp.conf
    - sysbuild/mcuboot/boards $ cp nrf54l15dk_nrf54l15_cpuapp.overlay mydk_nrf54l15_cpuapp.overlay

    -> 

    - Found devicetree overlay: projects/nordic/light_bulb_mydk/sysbuild/mcuboot/boards/mydk_nrf54l15_cpuapp.overlay
    devicetree error: projects/nordic/light_bulb_mydk/sysbuild/mcuboot/boards/mydk_nrf54l15_cpuapp.overlay:23 (column 1): parse error: undefined node label 'mx25r64'
    CMake Error at /opt/nordic/ncs/v3.0.2/zephyr/cmake/modules/dts.cmake:305 (execute_process):
      execute_process failed command indexes:

    Whatever I do, I get always new funny error messages ...

    No idea what to do. And this is only part 1 where I just want get a clone of my DK.

    /NoRG

  • Hi,

    Can you share the complete build log?

    Please also share your board files and project so I can test it on my side.

    Best regards,
    Marte

  • Hi Marte,

    I really appreciate your time. I tried to repeat all your steps - but without success. Can you send me the two directories (board and light_bulb) including the binaries?

    Here are mine:

    -rw-r--r--@ 1 xxx  yyy  2461648 16 Jun 16:35 light_bulb_cust/Custom/merged.hex
    -rw-r--r--@ 1 xxx  yyy  2461956  7 Jun 09:23 light_bulb_cust/NordicDK/merged.hex

    Regards
    /NoRG

  • Hi,

    I have attached the custom board files and light bulb with the build folder included.

    custom_54l_matter_bulb.zip

    Best regards,
    Marte

  • Hi Marte,

    thank you for your support!

    I was able to narrow it down! It seems to cause problems with custom boards (and only there!) when specifying the project file ‘prj.conf’ in the build configuration. If you leave the field blank, it works! Maybe you have an idea what could be causing this, because of course it's also about different project configurations and this way you can only ever use the standard configuration prj.conf.

    My goal is to collect all board dependencies in the board directory and only save the different configurations of the project (prj.conf, prj_release.prj, etc.) in the project folder. This is no longer possible with custom boards. With DK, specifying the *.prj files works as expected.

    /NoRG

  • Hi,

    It seems like the light bulb's custom_nrf54l15dk_nrf54l15_cpuapp.conf file is not included in the build when manually selecting prj.conf. The MCUboot board config is included (light_bulb/sysbuild/mcuboot/boards/custom_nrf54l15dk_nrf54l15_cpuapp.conf), but not the main application (light_bulb/boards/custom_nrf54l15dk_nrf54l15_cpuapp.conf).

    I have reported this internally to the VS Code team.

    As a workaround, you can manually add custom_nrf54l15dk_nrf54l15_cpuapp.conf in the build configuration or avoid selecting any files in the base configuration file.

    Best regards,
    Marte

  • Hi,

    thanks for tracking that down!

    Best regards,

    /NoRG

Reply Children
No Data
Related