<?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>Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/499/can-nordic-please-document-how-to-debug-code-on-their-processors</link><description>I love this part (the 51822) so far. Really. However, it really lacks in the debug support department. 
 Keil is a passable tool. Certainly not state of the art, but I can pinch my nose and use it. 
 That is, if it worked. When I hit a breakpoint I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Jun 2014 10:48:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/499/can-nordic-please-document-how-to-debug-code-on-their-processors" /><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2615?ContentTypeID=1</link><pubDate>Mon, 09 Jun 2014 10:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a775e88-867a-4580-9210-ba6a4a6d72c1</guid><dc:creator>sushil</dc:creator><description>&lt;p&gt;It seems that link to ble_app_hrs_printf.zip is brokend. Hey Ole, Can you please make it available? Thanx.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2621?ContentTypeID=1</link><pubDate>Wed, 21 May 2014 06:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dc6e4f3-f8e8-45de-89e0-e3b4eeda30cd</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I&amp;#39;ve got simple UART (the HW UART pins, not running over BLE etc) all up and running, spitting out on my Mac&amp;#39;s terminal software etc but I&amp;#39;d love to be able to set it up as stdout so I can just use printf...&lt;/p&gt;
&lt;p&gt;Anyone have any instructions on this? I&amp;#39;ve seen the sprintf into a buffer then calling simple_uart_putstring etc but would prefer just being able to call good ole printf..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2614?ContentTypeID=1</link><pubDate>Fri, 07 Mar 2014 16:06:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e81c8ec-ede5-4719-83fc-290a5aebeefd</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Unfortunately, the nRF51822 doesn&amp;#39;t have any tracing support, so sending UART-like data over the debug interface is not possible.&lt;/p&gt;
&lt;p&gt;The application attached here should work with any nRF51822 with some kind of UART-to-RS232 converter, be it the built-in function of the Segger chips, the converter on the nRFgo motherboard or any other such device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2613?ContentTypeID=1</link><pubDate>Fri, 07 Mar 2014 16:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83c4126e-ef05-468b-8114-2d05c024702c</guid><dc:creator>Jason De Lorme</dc:creator><description>&lt;p&gt;Ole - to be clear, this assumes you are using one of the eval boards (i.e. PCA10001) which has TX/RX pins designated on the nRF51 for UART.  Is there a way to redirect printf() to use the debugger interface instead of UART with the J-Link Segger Lite?&lt;/p&gt;
&lt;p&gt;For example can you just use (SWDIO &amp;amp; SWCLK) and attach GDB to see printf() commands via stdout in GDB? Does that make sense?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2612?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 21:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f6c6b22-7f1a-4590-aa72-181485421e30</guid><dc:creator>Joe Merten</dc:creator><description>&lt;p&gt;Seems that the attached example not build with the current sdk 5.1.0.
I&amp;#39;d also started with the uart example from the sdk instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2620?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 13:02:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f5ef36-b9c1-4135-8f85-1483f028d752</guid><dc:creator>Joe Merten</dc:creator><description>&lt;p&gt;Does this gone further?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2619?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 13:09:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:051a5f31-f09a-485b-808d-714b61793065</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;To be honest, I haven&amp;#39;t tested. If you have trouble with this, I suggest you post a separate question with a little more details, and I can take a look! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2618?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 07:59:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca763b8f-eee7-449d-8282-be1e8e514297</guid><dc:creator>Kyle Gilpin</dc:creator><description>&lt;p&gt;Ole,&lt;/p&gt;
&lt;p&gt;Does the example code you posted work with Eclipse / Sourcery CodeBench Lite?  I have attempted to use an identical approach, but the nRF51822 is hard-faulting when I call printf.  Tracing this down, it appears that a call within newlib to malloc is responsible.  How can I get this working?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2617?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2013 12:22:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1567fe2e-a658-44eb-b464-c513439b44bc</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;No matter if you use GDB or Keil&amp;#39;s debugger, you will not be able to keep the BLE link while you&amp;#39;re halted on a breakpoint, or keep running softdevice code after having halted on a breakpoint. Doing UART printouts is therefore a very useful addition to hardware debugging, although I do agree that it&amp;#39;s very convenient with proper hardware debugging.&lt;/p&gt;
&lt;p&gt;As I mentioned above, it is possible to keep debugging application code after having halted, by setting the PRIMASK bit, so in combination with UART prints, this has been sufficient for me.&lt;/p&gt;
&lt;p&gt;PS: Personally I&amp;#39;m very happy with GDBs capabilities as well, but Keil is currently (unfortunately) our primary supported toolchain.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2616?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2013 12:04:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7e08ce5-d605-4d68-b30c-969fc02271be</guid><dc:creator>Janek Mann</dc:creator><description>&lt;p&gt;Odd to see so many comments regarding using printf for debugging... Sure it&amp;#39;s handy sometimes but it&amp;#39;s hardly a replacement for a correctly working debugger!&lt;/p&gt;
&lt;p&gt;The good news is that gdb works perfectly with the chip including inspecting local variables. And surprisingly gdb these days has some pretty nice features for console &amp;quot;GUI&amp;quot;s too so it&amp;#39;s very workable (and much faster than Keil).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2611?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:43:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa379aa8-0d22-41fe-a4d6-7eb68cfe45c6</guid><dc:creator>Jim</dc:creator><description>&lt;p&gt;Found simple_uart.c in the SDK.  It works now.&lt;/p&gt;
&lt;p&gt;This was harder to figure out than I would have expected.  Maybe a nice app note would be in order?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2610?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:42:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:501c29d6-5e41-4ac4-879d-dc900261458f</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;These are in the simple_uart.c file, in Source\simple_uart. In the project I attached, it should already be included. If you try to use this in your own project, you&amp;#39;ll have to include the file manually, by double-clicking one of the folders in the project explorer, navigating to the correct folder and selecting the file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2609?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:39:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:927feaa3-a0f9-41e1-bc95-24754f3d2c41</guid><dc:creator>Jim</dc:creator><description>&lt;p&gt;I&amp;#39;m getting a linker error on simple_uart_config and simple_uart_put.  Where are those functions coming from?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2608?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:27:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5671cac-a382-4075-a549-17520fae2252</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Sorry, I forgot. It uses simple_uart&amp;#39;s default baud rate, 38400 bps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2607?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:25:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7032d5f3-4e8d-4aef-8a3b-e7544927d617</guid><dc:creator>Jim</dc:creator><description>&lt;p&gt;You&amp;#39;re leaving out some important details about the UART.  I&amp;#39;ve got hyperterm connected to the J-link virual com port (COM4 for me) and I&amp;#39;m seeing nothing.  What baud rate should I be using?&lt;/p&gt;
&lt;p&gt;Optimization removing variables makes sense.  I&amp;#39;ll try that.  Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2606?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:05:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9631224e-0be6-4856-9d87-e5d023fd6b41</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;There shouldn&amp;#39;t be any problems with using UART for printouts, even when the softdevice is active. See the attached zip for an example of how to add this to the ble_app_hrs for PCA10001. It uses a baud rate of 38400 bps, and uses the Segger chip to transmit the UART data to the PC. Please note that this is a very naive implementation, that will keep the UART on at all times, causing high current consumption. However, it should be very usable for debugging and development.&lt;/p&gt;
&lt;p&gt;Unfortunately, Keil seems a little aggressive about optimizing out variables, leading to a lot of &amp;quot;out of scope&amp;quot; variables when debugging. Making sure the optimization level is set to 0 in the target options helps (this is not the default), but even then you might see this kind of errors in some cases.&lt;/p&gt;
&lt;p&gt;Also, it is possible to make single stepping after having halted on a breakpoint work, as long as you don&amp;#39;t step back into a softdevice function. The connection will however be broken, but this at least enables you to look at your own code. Take a look at &lt;a href="https://devzone.nordicsemi.com/index.php/can-i-debug-ble-program"&gt;this question&lt;/a&gt; for an explanation of this, especially Øyvind&amp;#39;s answer.&lt;/p&gt;
&lt;p&gt;Edit: Add baud rate used.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_printf.zip"&gt;ble_app_hrs_printf.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2605?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 10:56:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4214ba0e-38e4-43da-94e1-cb3fc47d2ef8</guid><dc:creator>Jim</dc:creator><description>&lt;p&gt;Nils, please clarify:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;are you using BLE and the soft device?&lt;/li&gt;
&lt;li&gt;are you talking about a separate connection to the nrf51822&amp;#39;s UART or communication through the SEGGER?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Nordic please document how to debug code on their processors?</title><link>https://devzone.nordicsemi.com/thread/2604?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 10:43:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a6f3475-4c7d-4efd-a1e7-1b660e48e1f2</guid><dc:creator>Nils Minor</dc:creator><description>&lt;ul&gt;
&lt;li&gt;Embedded development without even printf debugging is like feeling&lt;/li&gt;
&lt;li&gt;around in the dark.
If you mean you want to do some printf while the processor is running you can use the uart modul of the chip and prints uart messages. I use the evalboard and uart Prints in my Com port for the runtime ^^&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>