<?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>NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29094/nrf_breakpoint-causes-hard-fault-with-arm-gcc</link><description>I&amp;#39;m building a project for the nRF52832 using the NRF5-SDK version 14.0.0. I&amp;#39;m compiling using GCC 6.3.1 ( arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437] ). </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 May 2021 22:42:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29094/nrf_breakpoint-causes-hard-fault-with-arm-gcc" /><item><title>RE: NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/thread/309615?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 22:42:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:928953ee-79c5-43dd-9202-c9fe17c12a62</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;This&amp;nbsp;Q never seemed to get A&amp;#39;ed, and I recently ran in to it and solved it, so FWIW, here&amp;#39;s what I found:&lt;/p&gt;
&lt;p&gt;I also found &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;__builtin_trap()&lt;/span&gt; resulted in an &amp;quot;undefined opcode&amp;quot; and a hard fault. Then I stumbled across another version of&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;NRF_BREAKPOINT&lt;/span&gt; defined like this instead:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#if defined(__GNUC__)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; #define NRF_BREAKPOINT __asm__(&amp;quot;BKPT 0&amp;quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; #define NRF_BREAKPOINT __BKPT(0)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#endif&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;which works as expected on a nRF9160 using the NRF Connect SDK, despite this code not otherwise appearing in that SDK anywhere.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/thread/115425?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 10:31:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53363a9a-2a28-47f6-b821-431cffd23449</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You should not have any issues with GCC ARM Embedded 4.9 2015q3. Could you create a new question and describe your setup and post the build output?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/thread/115424?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 15:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35604022-c1bf-4610-bda2-dd0456a0dc2f</guid><dc:creator>vincent.golle</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am having the same issue Austin exprienced with both GCC 4.9 2015q3 and GCC 6.3.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/thread/115423?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 09:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de322511-9f48-49a9-aa29-b194d185ded7</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Austin ,&lt;/p&gt;
&lt;p&gt;SDK v14.0.0 has only been production tested using GCC ARM Embedded 4.9 2015q3, stated in the nRF5 SDK v14.0.0 Release Notes.&lt;/p&gt;
&lt;p&gt;Thus I recommend that you use the same version of the toolchain when developing.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/thread/115422?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 21:59:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f8abe12-c8e3-48fe-8313-87780368e8ff</guid><dc:creator>Austin Glaser</dc:creator><description>&lt;p&gt;I&amp;#39;ll take a look at the monitor mode debugging. For me, using the debugger is a core part of my workflow, though this is more of a question of ergonomics than functionality.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_BREAKPOINT causes hard fault with ARM-GCC</title><link>https://devzone.nordicsemi.com/thread/115421?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 21:58:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f68c6df-2df6-4835-b680-d86fdc305490</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;This may have something to do with the monitor mode debugging: &lt;a href="https://devzone.nordicsemi.com/blogs/1088/monitor-mode-debugging-with-j-link-and-gdbeclipse/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I seldom use breakpoint and rely on the Segger  RTT (real time terminal) instead for tracing purpose.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>