<?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>Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12963/software-breakpoints-with-j-link-probe</link><description>Hi, 
 I am not able to make software breakpoints working with a Segger J-Link probe. 
 As an exemple, here is my assert callback function: 
 void __attribute__((noreturn)) __assert_func(const char *file, int line, const char *func, const char *failedexpr</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 May 2016 08:46:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12963/software-breakpoints-with-j-link-probe" /><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49421?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 08:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94e39cdb-8f14-41d2-8c2b-909ce21a9ce9</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;Yes, I posted a message on the Segger forum and I also opened an issue on the gnuarmeclipse Github repo. Thanks for your help !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49420?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 08:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4385ce0c-0906-4b29-8a9e-2c3c785605b5</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;try the segger forums then because it seems none of the rest of us have this issue - they may have something to suggest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49419?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 08:34:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:667df55c-02cc-4047-a6b9-e56fee10c61c</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;Thanks for your help @rols. With my setup, the processor is not stopped when I use your code.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;JLinkARM.dll V5.12f&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Target device &lt;code&gt;nRF51822_xxAA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Firmware: J-Link Lite-Cortex-M V8&lt;/li&gt;
&lt;li&gt;GNU ARM C/C++ J-Link Debugging version &lt;code&gt;3.2.1.201604190915&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors) version &lt;code&gt;5.3.1 20160307&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But it&amp;#39;s working with the Segger tools version &lt;code&gt;5.10m&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49418?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 07:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f879e278-3752-4fbd-84aa-5a5469398b84</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I really don&amp;#39;t know what problem you&amp;#39;re having but I can tell you this code works with GCC every time, including on the current JLINK version, I use it in my hardfault handler to toss me out to the debugger and I was using it today because .. it&amp;#39;s been Hardfault Wednesday&lt;/p&gt;
&lt;p&gt;.....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    volatile uint32_t __attribute__((unused)) pc_ret	= stacked_data[ 6 ];
    volatile uint32_t __attribute__((unused)) xPSR		= stacked_data[ 7 ];

	__BKPT(0);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49414?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 07:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0329af4f-6bd1-4c84-9f56-52c38c5348e1</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;@hungbui the code above works with my Segger J-Link lite probe and the Segger tools &lt;code&gt;5.10m&lt;/code&gt;, but it&amp;#39;s not working with the latest version &lt;code&gt;V5.12&lt;/code&gt; :(&lt;/p&gt;
&lt;p&gt;I will post a message on the Segger forum, or I will contact the GNU ARM Ecplise plugin guys. Thanks for your help !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49413?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 17:15:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a8c71ee-f95b-49eb-a42d-01c0e93d2c13</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;They are no source in the Zip file you gave me... &lt;code&gt;&amp;lt;locationURI&amp;gt;PARENT-3-PROJECT_LOC/main.c&amp;lt;/locationURI&amp;gt;&lt;/code&gt;
I try to make this working with the nRF51 and not the nRF52. There are some error callbacks in my code where it makes sense to stop the program automatically. This is a very developer-friendly way to debug a software. Could you tell me which version of the Segger tools you use ? I use the latest version available today, and this is maybe the problem...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49412?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 10:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b7601b1-a15c-4d42-a9fa-5a4d1e47a64d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Metch,&lt;/p&gt;
&lt;p&gt;I attached here the project. It&amp;#39;s basically the same with the blinky project provided by Vidar &lt;a href="https://devzone.nordicsemi.com/tutorials/7/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/armgccEclipse.zip"&gt;armgccEclipse.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;May I ask why you want to use the software breakpoint ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49415?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 06:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:471004ef-a904-4411-a8a9-95789dfda338</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;I cannot make this running correctly :( The processor does not halt on the software breakpoint. I program an &lt;code&gt;.elf&lt;/code&gt; file instead of an &lt;code&gt;.out&lt;/code&gt; file. This is the only difference I see.
I use the maximum (-g3) debug level when compiling. Maybe do you use nay other debug flags ? Could you please give me some information about the tools and version use use ? Segger tools, Eclipse, GCC/GDB and debug probe ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49416?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 13:27:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0637976-006d-4eca-92ef-5c94197fef7b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@metch: no, no modification from default setting:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/setting1.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/setting2.PNG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49411?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 07:22:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abe8bdaf-f46b-457f-b6c1-13d03225e201</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;@hungbui, thanks for you answer. It still doesn&amp;#39;t work on my side... I use the SEGGER J-Link GDB Server V5.12e version, I will try with the same version as you.&lt;/p&gt;
&lt;p&gt;Any custom settings in the &amp;quot;GDB client setup&amp;quot; and &amp;quot;Run/Restart Commands&amp;quot; ? I cannot see the configuration you use in the bottom of each images.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49407?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 14:16:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e9c8d25-47a6-4429-8556-333d78a2b97f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Metch,&lt;/p&gt;
&lt;p&gt;here is the debugger and start up tab, I also tested with Jlink Lite and PCA10040 v0.9.0.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4666.Debugger.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/startup.PNG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49410?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 07:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb3fbe3-506e-45f2-a035-7e576c576801</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;SEGGER J-Link GDB Server V5.12e Command Line Version
JLinkARM.dll V5.12e (DLL compiled Apr 29 2016 15:03:58)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Target device:                 nRF51822_xxAA
Target interface:              SWD
Target interface speed:        1000kHz

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Lite-Cortex-M V8 compiled Aug 20 2015 17:57:19
Hardware: V8.00
S/N: *****
Feature(s): GDB
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49409?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 07:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8b9b02d-b862-400c-87b7-169069dff1b0</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;I also tested the same program using the onboard Segger probe on the nRF52 preview dev kit (&lt;code&gt;PCA10040&lt;/code&gt; version 0.9.0). Unfortunately, same result...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49408?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 06:50:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90944d6c-e6c4-493c-bf90-6eb6dd96521f</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;@hungbui thanks for your reply. I use the latest Segger tools &lt;code&gt;V5.12e&lt;/code&gt;, GNU ARM C/C++ J-Link Debugging	&lt;code&gt;3.2.1.201604190915&lt;/code&gt;, GCC &lt;code&gt;5.3.1 20160307&lt;/code&gt; and a Segger J-Link Lite probe with the latest firmware. The code compiles, but I still have the same message and no breakpoint in Eclipse...&lt;/p&gt;
&lt;p&gt;Could you please post two screenshots of the GDB SEGGER J-Link Debugging configuration for the Debugger and Startup tabs ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49406?ContentTypeID=1</link><pubDate>Wed, 11 May 2016 13:43:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c3183ca-45ee-44a3-a400-eef5a312a578</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@metch: yes, just tested, it worked for me here. Segger Jlink v5.10m,   GNU ARM C/C++ J-Link Debugging	3.2.1.201604190915. I have to modified the code like this, so it compiles:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static inline void break_here(void)
   {
       __asm volatile(
           &amp;quot;bkpt #0x01\n\t&amp;quot;
           &amp;quot;mov pc, lr\n\t&amp;quot;
         );
   }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49405?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 07:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb8a69d8-63cd-4c67-a52b-bd14c54c6732</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;@hungbui Have you tested you code with the Segger plugin from the GNU ARM Eclipse plugin ? Any help is welcome.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49403?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2016 15:41:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1409f8d-be2f-40be-98ce-11ec052a3caa</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;I do more tests and the problem is a probably a wrong configuration or setup of the GNU ARM Eclipse plugin and the Segger J-Link debugger because my code works with Keil and with Eclipse + GDB + OpenOCD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49404?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2016 11:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cf132a9-802c-4c10-ada3-4459f0881d15</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I saw that you also posted a comment &lt;a href="http://forum.segger.com/index.php?page=Thread&amp;amp;threadID=2135"&gt;here&lt;/a&gt;. But what I understood is that the user who posted the thread managed to stop at the break point, but not able to continue, in your case it was that the debugger didn&amp;#39;t stop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49417?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2016 10:16:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bbcbea0-134f-42b7-a69c-f286dbf48f33</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;Thanks @hungbui. &lt;code&gt;;&lt;/code&gt; are missing in your code ;)&lt;/p&gt;
