<?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>nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85680/nrf9160dk-fota-using-external-flash</link><description>Hi all, 
 I&amp;#39;m wondering if there is a sample code that implements FOTA (would be great if it&amp;#39;s from AWS S3 bucket) for nrf9160dk. This was the closest thing I was able to find, but it works for nrf52840dk. I guess I could add an overlay file for nrf9160dk</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Mar 2022 16:19:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85680/nrf9160dk-fota-using-external-flash" /><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359659?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 16:19:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04de8f1f-84de-4baf-b194-a2a2a7d7d6c5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Aleksa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF9160dk is slightly different from the nRF52840dk. &lt;em&gt;mx25r64&amp;nbsp;&lt;/em&gt;is not configured by default in the&amp;nbsp;nrf9160dk_nrf9160_common.dts (you can find it in&amp;nbsp;nrf52840dk_nrf52840.dts)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So you would need to define it manually. Please follow the case that I pointed to in the last reply:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72543/mcu-boot-with-external-flash-littles-partition-and-secondary-image-partition"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/72543/mcu-boot-with-external-flash-littles-partition-and-secondary-image-partition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In addition, the external flash may not work out of the box because it shared between nRF52840 and nRF9160. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/76723/how-to-use-the-nrf9160-dk-onboard-external-flash"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding the issue with zephyr examples, I would suggest to test again with a fresh copy of the SDK. Please install it via the Tool Chain Manager. You may want to create a new case to&amp;nbsp;report the issue with zephyr sample. Have you tried to test with the blinky example and try to debug it ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359639?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 14:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb3198a6-62ec-420d-859f-0f6b8219de11</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;I am very familiar with the NCS NRF examples. I&amp;#39;ve tried setting up VSCode for ncs months ago, it had some weird errors so I gave up on it. I might give it another chance. I prefer working from shell though unless I really need to debug something.&amp;nbsp;So SES is good enough in these ocassions.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tried building your example&amp;nbsp;with the ncs v1.9.1, and it throws me following error:&lt;br /&gt; &lt;em&gt;devicetree error: /chosen: undefined node label &amp;#39;mx25r64&amp;#39;.&amp;nbsp;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;But I wasn&amp;#39;t able to get zephyr samples to work on neither nrf9160dk or nrf52840dk, not even the hello world. I flash it, but logs never show up. Many examples in NCS behave this way, I have to edit prj.conf in order to get any log to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359596?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 12:10:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e4e823f-c5a2-47b7-8f1b-2d1f206b4679</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Aleksa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to get familiar with the NCS simple examples before testing with something more complex.&amp;nbsp;&lt;br /&gt;Please try and test with the blinky example and make sure you can build and can see the LED blink.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s recommended to use Visual Studio Code instead of Segger embeded Studio as the IDE. Please follow the instruction videos &lt;a href="https://www.youtube.com/playlist?list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tried again using west to compile and can see the&amp;nbsp;&lt;span&gt;partitions.yml generated correctly, so I don&amp;#39;t know why the configuration in the overlay file was not used. You may want to edit the .dts file directly to add the configuration in the overlay file in.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359436?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 16:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a323eb1-5b71-40af-bab5-0893c50cc78e</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;Hi Hung,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve built for nRF52840DK, from Segger Embedded Studio, and with west from the terminal. I was able to flash your sample code, but partitions.yml didn&amp;#39;t contain external_flash.&lt;br /&gt;&lt;br /&gt;This link seems very useful, I&amp;#39;ll take a look at it. Thanks.&lt;br /&gt;&lt;br /&gt;While asking questions, how to run in general Zephyr samples on the NRF boards? Is there a document that describes this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359434?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 16:22:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be1236a1-5177-4969-96fe-28960a872f6b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Aleksa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which board did you build my example for ? I haven&amp;#39;t tried with the nRF91 DK board, but if you build the example for the nRF52840DK or the nRF53 DK it should work.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;For the nRF91 , I&amp;#39;m not sure the same approach can be used, but you can have a look at this case :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72543/mcu-boot-with-external-flash-littles-partition-and-secondary-image-partition"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/72543/mcu-boot-with-external-flash-littles-partition-and-secondary-image-partition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My coworker Håkon has also provided an example for the nRF91 (at the last reply). It&amp;#39;s about a year ago so the approach is slightly different but it should work.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359431?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 16:03:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:456d6bf0-f9b4-49e7-b061-c8b02076f1c2</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;smp_svr doesn&amp;#39;t build for me in the ncs1.9.1(we will probably update our project to this sdk version).&amp;nbsp;I get the following error&amp;nbsp;when building:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc&amp;quot; is not able to compile a simple test program.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Related to this issue, I found &lt;a href="https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program"&gt;this&lt;/a&gt;, but the suggested answers do not help.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Just to make sure we are on the same page, I am trying to build this sample:&amp;nbsp;&lt;em&gt;/zephyr/samples/subsys/mgmt/mcumgr/smp_svr.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/85680/nrf9160dk-fota-using-external-flash/359357#359357"]&lt;p&gt;When you use chosen&amp;nbsp; nordic,pm-ext-flash = &amp;amp;mx25r64; in the overlay file the partition manager will automatically configure the secondary slot to the start address of the external flash. You can find it in the&amp;nbsp;partitions.yml file in build folder.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;br /&gt;If this is the case, why can&amp;#39;t I just add this to my existing overlay file, and the code should work?&lt;br /&gt;&lt;br /&gt;I was able to build the code you&amp;#39;ve made, but when I open partitions.yml I don&amp;#39;t see external_flash being used - mcuboot_secondary goes to the&amp;nbsp;&lt;em&gt;flash_primary.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359357?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 12:20:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fff12427-d3c4-4bcc-a1ac-ccd5f4fbeda1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Aleksa,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would suggest to test with the default serial DFU (without external flash) please start with the smp_svr example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can have a look at the documentation of MCUMGR &lt;a href="https://docs.zephyrproject.org/latest/guides/device_mgmt/mcumgr.html"&gt;here &lt;/a&gt;and the SMP_SVR &lt;a href="https://docs.zephyrproject.org/2.6.0/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Basically for a Windows computer, if the serial port is for example COM10, the commands should be:&amp;nbsp;&lt;br /&gt;List images (test to check if MCUBoot is running)&lt;/p&gt;
