SDK 3.0.0 custom board definition

I'm having trouble porting my project from the older SDK (2.6.0) to the new SDK. 

I thought the most straightforward way to do that would be to start with a sample project similar to what I want to do. So I took the Matter Window Cover Sample. I have the nRF54L15-DK so I compiled the project for that board and it seems to work.

Now I use the VSCode button to create a new board. After closing VSCode and opening it again I can select my new custom board as the target for the build. It fails as my custom board is pretty much just boilerplate empty board definitions. So I start copying the contents of the nRF54L15-DK board definitions to my own custom board folder. The aim being to get the project to compile for the same dev kit with my custom board as the target. Ideally I would make no changes to the files but due to custom name I still have to do that. This also means I have to make another partition manager static definition file. I just copy the one used for the DK build and rename it for my custom board.

After fighting with some very hard to fix devicetree errors I get compilation process to reach the partition manager stage and there is something weird happening there. I have the exact same contents for the static definition file as the DK but for my board the build fails complaining about too many gaps in the partitions. I'm attaching the actual file I use for this.

pm_static_blindy_v3_nrf54l15_cpuapp.zip

The error I get from partition manager is this:

-- Found partition manager static configuration : /home/tiit/code/nordic/blindy_matter/pm_static_blindy_v3_nrf54l15_cpuapp.yml
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
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
Partition Configuration:
app:
  size: 1460224
factory_data:
  size: 4096
mcuboot:
  size: 53248
mcuboot_pad:
  size: 2048
mcuboot_primary:
  size: 1462272
mcuboot_primary_app:
  size: 1460224
settings_storage:
  size: 40960

-- Configuring incomplete, errors occurred!

Can you please check what I'm doing wrong here to cause this. This is somehow caused by using the custom board definition. I'm also attaching the whole custom board folder here just in case you can see something weird in there. This is just the folder that has to be extracted into the boards folder and after a VSCode restart it appears as a target for the build.

soma.zip

Hoping to hear back from you after the Easter Holidays,

Tiit

  • Hello,

    Tiit said:
    I see the serial output now so thank you for that. But I still don't understand why this is not working if the same sample built for the DK works. My board files are a direct copy of the DK board files so it should compile to an almost identical binary

    That is not the case. The changes that I did to your board files was copying parts from the DK board files, and into your board files. Perhaps they were a copy of the board files in an older NCS version. I don't know. But e.g. UART was not enabled, which they are in the board files for the DK.

    If you want it to behave like the DK, I suggest you try once more to copy the board files from NCS, and change the name of the files and content to match your own board name's file.

    For your Thread/Matter issues. Do the samples build for the DK? If so, I think you need to compare your board files to the DK's again.

    Best regards,

    Edvin

  • Hi Edvin,

    I'm sorry but I don't understand the changes you made to the board files to be honest. I may be mistaken but it seems that you copied some of the content from the files that the board files included from the SDK directly into the board folder. I'm not sure why that would make a difference though. But the change regarding UART seems to be in the file blindy_v3_nrf54l15_cpuapp.overlay (the line "zephyr,shell-uart = &uart20;" in the "chosen" block. And I don't see that in the othe roverlay file for the DK. The board files I used as a base were from the SDK 3.0.1 that I have used throughout this thread. I think there is a newer version of the SDK out now which I suppose I could try this with but I really don't think I made a mistake since other samples seem to work - it only fails in samples that use Thread. Like I reported in the other response to this I tracked the usage fault to some crypto function that seems to fail when creating key material for Thread initialization.

    I do not "want" to have my board behave like the DK. I want a custom board with just RTT and the external memory to work with the Matter samples. This is just a stepping stone on my path to that as I have been unable to get a Matter sample to work on anything but the official DK so far. THey all seem to fail in Thread setup.

    I have compared my board files to the DK and they look identical to me. The ones that you modified are different and I'm not sure how or why they are like that. But the ones that I have posted should be identical to the DK in the important parts (names have to be different obviously).

    I now have multiple projects being blocked by this and I'm seriously doubting if I can even use the 54 series chips in production next year. I can easily make projects using the 52840 in the same way and even in SDK 3.0.1 they work beautifully with all the Matter samples. This is something specific to the 54 (or the TrustZone).

    Tiit

  • To the left is the folder boards\blindy_v3 that I sent you, and to the right is the boards\blindy_v3 that you sent in the wc.zip file:

    All the blue files have changes:


    Since these were not  here iin the first place, but they are present in the nRF54L15 DK's board files, it makes me believe that you have not copied these files directly. At least not from SDK v3.0.1. If these were not copied, I don't have the exact overview what other parts were not copied when you initially created your board files.

    Best regards,

    Edvin

  • Hi,

    I had another go at making an identical board to the DK again. Attached here is the result. Like I suspected there is absolutely no difference - still fails exactly the same with Thread. I'm not sure how I can communicate my issue more clearly. The issue only happens when Thread is used. It does not seem to be a Matter sample specific thing. I use the exact same process of copying the DK board files and modifying for my own board for the 52840 and there are no issues with that. I have no idea how to proceed from here.

    Tiit

    blindy_v4.zip

  • Seems like it is just bad luck. The coap_server sample doesn't work out of the box with the nRF54L15DK either. Same issue. You can tell from the sample's description that it is not listed as a supported/tested board:
    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/openthread/coap_server/README.html

    However, copying a few files from one of the samples where the nRF54L15 DK is supported, the CLI sample:

    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/openthread/cli/README.html

    mainly, the nrf54l15dk_nrf54l15_cpuapp.conf and nrf54l15dk_nrf54l15_cpuapp.overlay, over to coap_server/boards, then it works on the DK.

    Similarly, copying these files again, and naming them blindy_v4_nrf54l15_cpuapp.conf and blindy_v4_nrf54l15_cpuapp.overlay, and building again, then the sample runs using your board files.

    I will be out of office from after today, for a few weeks. Andreas, who handlet this ticket previously, will also. So if you have any more questions on the topic, I suggest you create a new topic, but hopefully, this will get you going with your custom board files.

    Attached is the modified sample (with the added .conf and .overlay files), that should build and run using your board files, blindy_v4 (tested in NCS v3.0.1)

    If you run into other issues, it may be a good idea to check if it runs correctly on the nRF54L15 DK using the DK's board files.

    1325.coap_server.zip

    Best regards,

    Edvin

Related