&lt;p&gt;My problem is not a compilation issue. Is use the exact same code with the GNU GDB debugger and it works. With a J-Link Lite probe, I get the following messages:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Read 4 bytes @ address 0x00023544 (Data = 0x46F7BE01)
Starting target CPU...
Read 4 bytes @ address 0x00023544 (Data = 0x46F7BE01)
Starting target CPU...
[etc...]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The software breakpoint is not working with my setup unfortunately :(&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2016/05/25:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following code can be used with GCC:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static inline void break_here(void) {
  __asm volatile(
    &amp;quot;bkpt #0x01\n\t&amp;quot;
    &amp;quot;mov pc, lr\n\t&amp;quot;
  );
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code only works with my Segger J-Link lite probe and the Segger tools &lt;code&gt;5.10m&lt;/code&gt;. It doesn&amp;#39;t work with the the latest Segger version&lt;code&gt;5.12&lt;/code&gt;...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2016/07/08:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The error has been reported to Segger and they fix the problem. GDB 7.10 changed something in the way breakpoints halt execution, and current SEGGER JLinkGDBServer had problems to correctly inform GDB about the BKPT.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Software breakpoints work fine again from Segger tools version &lt;code&gt;V5.12h&lt;/code&gt;.&lt;/strong&gt; You should update the tools manually to the latest available version. You can download it from here: &lt;a href="https://www.segger.com/downloads/jlink"&gt;www.segger.com/.../jlink&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49401?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2016 09:23:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ed174ad-80e9-4c7f-b379-dca9befc5d89</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi metch,
Yes my code is for KEIL. On GCC, I assume it should be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; static inline void break_here(void)
    {
        __asm volatile(
            &amp;quot;bkpt #0x01&amp;quot;           
            &amp;quot;mov pc, lr&amp;quot;      
          );
    }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49402?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2016 18:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58f7bf65-08eb-48b0-8330-d274d8a69d25</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;Thanks @hungbui, unfortunately your code is not working with my setup. I will also try it with Keil. Maybe there is something wrong in my Eclipse / J-Link configuration. Any help is welcome.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Software breakpoints with J-Link probe</title><link>https://devzone.nordicsemi.com/thread/49400?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2016 09:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a76096f1-c269-4348-99a0-60a008dc1473</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi metch, I haven&amp;#39;t tested with GDB but testing on Keil show that Jlink worked fine. My function is like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;__asm void break_here(void)
{
    bkpt #0x01
    mov pc, lr	
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>