<?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>Building lwm2m_client sample fails if its configured for FOTA support</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109400/building-lwm2m_client-sample-fails-if-its-configured-for-fota-support</link><description>Dear Nordic support team 
 (This issue is similar to Case ID: 318424) 
 I would like to test the FOTA functionality using the the LwM2M client sample project. 
 So far, I was not able to build the project without the following error: 
 In file included</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Mar 2024 07:50:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109400/building-lwm2m_client-sample-fails-if-its-configured-for-fota-support" /><item><title>RE: Building lwm2m_client sample fails if its configured for FOTA support</title><link>https://devzone.nordicsemi.com/thread/475540?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2024 07:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bad47fc0-6aa4-40c6-84e8-f062e29c4b9f</guid><dc:creator>StefanL</dc:creator><description>&lt;p&gt;Hi Andreas&lt;br /&gt;&lt;br /&gt;Thanks for the explanation on how .overlay files are included in the build, that&amp;#39;s very valuable (I&amp;#39;ll also dig into the linked further docu about that).&lt;/p&gt;
&lt;p&gt;Also thanks for your answer to my question whether the FOTA needs further overlays or not.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now upgraded my local SDK and toolchains installation to v2.6.0.&lt;/p&gt;
&lt;p&gt;Just for info... there is one single warning left when I build the lwm2m_client example:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new, courier;"&gt;CMake Warning at cmake/version.cmake:22 (message):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new, courier;"&gt;&amp;nbsp; Actual TF-M version is not available from Git repository.&amp;nbsp; Settled to v2.0.0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;However, I can probably ignore this one for now.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building lwm2m_client sample fails if its configured for FOTA support</title><link>https://devzone.nordicsemi.com/thread/475034?ContentTypeID=1</link><pubDate>Thu, 21 Mar 2024 09:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c3601ad-42ec-48fd-989e-33c9e471e3ef</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I described this in a &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108615/sdk-v2-5-99-dev1-has-many-compile-errors/475027"&gt;different case&lt;/a&gt;&amp;nbsp;with a similar description of build conifguration as you&amp;#39;ve done, which I will repeat here (reply will be similar but changed for your setup)&lt;/p&gt;
&lt;p&gt;In general you don&amp;#39;t need to specify the configuration and the device tree overlay unless you want to use any configuration that is not identical to &amp;lt;your_board&amp;gt;.overlay. If you use &amp;quot;System default&amp;quot;, then the build system will use the prj.conf that exists in the source folder. Next it will look at the board you&amp;#39;ve selected, and if it is a board file that is supported in the SDK out of the box, it will use the default board files located in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/boards/arm/,"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/boards/arm/,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;for instance the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/boards/arm/nrf52840dk_nrf52840"&gt;nRF52840DK&lt;/a&gt;, or the nRF9160DK that is located in the same folder.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After it has found this board, it will use this to configure the board and next look for any overlay files within your project. The build system will always use &amp;lt;your_board&amp;gt;.overlay if it exists. In this case it does exist within boards/nrf9160dk.nrf9160.overlay, so it will automatically be included.&lt;/p&gt;
&lt;p&gt;This is explained in greater detail under the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build.html"&gt;Configuration and building&lt;/a&gt;&amp;nbsp;pages in our documentation as well as in our academy pages, more specifically in the first 3 lessons in&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you at a later point in time might get to adding a custom board to your projects, we also have documentation for this. Lesson 3 in the intermediate course also shows how to do this:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this case you might have a custom board thats named &lt;em&gt;nrf9160dk_nrf9160_custom&lt;/em&gt;&amp;nbsp;with your custom board file located either in tree or in your project.&lt;em&gt;&amp;nbsp;&lt;/em&gt;In this case it will look for &lt;em&gt;nrf9160dk_nrf9160_custom.overlay&lt;/em&gt;&amp;nbsp;in your project and if you only have a&amp;nbsp;&lt;em&gt;nrf9160dk_nrf9160.overlay&lt;/em&gt; it will not use that since it is specifically looking for an overlay with the same name as the board used in the configuration.&lt;/p&gt;
&lt;p&gt;The following configuration resulted in a successful build with no warnings on my end (Windows 10, NCS 2.6.0, Toolchain v2.6.0):&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0878.pastedimage1711013262641v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In the build/.config you can cross examine the chosen configurations thats been extracted from the .dts, .config and .overlay files in the configuration phase of the build procedure. If you see anything thats missing from for instance one of the overlay files, you can add that overlay file as a Kconfig fragment in the build configuration and it will add this overlay as a fragment to lay over the board file and the automatically included overlay files that corresponds to your board.&lt;/p&gt;
[quote user="StefanL"]&lt;p&gt;I just want to test FOTA of the ESW flashed onto the nRF9160. &lt;span lang="en"&gt;&lt;span&gt;&lt;span&gt;Apparently I don&amp;#39;t need the overlays for that, do I?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I am assuming that this should work out of the box by simply building for nRF9160dk_nrf9160_ns as I show above and that any configurations that you want to specify is for special cases&lt;/p&gt;
&lt;p&gt;Let me know if this clarifies things some more for you, I know that overlay files and the build configuration page in the extension may be a bit misleading unless you have read the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build.html"&gt;Configuration and building&lt;/a&gt;&amp;nbsp;pages up and down in combination with the academy course and the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/index.html"&gt;zephyr build and configuration&lt;/a&gt;&amp;nbsp;pages&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building lwm2m_client sample fails if its configured for FOTA support</title><link>https://devzone.nordicsemi.com/thread/474628?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:19:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5e72700-42ac-4b2d-82e5-8511480599bc</guid><dc:creator>StefanL</dc:creator><description>&lt;p&gt;Hi Andreas&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my config:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1710853702530v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s the result after I configured additional CMake arguments according to the sample description and reopened the &amp;quot;Edit Build Configuration&amp;quot; dialog.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1710853828750v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I tried your advice to select &amp;quot;Use build system default&amp;quot; but this didn&amp;#39;t help. Interestingly the &amp;quot;Configuration&amp;quot; setting falls back to prj.conf after the unsuccessful build.&lt;/p&gt;
&lt;p&gt;However, if I just compile the plain sample project, without additional Kconfig fragments or Devicetree overlays. The build succeeds (with few warnings).&lt;/p&gt;
&lt;p&gt;I just want to test FOTA of the ESW flashed onto the nRF9160. &lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Apparently I don&amp;#39;t need the overlays for that, do I?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;BR, Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building lwm2m_client sample fails if its configured for FOTA support</title><link>https://devzone.nordicsemi.com/thread/474611?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 12:47:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0b151a5-81da-4c41-a174-e963f7bd394e</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like some configurations were not included properly. Could you post a screenshot of how you selected your build configuration?&lt;/p&gt;
&lt;p&gt;If you selected &amp;quot;prj.conf&amp;quot; under &amp;quot;Configuration&amp;quot; when setting up the build configuration, you should instead use &amp;quot;Use build system default&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1710852236888v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>