How to set up a new board

We are currently thinking about implementing LE-Audio in CIS mode by reusing the sample program nRF5340_Adudio.

There are two types of boards to create: a transceiver board and a receiver board.Since the codec IC etc. are different from the sample nRF5340 Audio DK board, it is necessary to rewrite the devicetree.

The sample devicetree file looks at the ncs folder, and it is not possible to directly change the dts file in the ncs folder, so we are considering the following two methods.

1. How to create a dts file in the app folder (copy the dts file in the ncs folder to the app folder) and update that file
2. How to create and update overkay files in app folder

In the case of method 1, it is unclear how it can be achieved.
In the case of method 2, it is unclear how to reduce the items such as LEDs that have already been set in ncs.

There are some things that are unclear.

Please tell me how to achieve each method.

Parents
  • Hello,

    You didn't say that you wanted to do that, but don't edit the existing .dts files. That is not the way to do it in Zephyr.

    If you are creating a new board, then you can do either of the options that you suggest. I would say that the most "correct" way is to create your own board file. You can place this anywhere you want to outside the NCS root folder, and link this to your build system. If you are using Visual Studio Code, then entering this path once will cause it to stick to the VS Code. 

    I believe the "Defining a custom board" section in our documentation covers this pretty well. Give it a go, and let me know if you are stuck.

    There is also an option to add a board .overlay file to your application. But if you do this, you will need to use this file (or a version of it) for every application that you are using your board. That is also an option. If so, just add a file called nrf5340dk_nrf5340_cpuapp.overlay, and the compiler should pick it up. 

    In case there are sections that you want to edit, you can just copy them from the .dts file, and change whatever you like. It is also possible to remove entire properties using the /delete-property/ syntax, as described here:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/howtos.html#use-devicetree-overlays

    Best regards,

    Edvin

Reply
  • Hello,

    You didn't say that you wanted to do that, but don't edit the existing .dts files. That is not the way to do it in Zephyr.

    If you are creating a new board, then you can do either of the options that you suggest. I would say that the most "correct" way is to create your own board file. You can place this anywhere you want to outside the NCS root folder, and link this to your build system. If you are using Visual Studio Code, then entering this path once will cause it to stick to the VS Code. 

    I believe the "Defining a custom board" section in our documentation covers this pretty well. Give it a go, and let me know if you are stuck.

    There is also an option to add a board .overlay file to your application. But if you do this, you will need to use this file (or a version of it) for every application that you are using your board. That is also an option. If so, just add a file called nrf5340dk_nrf5340_cpuapp.overlay, and the compiler should pick it up. 

    In case there are sections that you want to edit, you can just copy them from the .dts file, and change whatever you like. It is also possible to remove entire properties using the /delete-property/ syntax, as described here:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/howtos.html#use-devicetree-overlays

    Best regards,

    Edvin

Children
No Data
Related