<?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>How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42345/how-to-upload-arduino-sketch-file-via-j-link</link><description>Hello Everyone, I designed and fabricated a small nRF52 board. The design of this board is based on the Adafruit nRF52 feather. The difference between my designed board and nRF52 feather is the existence of the pressure sensor. 
 
 
 However, I have one</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Dec 2019 21:32:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42345/how-to-upload-arduino-sketch-file-via-j-link" /><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/226768?ContentTypeID=1</link><pubDate>Mon, 23 Dec 2019 21:32:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65ea7327-1a7a-498c-988e-733fd97063b5</guid><dc:creator>Michael Gunlock</dc:creator><description>&lt;p&gt;I could never get the Adafruit bootloader and Arduino IDE to play nice on a custom nRF52 project I am working on. &amp;nbsp;I aborted and instead am using&amp;nbsp;&lt;span&gt;Sandeep Mistry&amp;#39;s &lt;/span&gt;&lt;a href="https://github.com/sandeepmistry/arduino-nRF5"&gt;Arduino Core for Nordic Semiconductor nRF5 based boards&lt;/a&gt;&amp;nbsp;which integrates nicely with the Arduino IDE. &amp;nbsp;Using a&amp;nbsp;J-Link programmer, you can flash the SoftDevice and application separately through the Arduino IDE. &amp;nbsp;For my application, the Arduino wrapper libraries where sufficient and simple to work with saving development time. I am working with a Raytac MDBT42-512K which uses a&amp;nbsp;nRF52832 solution. &amp;nbsp;The J-Link is connected to nRF52832 via SWDIO and SWDCLK. I don&amp;#39;t know if you can use a bootloader using this approach...I am not using one.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/189001?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 09:44:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e4f5d8b-ac26-4315-aa08-aa5f6412696c</guid><dc:creator>Ukoolele</dc:creator><description>&lt;p&gt;Any news ? I would like to do the same thing&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165238?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 16:04:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d55319b-dc2f-451d-b20d-e28149e093e2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Your connections looks OK, but I am not familiar with this bootloader. You should check with Adafruit support how it works.&lt;/p&gt;
&lt;p&gt;From the size of the HEX-file, I would expect the softdevice to have been merged into the file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165231?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 15:44:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05ae1334-d18b-4cf8-85ae-d966de0a22f3</guid><dc:creator>seonghun</dc:creator><description>&lt;p&gt;Hi Jorgen&lt;/p&gt;
&lt;p&gt;Would you please teach me one more thing?&lt;/p&gt;
&lt;p&gt;Do I need the S132 softdevice hex file in my case?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Software/S132/Download#infotabs"&gt;https://www.nordicsemi.com/Software-and-Tools/Software/S132/Download#infotabs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165215?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 14:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba536ac-89dd-4b76-b586-1274341aec4e</guid><dc:creator>seonghun</dc:creator><description>&lt;p&gt;Hi Thanks for your support.&lt;/p&gt;
&lt;p&gt;Yes. the file&amp;nbsp;&lt;span&gt;bootloader_v050_s132_v201.hex&amp;nbsp; is the arduino bootloader, which is provided by Adafruit industries.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;a href="https://github.com/adafruit/Adafruit_nRF52_Arduino_Bootloader/releases"&gt;https://github.com/adafruit/Adafruit_nRF52_Arduino_Bootloader/releases&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is my upload procedure.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;(1)&lt;/strong&gt; I prepared the bootloader.hex and arduino-sketch file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Arduino-sketch file was checked with other nRF52 development board. The code was OK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Arduino-sketch file was converted to hex file with Arduino IDE program. I call it arduino-sketch.hex.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;(2)&lt;/strong&gt; Connect the my custom nRF board with DK. The wiring is like the following picture.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;Open the command window and put the following commands&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;&amp;nbsp;./nrfjprog -e -f nrf52&lt;br /&gt;&lt;br /&gt;./nrfjprog --program bootloader_v050_s132_v201.hex -f nrf52&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;./nrfjprog --program arduino.hex -f nrf52&lt;br /&gt;&lt;br /&gt;./nrfjprog --reset -f nrf52&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/layout.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;(3)&lt;/strong&gt; Then I could see that the program was uploaded to my custom nRF board. the LED was blinking.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;but the program was not running correctly which was OK at the other nRF52 development board.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8420.Capture.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Capture02.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(1) I think that bootloader and sketch program can be uploaded with J-link.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(2) However, the sketch program did not work correctly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(3) First, I will check the version of the bootloader and IDE settings.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will report you when I found something. Please give me any advises, They gave me great help to solve this problem.&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&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;S-H Choe&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165202?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 14:27:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9898ec4a-f254-4973-a71b-a526a96ad5b9</guid><dc:creator>seonghun</dc:creator><description>&lt;p&gt;Thanks so much.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is my wiring. Would you please check that this wiring is correct or not?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nRF52-DK           Custom / External Board


