<?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>Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/930/eclipse-cdt-gdb-debugging-with-nrf51822-breaks-on-every-line</link><description>I have Eclipse CDT set up for debugging the ble_app_proximity sample code on a Mac. I can start the GDB server on the console and connect to it. Flashing the code seems to work. I&amp;#39;ve already flashed the softdevice from a Windows machine. Disconnecting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Oct 2014 08:51:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/930/eclipse-cdt-gdb-debugging-with-nrf51822-breaks-on-every-line" /><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4474?ContentTypeID=1</link><pubDate>Thu, 09 Oct 2014 08:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c8950a-5c6a-4d0f-bffd-94aac68720ef</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Luna does not work well.  see this post &lt;a href="http://embeddedsoftdev.blogspot.ca/p/eclipse.html"&gt;embeddedsoftdev.blogspot.ca/.../eclipse.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4473?ContentTypeID=1</link><pubDate>Thu, 09 Oct 2014 06:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:230cafdb-19c3-4310-9f59-dcffbc7ae7fe</guid><dc:creator>zeusminos</dc:creator><description>&lt;p&gt;hi,
What eclipse/gcc toolchain version are you using?
What Segger jlink module/firmware version are you using?
What Segger jlink software version are you using?&lt;/p&gt;
&lt;p&gt;I have some very strange behavior using eclipse luna (latest version) and I am in the process to downgrade and use eclipse  Kepler 4.3 SR2. According to &lt;a href="http://gnuarmeclipse.livius.net/blog/plugins-install/"&gt;GNU ARM Eclipse&lt;/a&gt; is the most stable option. They recommend to use gcc-arm-none-eabi-4_8-2014q2 (I am using this ver already). I am using the latest Segger version.&lt;/p&gt;
&lt;p&gt;My next step is use Kepler and if I do not see any change I will use the toolchain/jlink recommended/included in the SDK.&lt;/p&gt;
&lt;p&gt;Feel free to post your combinations and we may narrow down this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4472?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2014 01:35:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f623492a-e9c5-4ae6-9f8b-99eaf15171b9</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Hi Ellot,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; I am using the same Eclipse plugins from livius as you.  I don&amp;#39;t use the makefile.  I created the Eclipse project using the Wizard for generic ARM.  Then go to project properties and change the processor to Cortex-M0 and set all the include paths.  Add links to SDK sources as require.  Debug using the default settings.  I have no problem debugging blank app.  When using s110, it just doesn&amp;#39;t break.  To be able to debug with s110, the trick I found is to first upload the code using nRFGo via DFU upload via serial.  I have the DFU project in Eclipse working.  After DFU flash the App, go back to Eclipse and start debuting, it should stop at system startup.  One other thing, there is a limit of 4 break points.  Debug won&amp;#39;t start properly if you set more than 4 break points.  I hope this helps.  Good luck.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hoan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4471?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2014 19:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22b4b760-b90c-43e1-865f-257d7b29d2a5</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I finally managed to get this to work using a combination of the unofficial pure gcc Makefiles here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/hlnd/nrf51-pure-gcc-setup"&gt;github.com/.../nrf51-pure-gcc-setup&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and the GNU ARM Eclipse plugin here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://gnuarmeclipse.livius.net/blog/jlink-debugging/"&gt;gnuarmeclipse.livius.net/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the pure-gcc Makefiles to build the project and start the Segger GDB server, but then the GDB client is all within Eclipse. Will attach screenshots of my configuration for the Eclipse GDB stuff in case it helps anyone else. Using the terminal version of the GDB client was useful in figuring out how it all works, but in the end I&amp;#39;ve switched back to the Eclipse GDB client for now.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/screenshot_5F00_debug_5F00_01.png" alt="screenshot_debug_01.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/screenshot_5F00_debug_5F00_02.png" alt="screenshot_debug_02.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/screenshot_5F00_debug_5F00_03.png" alt="screenshot_debug_03.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4466?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2014 13:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2913af1-5011-4539-acf8-7cd31c86d160</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;As for the first part, you haven&amp;#39;t included the first line in my suggestion, the file line. When you haven&amp;#39;t, GDB will for sure be confused.&lt;/p&gt;
&lt;p&gt;Also, if you hardcode the reset handler, you must be certain that it is correct for your softdevice version. It seems to me that the reset handler for 6.0.0 is on 0x12B99, so if you then try to use 0x114CD, nothing will work correctly.&lt;/p&gt;
&lt;p&gt;If you struggle with Eclipse, you may be better off starting out with command line GDB, get that working, and only then move to Eclipse.&lt;/p&gt;
&lt;p&gt;Finally, you can ignore all the other monitor commands in the application note, as they are not strictly required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4465?ContentTypeID=1</link><pubDate>Sat, 04 Jan 2014 00:23:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52b6fdf8-b2f6-4e79-b489-32a46a28d4c2</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I still can&amp;#39;t get this to work.&lt;/p&gt;
&lt;p&gt;Following your suggestion here...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/index.php/strange-behaviour-with-nrf51822-and-s110#reply-931"&gt;devzone.nordicsemi.com/.../strange-behaviour-with-nrf51822-and-s110&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;... gdb gets very confused:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;monitor speed 30
monitor flash device = nRF51822
load
Loading section .text, size 0xab90 lma 0x14000
Loading section .ARM.exidx, size 0x8 lma 0x1eb90
Loading section .data, size 0x94 lma 0x1eb98
Start address 0x1e6e1, load size 44076
Transfer rate: 21521 KB/sec, 8815 bytes/write.
mon reset
monitor flash download = 1
The target endianness is set automatically (currently little endian)
No symbol table is loaded.  Use the &amp;quot;file&amp;quot; command.
No symbol table is loaded.  Use the &amp;quot;file&amp;quot; command.
No symbol table is loaded.  Use the &amp;quot;file&amp;quot; command.

