<?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>Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75645/flashing-nrf52840-dongle-from-visual-studio-code-using-nrfjprog-as-in-the-makefile</link><description>Hi, I&amp;#39;m really pleased with myself as I have set up my VS Code in windows to build and clean blinky and can drag the _build hex file to nRFConnect and flash it to my dongle. 
 I have tried to use the make flash command from the terminal in VS Code (from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 29 May 2021 11:57:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75645/flashing-nrf52840-dongle-from-visual-studio-code-using-nrfjprog-as-in-the-makefile" /><item><title>RE: Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/thread/312496?ContentTypeID=1</link><pubDate>Sat, 29 May 2021 11:57:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:003010fe-eef3-4532-95d7-a70b9087d114</guid><dc:creator>gfmoore</dc:creator><description>&lt;p&gt;Okay, sorted it, eventually:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#&amp;nbsp;Flash&amp;nbsp;the&amp;nbsp;program&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;flash:&amp;nbsp;default&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;&amp;nbsp;@echo&amp;nbsp;Flashing:&amp;nbsp;$(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;&amp;nbsp;nrfutil&amp;nbsp;pkg&amp;nbsp;generate&amp;nbsp;--hw-version&amp;nbsp;52&amp;nbsp;--sd-req&amp;nbsp;0x00&amp;nbsp;--application-version&amp;nbsp;1&amp;nbsp;--application&amp;nbsp;$(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex&amp;nbsp;&amp;nbsp;$(OUTPUT_DIRECTORY)/dfu.zip&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;&amp;nbsp;nrfutil&amp;nbsp;pkg&amp;nbsp;display&amp;nbsp;$(OUTPUT_DIRECTORY)/dfu.zip&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;&amp;nbsp;nrfutil&amp;nbsp;dfu&amp;nbsp;usb-serial&amp;nbsp;-pkg&amp;nbsp;$(OUTPUT_DIRECTORY)/dfu.zip&amp;nbsp;-p&amp;nbsp;com7&amp;nbsp;-b&amp;nbsp;115200&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You will need to change com7 (use windows device manager) and possibly your baud rate to match your port.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that it is probably only necessary to use flash in the tasks as it builds again.&lt;/p&gt;
&lt;p&gt;I out in a line to display the contents of the package, but it isn&amp;#39;t necessary.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Well I escaped that dungeon, let&amp;#39;s see if I can get a buetooth app to work....Here we go again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Gordon&lt;/p&gt;
&lt;p&gt;(This can be closed I think.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;p.s. don&amp;#39;t foget Makefile uses tab characters for indents, nt spaces. Be careful if copying and pasting.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Oh and the Brave browser has real issues with these pages??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/thread/312095?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 12:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4547c3a-0412-47c0-addd-68862607e524</guid><dc:creator>gfmoore</dc:creator><description>&lt;p&gt;Well, if I wasn&amp;#39;t unemployed and hadn&amp;#39;t already bought what should be a perfectly good dongle, I&amp;#39;d have some sympathy with your advice. However I have what I have.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As I said nRFConnect will happily flash the dongle fine, but I would like to make it easier for myself by flashing from within VS Code. I&amp;#39;m so close. Surely nrfutil can do what is required?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/thread/312072?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 11:59:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86dd6a90-e927-4e87-8587-3b758f7bf4d2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Please get yourself an nRF52840-DK, this include a jlink programmer that can be used to program the on-board nRF52840, but also third party boards with nRF52840 if needed. Then you avoid all your current problems. The nRF52840 dongle is very nice for demo and testing, but not really good for development due to the limited way of programming &amp;amp; debugging. It may also be that you have erased/re-written the content of the nRF52840 dongle at this time in way that prevent the bootloader and DFU to work.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/thread/311906?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 19:23:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31224807-2fde-4f59-bbd0-747f74d2f710</guid><dc:creator>gfmoore</dc:creator><description>&lt;p&gt;I am in a dark room with no light and wearing a blindfold. I can hear heavy breathing, very very heavy and putrid breathing ...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Okay, so trying to follow the instructions. Commented out nrfjprog in makefile for flash and added:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1a:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;Either create an upgrade DFU zip package containing only the application:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_scroller ace_scroll-left"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_print-margin-layer"&gt;&lt;/div&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;
&lt;div class="ace_selection ace_start ace_br15"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_gutter"&gt;
&lt;div class="ace_layer ace_gutter-layer ace_folding-enabled"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_scroller ace_scroll-left"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_print-margin-layer"&gt;
&lt;div class="ace_print-margin"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_layer ace_text-layer"&gt;
&lt;div class="ace_line"&gt;nrfutil pkg generate --hw-version 52 --sd-req 0xAE --debug-mode --application
&lt;div&gt;
&lt;div&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;OUTPUT_DIRECTORY&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;/nrf52840_xxaa.hex&amp;nbsp;&lt;/span&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;OUTPUT_DIRECTORY&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;/dfu.zip&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;&lt;/div&gt;
&lt;div class="ace_layer ace_cursor-layer ace_hidden-cursors"&gt;
&lt;div class="ace_cursor"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;Program the zip package:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_gutter"&gt;
&lt;div class="ace_layer ace_gutter-layer ace_folding-enabled"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_scroller"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_print-margin-layer"&gt;
&lt;div class="ace_print-margin"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_layer ace_text-layer"&gt;
&lt;div class="ace_line"&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;nrfutil&amp;nbsp;dfu&amp;nbsp;usb-serial&amp;nbsp;-pkg&amp;nbsp;&lt;/span&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;OUTPUT_DIRECTORY&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;/dfu.zip&amp;nbsp;-p&amp;nbsp;COM8&amp;nbsp;-b&amp;nbsp;115200&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;&lt;/div&gt;
&lt;div class="ace_layer ace_cursor-layer ace_hidden-cursors"&gt;
&lt;div class="ace_cursor"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;So step 1 created a dfu.zip but step 2 failed. The error log is below.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;It would seem that this example is assuming that the softdevice has been installed, but this is the simplest blinky with no softdevice (haven&amp;#39;t got there yet.) that nrfconnect will flash happily.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I&amp;#39;m assuming that the bit that says&amp;nbsp;&lt;span&gt;--sd-req 0xAE in step 1a is the culprit. Can anyone help me fix this please.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I have tried nrfutil pkg generate --help&amp;nbsp; but I didn&amp;#39;t really understand it.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Error output:&lt;/div&gt;
&lt;div&gt;nrfutil dfu usb-serial -pkg _build/dfu.zip -p COM8 -b 115200&lt;br /&gt;&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt; File &amp;quot;nordicsemi\__main__.py&amp;quot;, line 1537, in &amp;lt;module&amp;gt;&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 764, in __call__&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 717, in main&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 1137, in invoke&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 1137, in invoke&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 956, in invoke&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 555, in invoke&lt;br /&gt; File &amp;quot;nordicsemi\__main__.py&amp;quot;, line 1015, in usb_serial&lt;br /&gt; File &amp;quot;nordicsemi\__main__.py&amp;quot;, line 970, in do_serial&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu.py&amp;quot;, line 127, in dfu_send_images&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu.py&amp;quot;, line 95, in _dfu_send_image&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 256, in send_init_packet&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 421, in __execute&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 502, in __get_response&lt;br /&gt;&lt;br /&gt;pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.&lt;br /&gt;&lt;br /&gt;[14068] Failed to execute script __main__&lt;br /&gt;make: *** [Makefile:144: flash] Error -1&lt;br /&gt;The terminal process &amp;quot;C:\Program Files\PowerShell\7\pwsh.exe -Command make flash&amp;quot; terminated with exit code: 1.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/thread/311904?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 18:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7107eee-2c33-4d18-98d1-e34b078e57c2</guid><dc:creator>gfmoore</dc:creator><description>&lt;p&gt;Okay, missed that. So why does the supplied makefile use nrfjprog??&lt;/p&gt;
&lt;p&gt;Can I include the two steps in the makefile (don&amp;#39;t know how to do that just yet)?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Gordon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle from Visual Studio Code using nrfjprog as in the Makefile</title><link>https://devzone.nordicsemi.com/thread/311776?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 12:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48e256bb-5c95-4c1e-bbab-264437b2b0f5</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Check out this blog post:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is no j-link programmer on the dongle, so nrfjprog can&amp;#39;t be used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>