<?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>JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47640/jtag-programmer-under-100-not-a-dk</link><description>Hi Folks, 
 We have 6 factories that will be programming custom boards that use the nRF52832. I&amp;#39;m one of the software developers and have been using a dev kit to program and debug the boards. 
 
 We want to now create a commissioner for the board and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 May 2019 16:35:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47640/jtag-programmer-under-100-not-a-dk" /><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/189973?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 16:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2596c2a7-8480-4a97-9ce9-2a370b3a0ea3</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;Thanks Bill.&amp;nbsp; I was hoping the dependency stopped at SES and didn&amp;#39;t flow through to nrfjprog.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/189971?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 16:29:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:912d3de5-9f84-4619-9cb9-2315aef9a3e3</guid><dc:creator>wpaul</dc:creator><description>[quote userid="48400" url="~/f/nordic-q-a/47640/jtag-programmer-under-100-not-a-dk/189950"] Unfortunately I can&amp;#39;t see the device when I do &amp;quot;nrfjprog -i&amp;quot;[/quote][quote userid="48400" url="~/f/nordic-q-a/47640/jtag-programmer-under-100-not-a-dk/189950"]Also does the blackmagic device work with SES (Segger Embedded Studio)?[/quote]
&lt;p&gt;As previously stated, SES only works with J-Link debuggers. I believe the same is also true of nrfjprog (hence the &amp;#39;j&amp;#39; in the name).&lt;/p&gt;
&lt;p&gt;The Black Magic Probe has firmware running on it which provides a GDB backend server. You can therefore use it with GDB, Eclipse, or any IDE that has a &amp;quot;GDB server&amp;quot; option as a debug target. When you plug the Black Magic Probe into your host system&amp;#39;s USB port, two virtual serial port devices should appear. One of them is the GDB server interface. The &amp;quot;getting started&amp;quot; page shows an example of how to use it with GDB:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/blacksphere/blackmagic/wiki/Getting-Started"&gt;github.com/.../Getting-Started&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By contrast, if you use the Olimex or ST-Link V2 debuggers, you then need to run OpenOCD to connect to them, and it is OpenOCD which provides the GDB backend server interface. You also need to use GDB or a GDB-compatible IDE in this case. However OpenOCD also includes a built-in command line interface which can be either accessed via telnet or (to a certain extent) scripted from the command line.&lt;/p&gt;
&lt;p&gt;Here is a link to an example provisioning script I wrote that uses OpenOCD to erase and flash a nrf52 device and then program a few areas in the UICR:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/netik/dc27_badge/blob/master/hardware/programming/provision-nrf52-olimex.sh"&gt;github.com/.../provision-nrf52-olimex.sh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Bill&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/189950?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 15:08:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8410248e-1c61-46bf-bb93-58f5d271e61b</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;Koniho,&lt;/p&gt;
&lt;p&gt;We picked up a couple of the BlackMagic devices.&amp;nbsp; I updated the firmware and installed the drivers on my PC.&amp;nbsp; Unfortunately I can&amp;#39;t see the device when I do &amp;quot;nrfjprog -i&amp;quot;&amp;nbsp; &amp;nbsp;What application are you using to program your nrf52832&amp;#39;s?&amp;nbsp; Can you send me a link to the firmware you loaded onto the blackmagic device (maybe I grabbed the wrong one.)&lt;/p&gt;
&lt;p&gt;Also does the blackmagic device work with SES (Segger Embedded Studio)?&lt;/p&gt;
&lt;p&gt;thanks again,&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188915?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 17:47:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:671015be-e62d-4cce-b60c-6b1a93a3eb33</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;These devices are part of a larger product. At most there will be 9 of them to program, each device needs to be uniquely configured (such as job number, customer site ID) so the slower rate processes isn&amp;#39;t a big factor for us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188914?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 17:43:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1ba8235-0d3e-41cc-b1d9-f800775727cf</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;It is fine to use openocd for development but when it comes to production; it is too slow. &amp;nbsp;The &lt;a href="http://embeddedsoftdev.blogspot.com/p/idap-link.html"&gt;IDAP-Link&lt;/a&gt; allows you to flash multiple boards at once or you can also put the hex in a scared and flash it with a push of button without connecting to PC. &amp;nbsp;The &lt;a href="https://www.tindie.com/products/hnhoan/cmsis-dap-arm-debug-jtagswd-module-drag-drop/"&gt;IDAP-M&lt;/a&gt; is another option to build your own programming jig. &amp;nbsp;It&amp;#39;s the IDAP on module. &amp;nbsp;Production is a different thing. &amp;nbsp;The more time require to produce 1 board, the more cost will incur. &amp;nbsp;The contract manufacturer will charge you the time they spent on doing that. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188913?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 17:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0017cc8-8618-41a8-93ea-5ec61931f954</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;That is really good to know.&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;
&lt;p&gt;Bob S.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188912?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 17:25:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e9ab6fc-c0a8-408b-b40b-3e7af053739d</guid><dc:creator>Mojo</dc:creator><description>&lt;p&gt;SES only works with JLink, nothing else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188911?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 17:23:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:567e4ee7-a0c4-405c-aa87-0d1ab345fa11</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;this is very helpful.&lt;/p&gt;
&lt;p&gt;thanks much!&lt;/p&gt;
&lt;p&gt;Bob&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188910?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 17:19:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e961057-76fd-4d69-9f63-cbd7e96fae39</guid><dc:creator>wpaul</dc:creator><description>&lt;p&gt;Below is a photo showing how I connected up the ST-Link V2 to the 20/10 pin adapter:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_20190523_5F00_100604.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;The 20-pin connector has the standard ARM pinout, as shown below:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="http://www.keil.com/support/man/docs/ulinkpro/ulinkpro_jtag_20pin_swm.gif" /&gt;&lt;/p&gt;
&lt;p&gt;The connections from the ST-Link to the 20-pin connector are:&lt;/p&gt;
&lt;p&gt;RST &amp;lt;--&amp;gt; pin 15&lt;/p&gt;
&lt;p&gt;SWDIO &amp;lt;--&amp;gt; pin 7&lt;/p&gt;
&lt;p&gt;SWCLK &amp;lt;--&amp;gt; pin 9&lt;/p&gt;
&lt;p&gt;GND &amp;lt;--&amp;gt; pin 10&lt;/p&gt;
&lt;p&gt;I use the following command with OpenOCD:&lt;/p&gt;
&lt;p&gt;openocd -f interface/stlink.cfg -f target/nrf52.cfg -c &amp;quot;gdb_flash_program enable&amp;quot; -c &amp;quot;gdb_breakpoint_override hard&amp;quot;&lt;/p&gt;
&lt;p&gt;When I run I get this:&lt;/p&gt;
&lt;p&gt;Open On-Chip Debugger 0.10.0+dev-00871-g11e5f022-dirty (2019-05-22-09:20)&lt;br /&gt;Licensed under GNU GPL v2&lt;br /&gt;For bug reports, read&lt;br /&gt; &lt;a href="http://openocd.org/doc/doxygen/bugs.html"&gt;openocd.org/.../bugs.html&lt;/a&gt;&lt;br /&gt;Info : auto-selecting first available session transport &amp;quot;hla_swd&amp;quot;. To override use &amp;#39;transport select &amp;lt;transport&amp;gt;&amp;#39;.&lt;br /&gt;Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD&lt;br /&gt;force hard breakpoints&lt;br /&gt;Info : Listening on port 6666 for tcl connections&lt;br /&gt;Info : Listening on port 4444 for telnet connections&lt;br /&gt;Info : clock speed 1000 kHz&lt;br /&gt;Info : STLINK V2J21S4 (API v2) VID:PID 0483:3748&lt;br /&gt;Info : Target voltage: 3.231012&lt;br /&gt;Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;Info : Listening on port 3333 for gdb connections&lt;/p&gt;
&lt;p&gt;This is with an OpenOCD built from the current git repo. My host system is FreeBSD/amd64 11-RELEASE. From here I use GDB to debug and flash the chip. (I built my own GDB with --target=arm-none-eabi.) Again, this is with an nRF52840 chip, but it works the same with the nRF52832.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t use SES so I don&amp;#39;t know if there&amp;#39;s any special configuration needed for it.&lt;/p&gt;
&lt;p&gt;-Bill&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188905?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 16:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d424f5-86fb-4971-bf45-6f739e3333ca</guid><dc:creator>wpaul</dc:creator><description>&lt;p&gt;I didn&amp;#39;t write anything about that in that file, no. However I do have one of the knock-off ST-Link V2 dongles (similar to the Adafruit one) and I have gotten it to work with the nRF52 chip using OpenOCD. (In my case the nRF52840, but that doesn&amp;#39;t matter.)&lt;/p&gt;
&lt;p&gt;The main problem with the cheap knockoff ones is cabling it up to the board properly. The nRF52 boards I have all use the mini 10-pin SWD header, while the ST-Link dongles come with a 4-wire patch cable which doesn&amp;#39;t fit the pins. I have yet to find a proper cable to go directly from the dongle to the SWD header. I have another 20-pin to 10-pin adapter which has a 20-pin socket, and I was able to fit the patch cable connectors to the pins on that socket, and then connect the 10-pin cable on the other end to my nRF52 board. It was a bit awkward because the patch cable doesn&amp;#39;t grip the pins very well and you have to hold it still or else it&amp;#39;ll lose connectivity.&lt;/p&gt;
&lt;p&gt;In my case I connected the GND, Reset, SWDIO and SWCLK pins. Really GND, SWDIO and SWCLK are the only 3 pins that matter. I don&amp;#39;t have it set up now, but I can try to set it up later and post a picture. I didn&amp;#39;t document that specifically because I wasn&amp;#39;t sure what cabling to recommend since I basically just kludged something up with what I had available.&lt;/p&gt;
&lt;p&gt;-Bill&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188811?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 11:58:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74baaaad-e81e-441d-9977-c23d804cbb3f</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;Hi Bill,&lt;/p&gt;
&lt;p&gt;I appreciate all the detail.&amp;nbsp; We actually have other boards the use the ST-Link to program them.&amp;nbsp; Does the link you reference at the end of your post also deal with getting the ST-Link V2 to program the nRF52830 via JTAG header?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;(I tried using the ST-Link V2 4 months ago and couldn&amp;#39;t get it to work, inside SES or from the command line.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188660?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 20:19:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33df56f7-4bb2-41f7-9abd-a882aa72deb5</guid><dc:creator>wpaul</dc:creator><description>&lt;p&gt;I use the Olimex ARM-USB-OCD-H debugger, with the ARM-JTAG-SWD adapter and ARM-JTAG-20-10 cable, in conjunction with OpenOCD. The debugger costs about $60 and the adapters are ~$5 each. You should be able to find all 3 here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.mouser.com/Search/Refine?Keyword=Olimex+ARM-USB-OCD-H"&gt;https://www.mouser.com/Search/Refine?Keyword=Olimex+ARM-USB-OCD-H&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This assumes you expect to use the same kind of mini 10-pin header that they use on the DK board (which seems to be fairly common for ARM JTAG/SWD programming). The Olimex uses a fairly common FTDI chip. I don&amp;#39;t know off the top of my head what IDE/debugger software packages it&amp;#39;s compatible with so you should check that (for me OpenOCD is enough).&lt;/p&gt;
&lt;p&gt;If you want to go cheaper still, you should also be able to use the ST-Micro ST-Link V2 debugger:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.mouser.com/ProductDetail/STMicroelectronics/ST-LINK-V2?qs=sGAEpiMZZMsUcx5t7XFI3RIxq36q1BfC"&gt;https://www.mouser.com/ProductDetail/STMicroelectronics/ST-LINK-V2?qs=sGAEpiMZZMsUcx5t7XFI3RIxq36q1BfC&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However I&amp;#39;m not sure if it comes with the right 10-pin cable. I think you may be able to use the ARM-JTAG-20-10 adapter from Olimex if it doesn&amp;#39;t. This is an SWD-only debugger: it doesn&amp;#39;t speak ARM JTAG, so you can&amp;#39;t use it to debug larger ARM CPUs (e.g. Cortex-A).&lt;/p&gt;
&lt;p&gt;And if you want to go even cheaper still, there are some ST-Link V2 knockoffs:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.mouser.com/ProductDetail/Adafruit/2548?qs=sGAEpiMZZMsMSm715rCt%252BlkZLiRrWII%2FiCGPHRoC5wqL0U52rt%252BD9Q%3D%3D"&gt;https://www.mouser.com/ProductDetail/Adafruit/2548?qs=sGAEpiMZZMsMSm715rCt%252BlkZLiRrWII%2FiCGPHRoC5wqL0U52rt%252BD9Q%3D%3D&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NOTE: The ST-Link V2 and its clones have one drawback, which is that they can only communicate with the standard ARM DAP. They can&amp;#39;t be used to access the Nordic CTRL-AP port, which is where the magic &amp;quot;mass-erase recovery&amp;quot; register is located. This means if you lock your devices by setting the APPROTECT register in the NVMC, you will not be able to recover the chip using the ST-Link V2 debuggers. The Olimex is a low-level debugger and can be used to perform CTRL-AP mass erase. I wrote down how to do it here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/netik/dc27_badge/blob/master/hardware/programming/debug.txt"&gt;https://github.com/netik/dc27_badge/blob/master/hardware/programming/debug.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Bill&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188650?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 17:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f8f5ca4-05b8-480c-89cf-ca1a25591c54</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188649?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 17:56:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73efd3f6-c049-49ee-b511-815fd06dc668</guid><dc:creator>Mojo</dc:creator><description>&lt;p&gt;This one&amp;nbsp;&lt;a href="http://embeddedsoftdev.blogspot.com/p/idap-link.html"&gt;http://embeddedsoftdev.blogspot.com/p/idap-link.html&lt;/a&gt;&amp;nbsp;comes with software for nRF5x series flashing. &amp;nbsp;Supports parallel flashing multi-boards, flashing Softdevice + App + DFU, Flashing using SDCard. &amp;nbsp;It can also protect/unprotect the nRF5x.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188648?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 17:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a95f36be-76ee-438d-8b91-7765ad37f6b9</guid><dc:creator>rshankle</dc:creator><description>&lt;p&gt;Thanks!&amp;nbsp; I&amp;#39;ll check it out.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: JTAG Programmer (under $100, not a DK)</title><link>https://devzone.nordicsemi.com/thread/188647?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 17:23:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e023426-f8ae-482e-8a12-cb1704ede83c</guid><dc:creator>koniho</dc:creator><description>&lt;p&gt;The Black Magic Probe is an opensource programmer than can be used to program nrf52 series chips.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/blacksphere/blackmagic/wiki"&gt;https://github.com/blacksphere/blackmagic/wiki&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We have successfully used a design based on the black magic probe to program nrf52832&amp;#39;s in production.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>