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

  • Hi

    So "adding all the overlays you think are necessary" and the parts of the DK board file you think are necessary is the wrong way to go about this I think. Rather begin with the working DK sample project and remove one and one of the things you don't need, rebuilding the project inbetween so you're able to see at which point the application starts failing so we know what the cause is exactly.

    Best regards,

    Simon

  • Hi Simon,

    I'm not sure you understand my problem. I want to build the Matter Window cover sample for a custom board. How do I do that? Please describe step by step how I can do that. I can build the sample for the DK already.

    My whole problem is I have nothing to start from with this. I want to create a starting point - a board definition that is exactly like the DK. I can't just start modifying the DK files inside the SDK (well I could technically but that would be the ugliest way imaginable to approach this). I need a custom board inside the project folder that builds and runs the sample on the DK hardware. Then I will start doing exactly what you said - step by step modifications to get to my real board. But right now I have nothing to start from.

    Tiit

  • Hi

    Please check out the Defining custom board documentation page for a starting point in defining your own boards. Are you saying that duplicating the DK board file and making a copy somewhere else in the SDK won't work on your end?

    Best regards,

    Simon

  • That is exactly what I'm saying. Can you please try the project or board files that have been linked to this ticket multiple times already. This exact same conversation has been had in this thread more than once already. Following that guide is useless for Matter samples as they have very complex requirements for the board and that guide shows how to get a blinky sample running. Blinky samples work with thees board files. Almost all samples work but Matter does not. Please just try the files linked here and see for yourself.

    Tiit

  • Hi

    Sorry about the misunderstandings here, and I'm trying to recreate it on my end now with the blindy_v4 files you've shared, but it seems like you have a lot of discrepancies from the DK file in the config files at least. I'm trying to build it for the nRF54L15_cpuapp_ns target for the window_covering sample project, but need some more pointers on how to recreate this runtime error. Also, how does this runtime error look on your end?

    If I can recreate it or get some information on how it fails in runtime I can ping the correct developers to try getting somewhere with this, as your description indeed sounds like an issue building Matter projects for custom targets.

    Best regards,

    Simon

Related