&lt;p&gt;mcumgr --conntype=serial --connstring=COM10 image list&lt;/p&gt;
&lt;p&gt;You should see something like this (this is a screenshot on Linux):&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1604446845095v20.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Upload image:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;mcumgr --conntype=serial --connstring=COM10 image upload build\zephyr\app_update.bin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pastedimage1604447670146v23.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My example is compiled with&amp;nbsp;NCS v1.8.0. I havent tested with NCS v1.6.1 but it may work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you use chosen&amp;nbsp; nordic,pm-ext-flash = &amp;amp;mx25r64; in the overlay file the partition manager will automatically configure the secondary slot to the start address of the external flash. You can find it in the&amp;nbsp;partitions.yml file in build folder.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1647951611140v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you want to modify the location in the external flash, you need to&amp;nbsp;create a pm_static.yml file based on this partitions.yml but with your own configuration.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/359341?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 11:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d81f5b8-df30-48e0-b434-180fbee31520</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Took a small break from this, sorry for a late reply. &lt;br /&gt;&lt;br /&gt;I&amp;#39;m really not sure what to do with this. I&amp;#39;ve flashed the code you&amp;#39;ve sent me, but afterwards I find it really hard to use mcumgr. I can&amp;#39;t find a list of commands for it. I&amp;#39;d like to find a command for checking images/memory (as much as possible), and to flash a new image. I was able to find some commands but I wasn&amp;#39;t able to accomplish what I wanted.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also I&amp;#39;m a bit confused by the sample itself. For this to work, we need to:&lt;br /&gt;1. Define flash memory in the overlay file - mx25r64 in this case&lt;br /&gt;2.&amp;nbsp;I think - pm.yml so that the mcuboot_secondary goes to the external flash. Also I should define external flash start address and size? Or does the build system get that somehow from the overlay file?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;One more q. What ncs sdk does the sample you&amp;#39;ve made use?&amp;nbsp;We&amp;nbsp;use ncs1.6.1 on&amp;nbsp;our project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Kinda confused, hopefully you can help.&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;Aleksa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/357687?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 13:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2f4ccf0-7a9b-4e8f-8969-46c4cf1a504e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Aleksa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as I know the FOTA process would work exactly the same&amp;nbsp;when you configure the SMP server to use external flash for the 2nd slot.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;My suggestion is:&lt;/p&gt;
&lt;p&gt;1. Test the example I provided to do UART DFU with the nRF52840DK. Make sure you can update the firmware with mcumgr and check that the 2nd slot is on the external flash (check and verify that it&amp;#39;s copied there)&lt;/p&gt;
&lt;p&gt;2. From such example you can port it to the nRF9160DK&amp;nbsp; and perform the same test&lt;/p&gt;
&lt;p&gt;3. After you have done #2 you can start to modify the FOTA example to use external flash (use the overlay file chose external flash) and test it.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/357644?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 12:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fc45178-0be6-4074-995e-618a65d4a109</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;1. I have, based on this sample code.&lt;br /&gt;2. No I haven&amp;#39;t. I will try to follow the example for the nrf52840dk, and adjust for nrf9160dk.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160dk fota using external flash</title><link>https://devzone.nordicsemi.com/thread/357623?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 11:29:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf2b935-4f60-4fbd-81bc-f232d166865d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Aleksa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1 - Have you done any FOTA update for nRF9160 using the internal memory ?&amp;nbsp;&lt;br /&gt;2 - Have you tested external flash DFU with&amp;nbsp;&lt;span&gt;nrf52840dk ? I have made an example &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84025/changes-in-bootloader--saving-image-in-external-flash-and-transferring-in-internal-via-bootloader/352191#352191"&gt;here &lt;/a&gt;that you can test. To test it you just need to use &lt;a href="https://docs.zephyrproject.org/latest/guides/device_mgmt/mcumgr.html"&gt;mcumgr.exe&lt;/a&gt; tool.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you have done #2 , it should be straight forward to test that on nRF9160. I would suggest to test UART DFU first and then you can test with FOTA.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>