<?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>Turning semihosting ON</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37452/turning-semihosting-on</link><description>I am having a hard time turning ON semihosting. Here&amp;#39;s my setup: 
 - Debugging is done via Eclipse GDB SEGGER J-Link Debugging with the Enable Semihosting checked and console route to both Telnet and GDB Client. 
 - Code is linked with - -specs =rdimon</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Aug 2018 10:55:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37452/turning-semihosting-on" /><item><title>RE: Turning semihosting ON</title><link>https://devzone.nordicsemi.com/thread/144503?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 10:55:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0553edab-c885-48a9-b9a9-55822b6e926b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;How does your various settings look?&lt;/p&gt;
&lt;p&gt;It is important that the GDB executable is set properly in &amp;quot;GDB Client setup&amp;quot;, as shown in the first image in this post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/15253/debugging-problem-with-gnu-arm-eclipse-toolchain-nrf52-blinky/58241#58241"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/15253/debugging-problem-with-gnu-arm-eclipse-toolchain-nrf52-blinky/58241#58241&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that this one is for semihosting + SWO, so you should not enable SWO in your case.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried that tutorial using gprof, so I am not able to say if this will work with our devices or not (with projects using the SoftDevice)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning semihosting ON</title><link>https://devzone.nordicsemi.com/thread/144278?ContentTypeID=1</link><pubDate>Wed, 15 Aug 2018 09:11:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f87869e-67df-4e10-a0c4-c4cb688807ec</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Thanks for your response. I am aware of RTT and we are already using it for logging purposes. I am interested in getting semihosting setup in order to use an existing utility that makes use of semihosting (gprof as explained here:&amp;nbsp;&lt;a href="https://mcuoneclipse.com/2015/08/23/tutorial-using-gnu-profiling-gprof-with-arm-cortex-m/"&gt;https://mcuoneclipse.com/2015/08/23/tutorial-using-gnu-profiling-gprof-with-arm-cortex-m/&lt;/a&gt;). I could rewrite the profiler code to output data over RTT but I was hoping that setting up semihosting was going to be straightforward. Do you have any tips on debugging semihosting? or would you recommend the RTT route?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning semihosting ON</title><link>https://devzone.nordicsemi.com/thread/144277?ContentTypeID=1</link><pubDate>Wed, 15 Aug 2018 08:57:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa512aab-5268-4fcb-b67e-db1314bd5e79</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re having issues with semihosting, I&amp;#39;d recommend that you look into using RTT instead, which others users also have done:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/7930/using-semihosting-to-printf"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/7930/using-semihosting-to-printf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the above thread was solved years ago, we have added full support for RTT as backend in nrf_log module (also supports UART as a backend). You can enable RTT by setting define sdk_config.h::NRF_LOG_BACKEND_RTT_ENABLED to &amp;#39;1&amp;#39;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;By default, UART is the backend used, so you should disable that in the same header file, by setting define&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED &amp;#39;0&amp;#39;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: Eclipse supports RTT&amp;nbsp;&lt;a href="https://mcuoneclipse.com/2015/07/07/using-segger-real-time-terminal-rtt-with-eclipse/"&gt;https://mcuoneclipse.com/2015/07/07/using-segger-real-time-terminal-rtt-with-eclipse/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning semihosting ON</title><link>https://devzone.nordicsemi.com/thread/144236?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 19:04:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:953a526e-6dfa-45f7-b385-68b1272bb5bf</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Just a follow up, I am taking the blinky example and making the changes described here: &lt;a href="https://mcuoneclipse.com/2014/09/11/semihosting-with-gnu-arm-embedded-launchpad-and-gnu-arm-eclipse-debug-plugins/"&gt;https://mcuoneclipse.com/2014/09/11/semihosting-with-gnu-arm-embedded-launchpad-and-gnu-arm-eclipse-debug-plugins/&lt;/a&gt;. i.e&lt;/p&gt;
&lt;p&gt;- Adding&amp;nbsp;&lt;span class="s1"&gt;LDFLAGS +&lt;/span&gt;= &lt;span class="s1"&gt;--specs&lt;/span&gt;=rdimon.specs -lrdimon&lt;br /&gt;- Removing -lnosys&lt;br /&gt;- Calling&amp;nbsp;initialise_monitor_handles() first thing in main&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>