<?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>debugger - live breakpoints and memory access</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23183/debugger---live-breakpoints-and-memory-access</link><description>Hi,
For some time, I&amp;#39;ve been developing code on the nRF51 with a U-lInk based debuggers and Keil. Things have worked well with that setup. One particularly nice feature (which I had not realized was a feature) is that the U-link can read and write certain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 01 Jul 2017 01:44:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23183/debugger---live-breakpoints-and-memory-access" /><item><title>RE: debugger - live breakpoints and memory access</title><link>https://devzone.nordicsemi.com/thread/91191?ContentTypeID=1</link><pubDate>Sat, 01 Jul 2017 01:44:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfabc21b-5738-4e97-8487-f965b6971391</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;you can use SES even if you build your code with makefiles. It allows you to load an externally built executable, you can even I think get it to run the make for you. I don&amp;#39;t know how good an editing IDE it is when you do that, you can certainly open files and edit them, don&amp;#39;t know if you&amp;#39;ll get much code completion etc but it&amp;#39;ll work a bit.&lt;/p&gt;
&lt;p&gt;If you JUST want a debugger, Segger also ships Ozone which is completely free and really very good. That debugs with the JLink directly (no gdb server) and just reads any old ELF you throw at it. That&amp;#39;s got no editing IDE at all but does show source code from the debug info in the binary. I like it for quick debugging sessions.&lt;/p&gt;
&lt;p&gt;oh and the other thing you can get with SES is monitor mode debugging, that actually lets you debug with the softdevice running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugger - live breakpoints and memory access</title><link>https://devzone.nordicsemi.com/thread/91190?ContentTypeID=1</link><pubDate>Sat, 01 Jul 2017 01:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fd9e069-3d69-4ebc-bc4e-3e9208b6e2de</guid><dc:creator>samsonc</dc:creator><description>&lt;p&gt;Thanks for the info. Everything you&amp;#39;ve said is consistent with what I&amp;#39;ve noticed in the past. I&amp;#39;ve traced it down to either the Eclipse plug-in or the GDB server. Thanks for the info - I&amp;#39;m going to look at Segger&amp;#39;s embedded studio product. The main issue is that I prefer using gdb and makefiles for my toolchain, but the only debug IDE that I knew of that supported it well was Eclipse. Usually most other MCU manufacturers have a custom-modified Eclipse CDT platform that actually supports live view correctly - I suspect it requires some custom plug-ins to make it work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugger - live breakpoints and memory access</title><link>https://devzone.nordicsemi.com/thread/91189?ContentTypeID=1</link><pubDate>Sat, 01 Jul 2017 01:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16c64041-3a3e-44c3-8346-1b837f523118</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;There&amp;#39;s a few parts to this. First off the SWD interface on the ARM chips (all of them now I believe) support memory access while the CPU is running. I&amp;#39;m 99% sure that you can set breakpoints while the CPU is running, 99.9% actually. The only thing you can&amp;#39;t do without halting is read the registers.&lt;/p&gt;
&lt;p&gt;So if Keil (which I&amp;#39;ve never used) updates watches etc in realtime I would assume that&amp;#39;s because they are at fixed memory addresses and it just reads the data occasionally. Similarly Segger&amp;#39;s J-Scope also just instruments the ELF file, finds static variables and reads them (shame that product is still windows-only).&lt;/p&gt;
&lt;p&gt;Segger also uses this same technique for their RTT stuff which they&amp;#39;re now using for just about everything. RTT is one memory buffer, fixed place, as big as you need, into which you write a stream of data and the JLink just reads it out and gives it to a console, their realtime tracer or anything else. It&amp;#39;s their answer to SWO which I prefer myself but is ARM only.&lt;/p&gt;
&lt;p&gt;So ARM SWD supports memory access whilst running, the segger JLink adapter supports it too and I&amp;#39;m sure breakpoint setting whilst running is supported.&lt;/p&gt;
&lt;p&gt;So now I&amp;#39;ll go into guesswork mode. GDB access to the JLink is via Segger&amp;#39;s GDB server. This uses the GDB remote protocol, which is super ancient, to do the job. First off I don&amp;#39;t know if GDB remote or Segger&amp;#39;s implementation of it does a good job of memory reads without halts or breakpoint setting without halts. You could just try running gdb yourself connected to the server and type the monitor commands in, see what happens. If that works, then it&amp;#39;s probably the eclipse plugin not doing realtime updates either because it doesn&amp;#39;t know how to, or it&amp;#39;s not configured for it.&lt;/p&gt;
&lt;p&gt;One of the advantages of using something like segger embedded studio is that it doesn&amp;#39;t use the terrible GDB server at all, it, like the rest of the Segger tools and good 3rd party apps, reads and writes the JLink directly via the library. This is always going to give you a much better debugging experience, plus access to RTT and all the other good stuff.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugger - live breakpoints and memory access</title><link>https://devzone.nordicsemi.com/thread/91188?ContentTypeID=1</link><pubDate>Sat, 01 Jul 2017 00:43:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d47e3fa-69d3-4a23-a2fa-f34b43a38ed6</guid><dc:creator>samsonc</dc:creator><description>&lt;p&gt;Follow-up: I tried the Segger J-Scope, which is clearly capable of viewing live variables (even while J-Link is running in Eclipse). So it looks like an Eclipse/GDB configuration issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>