<?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>Patching the nRF Connect SDK (Options)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118438/patching-the-nrf-connect-sdk-options</link><description>Hello, 
 I am new to Zephyr and I am trying to figure out the best way to set up a new project for a nRF91 modem. Ideally, the project should allow patching of the nRF Connect SDK in the future if needed. To preface, I have found a few ways to do this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Jan 2025 16:20:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118438/patching-the-nrf-connect-sdk-options" /><item><title>RE: Patching the nRF Connect SDK (Options)</title><link>https://devzone.nordicsemi.com/thread/520600?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2025 16:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50ec1b62-1352-4bba-9c7e-2a0fcfd2dd71</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;Hey Helmut,&lt;/p&gt;
&lt;p&gt;This looks neat and promising! Seems similar to applying patches with git. Thanks for letting me know! I will be looking forward to this if it makes its way to future nRF Connect SDK releases.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Derek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Patching the nRF Connect SDK (Options)</title><link>https://devzone.nordicsemi.com/thread/520599?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2025 16:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3e8867a-ad07-4fc1-8ffc-21e8f2e16658</guid><dc:creator>droberson</dc:creator><description>&lt;p&gt;Hey&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the clarification! I suppose I will stick to the existing methods then.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Derek&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Patching the nRF Connect SDK (Options)</title><link>https://devzone.nordicsemi.com/thread/520598?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2025 16:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940676f5-134b-415c-8239-6721d3463f09</guid><dc:creator>khelmutlord</dc:creator><description>&lt;p&gt;A small thing to add since this is/was a common complaint:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/pull/83243"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/83243&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a new feature and is not yet in Nordic&amp;#39;s fork of Zephyr but may provide a path forward in a future nRF Connect SDK release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Patching the nRF Connect SDK (Options)</title><link>https://devzone.nordicsemi.com/thread/520570?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2025 14:47:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e95b9c1-c6a8-4edd-ab8c-59aed3162615</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are certain scenarios described here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/adding_code.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/adding_code.html&lt;/a&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;strong&gt;Question 1:&amp;nbsp;&lt;/strong&gt;Can you apply a patch by excluding the patched file from the &amp;quot;clean&amp;quot; version of the nRF Connect SDK when it is downloaded with &amp;quot;west update&amp;quot;?&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;Lets say you want to patch the following (Random file I picked):&amp;nbsp;C:\ncs\v2.9.0\nrf\subsys\uart_async_adapter\uart_async_adapter.c&lt;/p&gt;
&lt;p&gt;Is it possible to commit ONLY this file to my project repo (I am using SVN) and exclude it from the nRF Connect SDK download via the west.yml file?&lt;/p&gt;[/quote]
&lt;p&gt;No, that isn&amp;#39;t possible. For such a method, I would recommend forking the repo in question and aligning it towards what you require.&lt;/p&gt;
&lt;p&gt;One could manually patch as well for each checkout, but as you mention; this is error-prone.&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;strong&gt;Edit: Question 2:&lt;/strong&gt; Can you apply patches to the nRF Connect SDK that is installed in the default location (C:\ncs\...) without modifying the SDK itself?&lt;/p&gt;
&lt;p&gt;Perhaps put the patched files in a /patches folder in your project directory and point your project to use that file instead of the one in the nRF Connect SDK? This is what I used to do when developing with the old nRF SDK using Keil uVision IDE.&lt;/p&gt;[/quote]
&lt;p&gt;This is technically possible, but there is no method/command that will ensure that the patches are applied. This required logic will then be pushed onto your application.&lt;/p&gt;
[quote user=""]Is my proposed method of excluding a specific file from the vanilla nRF Connect SDK download possible?[/quote]
&lt;p&gt;If you were to add features, like a i2c-sensor that does not exist in sdk-zephyr or sdk-nrf, one can add this locally to a dedicated&amp;nbsp;application with extra_zephyr_modules (docs link:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/develop/modules.html#integrate-modules-in-zephyr-build-system="&gt;https://docs.zephyrproject.org/latest/develop/modules.html#integrate-modules-in-zephyr-build-system&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;With this, you add both the sensor/driver/i2c/my_sensor .c/.h implementation as well as the DT-yaml files.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, this is for additions, not patching what is already present.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>