<?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>Multi image project as Zephyr module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117943/multi-image-project-as-zephyr-module</link><description>Hello, 
 I&amp;#39;ve been working with nRF9160 for a while now and wanted to let you know, I love this little piece of hardware. The possibilities, the small form factor, the power consumption - everything seems to be really great! About the issue. I&amp;#39;ve created</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jan 2025 15:17:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117943/multi-image-project-as-zephyr-module" /><item><title>RE: Multi image project as Zephyr module</title><link>https://devzone.nordicsemi.com/thread/518682?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 15:17:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6f56086-6fb4-4f80-9b7e-e0fa624f435b</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="a_ku"]Thanks for sharing these. I&amp;#39;ve been working with nRF9160 for a while now. At the beginning of getting to know nRF9160 I went thru all these courses and at some point of development I returned to some specific topics for a real life case![/quote]
&lt;p&gt;Glad to hear that!&lt;/p&gt;
[quote user="a_ku"]The suggested approach seems to be the same idea which I did not quite like - to have a base project and just copy/paste it for each device, which could work just fine to be honest. Ultimately the idea is to build some sort of SDK (not really sure I can call it like that) that relies on nRF SDK with this &amp;#39;core&amp;#39; app embedded in it. The end user could create his project with &amp;#39;core&amp;#39; functionality already added, write the .overlay, .conf and other necessary configuration files and his project is up and running. It just does not seem a good solution that end user need to copy/paste base project and then add the necessary sensor drivers or whatever he needs to &amp;#39;src&amp;#39;, &amp;#39;inc&amp;#39; folders. I hope I explained myself well enough for you to understand.&amp;nbsp;[/quote]
&lt;p&gt;I&amp;#39;ve discussed this topic with some of my colleagues and I think I understand what you&amp;#39;re aiming for better now.&amp;nbsp;Please verify if I&amp;#39;ve still not understood what you&amp;#39;re after:&lt;/p&gt;
&lt;p&gt;Your core application should work as a template for which you and your end users can quickly add modules on top, for instance select a type of DFU and/or BLE features or TFM.&amp;nbsp;In essence yes this is possible with zephyr but it might require a tool tailored for this if you wish to have it as a solution where you ask the users are asked a set of yes/no questions such as &amp;quot;Do you want DFU? A: Y -&amp;gt; single bank serial recovery? A: N -&amp;gt;&amp;nbsp; dual bank fota? A:Y -&amp;gt; External flash -&amp;gt; A:y and from there you automatically include relevant KConfigs, dts iems, sysbuild configurations and prj.conf.&lt;/p&gt;
&lt;p&gt;This is also possible to do with custom project configurations&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_config.html#assigning_kconfig_fragments"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_config.html#assigning_kconfig_fragments&lt;/a&gt;&amp;nbsp;and CMake options&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/config_and_build/cmake/index.html#providing_cmake_options"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/config_and_build/cmake/index.html#providing_cmake_options&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is to some extent done in a couple of different samples already, and done under the hood for certain configurations, for instance if you set the KConfig for serial recovery it will use that part of the configuration that is relevant from the MCUboot repository within nRF Connect SDK / Zephyr, or within certain samples that has a minimal_prj.conf present you can with a minimal configuration.&lt;/p&gt;
[quote user="a_ku"]Okay but what are the zephyr modules used for then? Are they just like libraries of simple (single image) projects? Based on Zephyr modules description they seem like the ideal solution to my problem but i guess not in the case of multi-image build.[/quote]
&lt;p&gt;I think I&amp;#39;m a bit lost here, are you referring to the samples/modules repository&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/modules"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/modules&lt;/a&gt;? If so, then yes, these are just a set of samples for modules.&lt;/p&gt;
[quote user="a_ku"]&lt;p&gt;Could the Sysbuild be able to do what I am trying to achieve here?&lt;/p&gt;
&lt;p&gt;Based on the documentation: &amp;quot;&lt;span&gt;Sysbuild works by configuring and building at least a Zephyr application and, optionally, as many additional projects as you want. The additional projects can be either Zephyr applications or other types of builds you want to run&lt;/span&gt;&amp;quot;, so I guess I will give it a try&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Sysbuild will allow you to do this yes, through &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/companion_components.html"&gt;companion components&lt;/a&gt;. This is also present in the build system that preceded sysbuild (child_images), but more limited. This will loop around to my first section in this reply w.r.t doing this with custom project configurations, CMake options as well as you&amp;#39;ve described: &amp;quot;An application and, optionally, as many additional projects you want...&amp;quot;&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: Multi image project as Zephyr module</title><link>https://devzone.nordicsemi.com/thread/518607?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 11:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:352b655c-a87b-48e0-996f-fe650a33672e</guid><dc:creator>a_ku</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Could the Sysbuild be able to do what I am trying to achieve here?&lt;/p&gt;
&lt;p&gt;Based on the documentation: &amp;quot;&lt;span&gt;Sysbuild works by configuring and building at least a Zephyr application and, optionally, as many additional projects as you want. The additional projects can be either Zephyr applications or other types of builds you want to run&lt;/span&gt;&amp;quot;, so I guess I will give it a try&amp;nbsp;&lt;br /&gt;&lt;br /&gt;EDIT: correct me if I&amp;#39;m wrong, zephyr modules and sysbuild applications wont work because the TFM and MCUboot inclusion need to be exposed at the top project, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi image project as Zephyr module</title><link>https://devzone.nordicsemi.com/thread/518264?ContentTypeID=1</link><pubDate>Tue, 14 Jan 2025 14:37:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5f2c085-d966-4d78-b937-8d1cee280a7f</guid><dc:creator>a_ku</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Sorry for the late response. The site was not working for me today up until now.&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/117943/multi-image-project-as-zephyr-module/518196"]First of I recommend you to have a look at the &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;fundamentals&lt;/a&gt;, &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt;intermediate &lt;/a&gt;and the &lt;a href="https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/"&gt;cellular &lt;/a&gt;course[/quote]
&lt;p&gt;Thanks for sharing these. I&amp;#39;ve been working with nRF9160 for a while now. At the beginning of getting to know nRF9160 I went thru all these courses and at some point of development I returned to some specific topics for a real life case!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The suggested approach seems to be the same idea which I did not quite like - to have a base project and just copy/paste it for each device, which could work just fine to be honest. Ultimately the idea is to build some sort of SDK (not really sure I can call it like that) that relies on nRF SDK with this &amp;#39;core&amp;#39; app embedded in it. The end user could create his project with &amp;#39;core&amp;#39; functionality already added, write the .overlay, .conf and other necessary configuration files and his project is up and running. It just does not seem a good solution that end user need to copy/paste base project and then add the necessary sensor drivers or whatever he needs to &amp;#39;src&amp;#39;, &amp;#39;inc&amp;#39; folders. I hope I explained myself well enough for you to understand.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Okay but what are the zephyr modules used for then? Are they just like libraries of simple (single image) projects? Based on Zephyr modules description they seem like the ideal solution to my problem but i guess not in the case of multi-image build.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Maybe any other ideas how could I achieve the above mentioned goal?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Adrian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multi image project as Zephyr module</title><link>https://devzone.nordicsemi.com/thread/518196?ContentTypeID=1</link><pubDate>Mon, 13 Jan 2025 15:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74773ca5-bd11-4dce-8183-a428740fca26</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi Adrian,&lt;/p&gt;
&lt;p&gt;First of I recommend you to have a look at the &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;fundamentals&lt;/a&gt;, &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt;intermediate &lt;/a&gt;and the &lt;a href="https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/"&gt;cellular &lt;/a&gt;course on our academy pages, which will go through some more of the basics of maintaining a code &amp;quot;core&amp;quot; as you call it and to use this as a fundament to branch out to other modular projects.&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf91/index.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf91/index.html &lt;/a&gt;is also a great resource to have at hand.&lt;/p&gt;
&lt;p&gt;Most of this may be redundant information as I don&amp;#39;t know your knowledge level, but nonetheless the pages are great to know of.&lt;/p&gt;
&lt;p&gt;So to one (maybe all) of your questions:&lt;/p&gt;
[quote user=""]The easiest way to get this working is just by branching off core project for each device project but that does not seem like a good way to do it. Maybe there are some more modular possibilities to achieve the result?&amp;nbsp;[/quote]
&lt;p&gt;The way I understand how you describe your &amp;quot;core&amp;quot; is similar to the approach within NCS where the samples are tailored to show various concepts and show them relatively simple. In your case, you could for instance have &amp;quot;Adrians hello world featuring mcuboot with dual bank dfu and TFM&amp;quot; as your basic application and then make a copy of this &amp;quot;template&amp;quot; and add the features you need for your various applications. It is very flexible and how you maintain it can be very up to you. Do note that it might be hard to maintain your core over multiple releases of the SDK, so I would recommend that you have one &amp;quot;core&amp;quot; for every release you intend to work with and/or to migrate the core according to the migration guides on our documentation pages.&lt;/p&gt;
&lt;p&gt;Let me know if I&amp;#39;ve answered some or all of your questions&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;andreas&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>