monitor halt
continue
Continuing.

Temporary breakpoint 1, 0x000157bc in main ()
No breakpoint number 5.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If I instead use &amp;quot;Load image&amp;quot; and &amp;quot;Load symbols&amp;quot; and point to the .elf file (I&amp;#39;m now using the GNU ARM Eclipse plugin, which seems to produce both an .elf file and a .hex file), then reduce my gdb startup commands to simply &amp;quot;mon reset&amp;quot;, I get the same errors.&lt;/p&gt;
&lt;p&gt;If I then add the following back in for startup commands...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mon speed 10000
mon endian little
mon flash download = 1
mon flash device = NRF51822
mon reset 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;... I do get the same errors on the gdb console, but at least some code executes on the device. The debugger doesn&amp;#39;t show me the breakpoint in the code, it creates a &amp;quot;Source not found&amp;quot; window at an address in my main() (0x157bc).&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also followed your advice here...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/index.php/uart-application-problem"&gt;devzone.nordicsemi.com/.../uart-application-problem&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...and put address 114CD in for &amp;quot;Set program counter at&amp;quot;.&lt;/p&gt;
&lt;p&gt;And I&amp;#39;ve removed the default NVIC_SystemReset() call in the app_error_handler() and instead called ble_debug_assert_handler(), as you suggested somewhere.&lt;/p&gt;
&lt;p&gt;Am out of ideas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4470?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2013 16:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bae8723d-2073-4603-a423-bf9480fac859</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Sorry if I was unclear, but I meant to ask you to remove this reset, and instead use an infinite loop (or ble_debug_assert_handler, since that contains such loop).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4469?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2013 16:30:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5472abe-cff4-4f4e-b9bc-d3874235e0ec</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Yes, still having trouble. Nope, haven&amp;#39;t touched the code from the BLE proximity profile sample app, so the app_error_handler is just as it was.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4468?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2013 16:21:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:935e11ec-242c-4c60-9c81-534cfd78c4bf</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Does that mean that you still have trouble?&lt;/p&gt;
&lt;p&gt;Did you also remove the reset from app_error_handler, and instead use some kind of infinite loop? I&amp;#39;ve sometimes seen Eclipse/GDB be confused from this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4467?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2013 15:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c343af5-2146-4c98-a106-2b8a8aab2f8b</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;That worked for a second and got me as far as the main loop, but seconds later I was stuck again with the debugger looking at 0x0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse CDT, GDB debugging with nRF51822: breaks on every line.</title><link>https://devzone.nordicsemi.com/thread/4464?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2013 11:02:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:787d5b9e-9002-4946-92fa-e5fef19cdce7</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I suspect what you&amp;#39;re seeing is a consequence of Eclipse not behaving correctly with regard to reseting. Have you had a look at &lt;a href="https://devzone.nordicsemi.com/index.php/strange-behaviour-with-nrf51822-and-s110#reply-931"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/index.php/uart-application-problem"&gt;this&lt;/a&gt; question? I&amp;#39;d recommend trying to modify your startup settings, deselecting the &amp;quot;Load&amp;quot; options and do it manually instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>