<?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>Thingy:91 | Building and flashing from the command line</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79777/thingy-91-building-and-flashing-from-the-command-line</link><description>Hi! 
 I had some time with the Thingy:91 and was able to get my own application running on the device using the nRF Connect Programmer application. To eliminate the need for clicking around I&amp;#39;d like to be able to flash the device using the CLI. 
 I&amp;#39;ve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Sep 2021 10:23:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79777/thingy-91-building-and-flashing-from-the-command-line" /><item><title>RE: Thingy:91 | Building and flashing from the command line</title><link>https://devzone.nordicsemi.com/thread/330443?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 10:23:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05407e51-f537-41cb-bfc7-432dc5b19f19</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hey,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy to hear we found the solution!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Tim Visser"]Just out of curiosity;&amp;nbsp;&lt;br /&gt;Is there any special reason why&amp;nbsp;the CLI command require a .BIN file, while the nRF Connect Programmer needs a .HEX file? I&amp;#39;d expect the&amp;nbsp;nRF Connect Programmer to run a very similar command to the CLI command I&amp;#39;m using now, is that not the case?&amp;nbsp;[/quote]
&lt;p&gt;No other than simplicity is what I&amp;#39;m informed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy:91 | Building and flashing from the command line</title><link>https://devzone.nordicsemi.com/thread/330353?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 19:49:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bbf1f2d-296d-4f53-8dcd-b392fe6e64d1</guid><dc:creator>Tim Visser</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your answer!&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;nbsp;had issues getting `mcumgr` to work (it only spits out&amp;nbsp;segfault errors, even without any commands/arguments&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f937.svg" title="Shrug"&gt;&amp;#x1f937;&lt;/span&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I&amp;nbsp;read that mcumgr is a wrapper for &lt;a href="http://mynewt.apache.org/latest/newtmgr/index.html"&gt;newtmgr&lt;/a&gt;,&amp;nbsp;which I was able to install without any problems.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And since their commands are pretty much analogous, I was able to use your example script with newtmgr to&amp;nbsp;flash my Thingy:91. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve been successful&amp;nbsp;in&amp;nbsp;flashing my device by running this code:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;newtmgr --conntype=serial --connstring=&amp;#39;dev=/dev/tty.usbserial,baud=115200&amp;#39; image upload -e build/zephyr/app_update.bin
newtmgr --conntype=serial --connstring=&amp;#39;dev=/dev/tty.usbserial,baud=115200&amp;#39; reset&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It seems&amp;nbsp;noticeably slower than flashing with the&amp;nbsp;nRF Connect Programmer application, but it&amp;#39;s consistent and works great, so I&amp;#39;m very thankful for your help. (slow speeds&amp;nbsp;might&amp;nbsp;be&amp;nbsp;related to&amp;nbsp;&lt;a href="https://github.com/apache/mynewt-newtmgr/issues/180"&gt;this GitHub issue&lt;/a&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Just out of curiosity;&amp;nbsp;&lt;br /&gt;Is there any special reason why&amp;nbsp;the CLI command require a .BIN file, while the nRF Connect Programmer needs a .HEX file? I&amp;#39;d expect the&amp;nbsp;nRF Connect Programmer to run a very similar command to the CLI command I&amp;#39;m using now, is that not the case?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks again for your assistance, I&amp;#39;m very glad I&amp;#39;m finally able to flash the device from the CLI!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy:91 | Building and flashing from the command line</title><link>https://devzone.nordicsemi.com/thread/330298?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 13:19:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a5a1e95-8566-4a0f-a75a-b4cb25938f89</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Thingy:91 does not have an onboard debugger as the nRF9160DK does. This is why it relies on using the debugger from the nRF9160DK or mcuboot serial recovery. Have a look at this &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/thingy91_2d00_fw_2d00_update_2d00_mcuboot"&gt;blog post on how the Thingy:91 was programmed earlier&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Below is &lt;strong&gt;an example&lt;/strong&gt; of how a script could handle this for you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;echo &amp;quot;Please set child_image/mcuboot.conf CONFIG_MCUBOOT_SERIAL=y and CONFIG_BOOT_SERIAL_DETECT_PIN to a corresponding button on your development kit!&amp;quot;
echo &amp;quot;Hold down the button you chose, then reset the nRF to enter mcuboot serial recovery mode&amp;quot;

mcumgr --conntype=serial --connstring=&amp;#39;dev=/dev/ttyACM2,baud=115200&amp;#39; image upload -e build/zephyr/app_update.bin
mcumgr --conntype=serial --connstring=&amp;#39;dev=/dev/ttyACM2,baud=115200&amp;#39; reset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>