<?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>nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71589/nrf-connect-sdk-customized-mcuboot-with-zephyr</link><description>Hello! 
 
 I&amp;#39;m tinkering with the NCS libraries, and I&amp;#39;m really liking the way this is turning out coming from the nRF5 SDK! My question is what is the best practice for creating a customized mcuboot build? My current setup is on Linux using primarily</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Feb 2021 07:33:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71589/nrf-connect-sdk-customized-mcuboot-with-zephyr" /><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/296151?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 07:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08b82f08-3d2b-46f1-a9b9-726823fe5b72</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;No, I&amp;#39;m afraid that I have never seen that before.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/296139?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 05:13:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aa780b3-3c37-4374-9b4b-9dfe3745c8a3</guid><dc:creator>macklenc</dc:creator><description>&lt;p&gt;Ah, interesting, that may have fixed it. Any idea why the file got changed on me?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m running&amp;nbsp;&lt;span&gt;West version: v0.9.0&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/295497?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2021 08:52:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2296537-f084-4902-9251-7d4090d4075d</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Try to change .west/config to the following:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[manifest]
path = nrf
[zephyr]
base = zephyr
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What version of west are you running?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/295418?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2021 19:08:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c7a564-ab42-4d49-a24d-7646824ae69c</guid><dc:creator>macklenc</dc:creator><description>&lt;p&gt;I added the exports you specified to my bashrc and tried swapping over to bash (I usually use zsh). But it doesn&amp;#39;t seem to have improved anything. I went to the ncs folder and tried building the smp_svr example again using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52dk_nrf52832 zephyr/samples/subsys/mgmt/mcumgr/smp_svr -- -DOVERLAY_CONFIG=overlay-bt-tiny.conf&lt;/pre&gt;and I got this error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] &amp;lt;command&amp;gt; ...
west: error: argument &amp;lt;command&amp;gt;: invalid choice: &amp;#39;build&amp;#39; (choose from &amp;#39;init&amp;#39;, &amp;#39;update&amp;#39;, &amp;#39;list&amp;#39;, &amp;#39;manifest&amp;#39;, &amp;#39;diff&amp;#39;, &amp;#39;status&amp;#39;, &amp;#39;forall&amp;#39;, &amp;#39;help&amp;#39;, &amp;#39;config&amp;#39;, &amp;#39;topdir&amp;#39;, &amp;#39;selfupdate&amp;#39;)&lt;/pre&gt;I&amp;#39;m running the above command in /home/user/devel/ncs, and ncs does have a .west folder:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;bootloader  project  mbedtls  modules  nrf  nrfxlib  smp_svr  test  tools  .west  zephyr&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Although, the .west/config file doesn&amp;#39;t look like what I&amp;#39;d expect:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[manifest]
path = smp_svr
file = west.yml

[zephyr]
base = zephyr&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/294558?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 09:02:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cb90b92-5f15-48a1-841c-8d114acb6b8c</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="macklenc0"]For answer #2, I had followed those instructions (a couple of times TBH), but I got mixed results. [/quote]
&lt;p&gt;&amp;nbsp;I&amp;#39;ve discussed the issue with one of our Linux experts. When running the command from my last comment, you need to run this in the current terminal you are working in. If you are standing in the out-of-tree folder, then it would be:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;source /home/user/devel/ncs/zephyr/zephyr.sh&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also, you should delete&amp;nbsp;the build folder in your out-of-tree folder to see if this can help to remove the issues you are seeing.&lt;/p&gt;
&lt;p&gt;One suggestion from our Linux expert is to add the following to your ~/.bashrc:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GCCARMEMB_TOOLCHAIN_PATH=/home/user/gnuarmemb
source /home/user/devel/zephyr/zephyr-env.sh&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This way your script will be called every time you open a terminal.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/294505?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 01:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8185ba0c-1072-4a4a-9405-c26b9c1d4221</guid><dc:creator>macklenc</dc:creator><description>&lt;p&gt;Thanks for the fast reply, I think answer #1 will help me in the near future. What I&amp;#39;m looking to do is add a line of code to the bootloader to hold a pin high. In the architecture I&amp;#39;m working with, this pin is required to be kept on through all stages of the boot process: bootloader-&amp;gt;mcuboot-&amp;gt;app. So I need to slightly modify the source code for the provided software (to my knowledge).&lt;/p&gt;
&lt;p&gt;I&amp;#39;m guessing the best way to maintain the portability of the project would be to keep my own copy of the bootloader that&amp;#39;s cloned for the upstream repo, and periodically updated via rebasing. Is it possible to tell the build system where to look to build the child project?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For answer #2, I had followed those instructions (a couple of times TBH), but I got mixed results. The only way I could get the examples to compile reliable out-of-tree was to throw everything into a docker container, but that&amp;#39;s not an ideal solution. What&amp;#39;s really odd is that I checked my environment variables during a successful build, and during a failed build and they were exactly the same. The error always seems to have something to do with being unable to find the SDK. But I know it&amp;#39;s finding the cmake files since that reside in the zephyr folder.&lt;/p&gt;
&lt;p&gt;It also will periodically inform me that &amp;quot;west build&amp;quot; is not an option when I&amp;#39;m building from the app directory (see original post), even immediately after sourcing the env script. For example, here&amp;#39;s a trimmed down version of my current environment:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ZEPHYR_BASE=/home/user/devel/ncs/zephyr
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
GNUARMEMB_TOOLCHAIN_PATH=/home/user/gnuarmemb&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect SDK customized mcuboot with Zephyr</title><link>https://devzone.nordicsemi.com/thread/294408?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 13:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c154ec1-b4d5-4cb4-950a-429670cc4288</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]My question is what is the best practice for creating a customized mcuboot build?[/quote]
&lt;p&gt;&amp;nbsp;Have a look at the answer from my colleague Heidi here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/69344/how-to-create-a-mcuboot-image-and-an-application-image-without-modifying-the-sdk/286319#286319"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/69344/how-to-create-a-mcuboot-image-and-an-application-image-without-modifying-the-sdk/286319#286319&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]is it necessary to leave my project as a subfolder of the NCS tools folder?[/quote]
&lt;p&gt;&amp;nbsp;No, you can build out of tree. Have a look at &amp;quot;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.99-dev1/nrf/gs_installing.html#setting-up-the-command-line-build-environment"&gt;Setting up the command line build environment&lt;/a&gt;&amp;quot;. For linux you need to run:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;source zephyr/zephyr-env.sh&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope&amp;nbsp;this helps.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>