<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93503/zephyr-migrate-to-sdk-2-1-from-sdk-1-9-1</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Nov 2022 11:37:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93503/zephyr-migrate-to-sdk-2-1-from-sdk-1-9-1" /><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/394892?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 11:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2afb0cb3-f588-4ff0-872e-be4f2f54f447</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Great! Glad to hear you figured it out.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/394810?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 21:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4015f350-4fa5-4813-bfd3-e9bdb45154e7</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;Update&lt;br /&gt;Got it to work&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VIBR_NODE_ALIAS&lt;/span&gt;&lt;span&gt; &amp;nbsp; &lt;/span&gt;&lt;span&gt;DT_ALIAS&lt;/span&gt;&lt;span&gt;(vib1)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;// This method works in SDK 2.1&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio_dt_spec&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;dt_spec&lt;/span&gt;&lt;span&gt; = &amp;nbsp;&lt;/span&gt;&lt;span&gt;GPIO_DT_SPEC_GET_OR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;VIBR_NODE_ALIAS&lt;/span&gt;&lt;span&gt;, gpios, {&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;});&lt;br /&gt;Then in the code use dt_spec.port which the pointer to struct device&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;My port to SDK2.1.1 is now complete&lt;br /&gt;Thank you all for help .&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/394275?ContentTypeID=1</link><pubDate>Sun, 06 Nov 2022 14:34:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:852fc360-b49a-4c44-9212-79105ba25045</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;OK, the update went smoother than I expected&amp;nbsp; - the pinctrl and namespace scripts really helped&lt;/p&gt;
&lt;p&gt;It compiles an (mostly) runs but some things do not work.&lt;/p&gt;
&lt;p&gt;I have vibrator on my board that is accessed via a GPIO pin which is defined as follows in the dts&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;custom_pins&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;gpio-keys&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;vibrator:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;vibrator_1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;gpios&lt;/span&gt;&lt;span&gt; = &amp;lt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;13&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO_ACTIVE_LOW&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;label&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;Vibrator pin&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;It is&amp;nbsp; also in the aliases list:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;aliases:{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;vib1&lt;/span&gt;&lt;span&gt; = &amp;amp;&lt;/span&gt;&lt;span&gt;vibrator&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;};&lt;/div&gt;
&lt;div&gt;In the code I have this&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VIBR_NODE&lt;/span&gt;&lt;span&gt; &amp;nbsp; &lt;/span&gt;&lt;span&gt;DT_ALIAS&lt;/span&gt;&lt;span&gt;(vib1)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;VIB_LABEL&lt;/span&gt;&lt;span&gt; &amp;nbsp; &lt;/span&gt;&lt;span&gt;DT_LABEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;VIBR_NODE&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;But when I call&amp;nbsp; device_get_binding(VIB_LABEL)&lt;/p&gt;
&lt;p&gt;it returns NULL.&lt;/p&gt;
&lt;p&gt;I tried using&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;GPIO_DT_SPEC_GET&lt;/span&gt;&lt;span&gt;(VIBR_NODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;, gpios) but that does not compile&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;What am I missing?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/393926?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 14:03:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baf4e0b3-2962-4b1f-a1d0-1f031e22f1ab</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Great!&amp;nbsp;Let me know when you do.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/393902?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 13:37:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb7f0f33-e7dc-444c-bb80-6317c654a706</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;Thank you both very much. That&amp;#39;s a good start. The pinctl conversion script worked fine . I may have more questions as I go through all my peripherals, will update here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/393887?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 13:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa51ce86-e481-4de2-a128-8c4784abe8cd</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello Andy,&lt;/p&gt;
&lt;p&gt;First of all, when it comes to getting familiar with dts etc., I would also recommend taking a look at the &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;DevAcademy&lt;/a&gt;&amp;nbsp;(this also mentions certain differences between the NCS versions that might be interesting to you). You&amp;#39;ll probably find the majority of your questions on dts answered there. It&amp;#39;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.&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;span&gt;I&amp;#39;m new to dts and was wondering if there is a better approach that does not require copying the original board.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;When it comes to a custom board it might be that it pays off to&amp;nbsp;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. &lt;a href="https://youtu.be/KSivO9Cf1TE?t=905"&gt;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&lt;/a&gt;.&lt;/p&gt;
[quote user=""]Can you point me to the documentation and samples how to customize a standard board dts with peripherals?[/quote]
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/drivers/drivers.html#driver-samples"&gt;You can for instance have a look here.&lt;/a&gt;&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;span&gt;Everything broke in 2.1 - I get undefined labels, overlapping pin assignments and lots&amp;nbsp; of other errors - can provide the whole list if needed&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;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&amp;nbsp;release notes and migration guides. One thing to mention that is rather new in NCS 2.0 is &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.1/nrf/ug_pinctrl.html#migration-of-the-devicetree-files"&gt;the new pinctrl API.&lt;/a&gt;&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.1/nrf/ug_pinctrl.html#migration-script"&gt;You can convert to this new setup using the migration script.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There might be bigger differences between the two NCS versions that I&amp;#39;ve currently overlooked, let me know if you have questions about any one in particular.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: Migrate to SDK 2.1 from SDK 1.9.1</title><link>https://devzone.nordicsemi.com/thread/393763?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 01:31:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fd985eb-3960-4cd9-b64c-133e9ec1d2b3</guid><dc:creator>jtrueb</dc:creator><description>&lt;p&gt;A lot of stuff broke between 1.9.1 and 2.1 in bugs, tooling, and interface design. I&amp;#39;m in the same boat. You&amp;#39;ll need to check the release notes for each version, migration guides, and known issues.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/release_notes.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/release_notes.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/known_issues.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/known_issues.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The developer academy touches on a couple things that changed.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>