Custom Board Creation with nrf53 and the pinectrl.dtsi, how do I rename the file? Do I edit the nrf5340_cpuapp_common-pinectrl.dtsi?

I have been through the devacademy lesson on custom boards and am using the nRF53 so have used the custom board for multi-core approach. The example uses the 9151 which has a simpler file structure. Do I equate the changes to the nrf9151ds_nrf9151_pinectrl.dtsi with the nrf5340_cpuapp_common-pinectrl.dtsi?

The naming convention is different in the nrf5340 directory. It does not start with the nrf5340dk. It starts with the nrf5340 and is not preceeded by the nrf5340dk. Do I change the name? Is that where I make my edits?

I also see the nrf5340dk_common.dtsi but it ony really has the leds, buttons, and some alias'.

I'm not sure how I should change my file structure to accomodate the changes. What should the file structure look like with a custom board (say mycustomboard)?

nrf5340_cpuapp_common.dtsi includes:

#include "mycustomboard_common.dtsi"
#include "nrf5340_cpuapp_common-pinctrl.dtsi"

neither the nrf5340_cpuapp_common.dtsi or the nrf5340_cpuapp_common-pinctrl.dtsi were renamed as demonstrated in the DevAcademy Adding Custom Board Support session because the files were not named nrf5340dk_nrf5340_cpuapp_common.dtsi  like the nrf9151dk. Here is the instruction:

 

Press (F2) or right-click on each file and select rename. Rename the files from the old name that is prefixed with nrf9151dk_****_**** to the new name devacademyl3e2_****_****. Also, make sure to rename Kconfig.nrf9151dk to Kconfig.devacademyl3e2 .

Which results in naming these files:

To these files:

In my directory, because I'm using the nrf5340, I have two addtional files:

Do I need to do something differently because of this?

  • Hi,

    The nRF9151 has a simpler file structure than the nRF5340 because the nRF5340 has two cores: one application core and one network core. Because of this, there will be separate files for the two cores, and you might also have files for things common for both cores, such as the nrf5340dk_common.dtsi. You can see which core the files are for by looking at the filenames and whether they include "cpuapp" or "cpunet".

    The file nrf5340dk_common.dtsi does not need to be renamed, as it is only included in the nrf5340_cpuapp_common.dtsi and nrf5340dk_nrf5340_cpunet.dts files, so as long as the filename corresponds with what is included there, then it is fine. The same is true for nrf5340_cpuapp_common.dtsi and nrf5340_cpuapp_common-pinctrl.dtsi. However, renaming them to not mix them with the DK files can still be a good idea. In that case, you can rename them whatever you want, for example, "nrf5340_devacademyl3e2-pinctrl.dtsi" if you have called your board "devacademyl3e2" Then you need to make sure to change this in the files that include the files you rename.

    Best regards,
    Marte

Related