Zephyr: Migrate to SDK 2.1 from SDK 1.9.1

I have a custom board based on nRF52840 with some custom peripherals : LEDs, buzzer, buttons, etc

To get my app working I copied the  nrf52840dk_nrf52840  board from the 1.9.1 SDK  and modified the dts file to add my peripherals according to the shematics, and it all worked great

Everything broke in 2.1 - I get undefined labels, overlapping pin assignments and lots  of other errors - can provide the whole list if needed
I'm new to dts and was wondering if there is a better approach that does not require copying the original board.
Is this what overlays are for? Can you point me to the documentation and samples how to customize a standard board dts with peripherals?
Thank you 
Parents
  • Hello Andy,

    First of all, when it comes to getting familiar with dts etc., I would also recommend taking a look at the DevAcademy (this also mentions certain differences between the NCS versions that might be interesting to you). You'll probably find the majority of your questions on dts answered there. It's true like you say that overlay files can be very helpful when you only want minor changes. The overlay file lets you modify certain parts of the dts file by simply adding the overlay. 

    I'm new to dts and was wondering if there is a better approach that does not require copying the original board.

    When it comes to a custom board it might be that it pays off to modify the board file of the DK instead. One reason for this is that it might be hard to know about all the different files you need. For more on this you can for instance take a look at this webinar, though I believe this part might be covered in DevAcademy as well.

    Can you point me to the documentation and samples how to customize a standard board dts with peripherals?

    You can for instance have a look here.

    Everything broke in 2.1 - I get undefined labels, overlapping pin assignments and lots  of other errors - can provide the whole list if needed

    Yes, unfortunately there are a few differences between these versions of NCS. I would recommend (like Jtrueb also did below) to take a look at the release notes and migration guides. One thing to mention that is rather new in NCS 2.0 is the new pinctrl API. You can convert to this new setup using the migration script.

    There might be bigger differences between the two NCS versions that I've currently overlooked, let me know if you have questions about any one in particular.

    Regards,

    Elfving

Reply
  • Hello Andy,

    First of all, when it comes to getting familiar with dts etc., I would also recommend taking a look at the DevAcademy (this also mentions certain differences between the NCS versions that might be interesting to you). You'll probably find the majority of your questions on dts answered there. It's true like you say that overlay files can be very helpful when you only want minor changes. The overlay file lets you modify certain parts of the dts file by simply adding the overlay. 

    I'm new to dts and was wondering if there is a better approach that does not require copying the original board.

    When it comes to a custom board it might be that it pays off to modify the board file of the DK instead. One reason for this is that it might be hard to know about all the different files you need. For more on this you can for instance take a look at this webinar, though I believe this part might be covered in DevAcademy as well.

    Can you point me to the documentation and samples how to customize a standard board dts with peripherals?

    You can for instance have a look here.

    Everything broke in 2.1 - I get undefined labels, overlapping pin assignments and lots  of other errors - can provide the whole list if needed

    Yes, unfortunately there are a few differences between these versions of NCS. I would recommend (like Jtrueb also did below) to take a look at the release notes and migration guides. One thing to mention that is rather new in NCS 2.0 is the new pinctrl API. You can convert to this new setup using the migration script.

    There might be bigger differences between the two NCS versions that I've currently overlooked, let me know if you have questions about any one in particular.

    Regards,

    Elfving

Children
Related