VDD ------+-------------&amp;gt; VDD
         /
VTG ----+

GND ------------+-------&amp;gt; GND
               /
GND DETECT ---+

SWD IO -----------------&amp;gt; SWD IO

SWD CLK ----------------&amp;gt; SWD CLK&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/layout.png" /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165119?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 10:59:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d637a23-52a6-4a8d-866a-56b088dc59ff</guid><dc:creator>awneil</dc:creator><description>[quote userid="74569" url="~/f/nordic-q-a/42345/how-to-upload-arduino-sketch-file-via-j-link/165037"] I connected SWDCLK, SWDIO and GND, VDD to the nRF52DK[/quote]
&lt;p&gt;Note that the DK also needs&amp;nbsp;EXT_VTG on the Debug Out connector - that&amp;#39;s how it switches the onboard JLink connection from the nRF52 on the board to the external target ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165093?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 09:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e0e8481-ac3f-46c6-a08d-6fbe3647828f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Is the file&amp;nbsp;&lt;span&gt;bootloader_v050_s132_v201.hex the arduino bootloader?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The bootloader and application should be located in different sections in flash, you should not need to merge it before flashing. Just make sure you do not erase the chip between flashing the two hex-files.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/165037?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 00:18:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dfa3c8f-15d8-4f57-9d69-2655ddb8b9c7</guid><dc:creator>seonghun</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;(1) I connected SWDCLK, SWDIO and GND, VDD to the nRF52DK. I followed the instructions shown here.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14058/external-programming-using-nrf52-dk"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/14058/external-programming-using-nrf52-dk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(2) I used nrfjprog to upload hex file.Here is my commands to upload hex file.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;./nrfjprog -e -f nrf52&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;./nrfjprog --program bootloader_v050_s132_v201.hex -f nrf52&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;./nrfjprog --reset -f nrf52&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(3) I got a hex-file which was generated by Arduino IDE at temp folder.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Do I need to merge the bootloader.hex and arduino_program.hex?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will try this again with my another nrf52 module and report to you soon.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks so much.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;S-H Choe&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to upload arduino sketch file via J-Link?</title><link>https://devzone.nordicsemi.com/thread/164965?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 14:32:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:724a1244-a8fb-42a1-a3fb-11b21b72608b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you designed the board, you should know which pins are SWDCLK/SWDIO?&lt;/p&gt;
&lt;p&gt;You only need to connect these pins, in addition to GND and VDD to VTG on the nRF52 DK. You can the use the &lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-programmer"&gt;nRF Connect Programming app&lt;/a&gt; or &lt;a href="https://www.nordicsemi.com/DocLib/Content/User_Guides/nrf5x_cltools/latest/UG/cltools/nrf5x_nrfjprogexe"&gt;nrfjprog&lt;/a&gt; to flash hex-files. Do you get a hex-file output from the Arduino IDE?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>