<?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>Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10114/serial-viewer-rrt-help</link><description>Hello, 
 I am just starting working with the nRF52 development kit and have a couple guidance questions. I&amp;#39;m very new to the Keil environment and am having a little trouble trying to get some simple things working. Please forgive the simplicity of my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Nov 2015 07:24:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10114/serial-viewer-rrt-help" /><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37519?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 07:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99ac4a1b-d0c0-4c1d-8e3a-4599b596dd0d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;It&amp;#39;s good to hear you got the essentials working.&lt;/p&gt;
&lt;p&gt;You can see the definitions for all the colors in &lt;code&gt;SEGGER_RTT.h&lt;/code&gt;. In order to use a color you have to include the color code as the first part of the string, like it is done in the tutorial. E.g. &amp;quot;%s, RTT_CTRL_BG_BRIGHT_RED&amp;quot;, will put the character string in front of .&lt;/p&gt;
&lt;p&gt;I have not found any documentation on how to print the various data types , but it is generally a subset of what you can do with &lt;code&gt;printf&lt;/code&gt;. You can see all the details from the implementation in &lt;code&gt;SEGGER_RTT_printf.c&lt;/code&gt;. E.g. you will see that you have to use &lt;code&gt;%d&lt;/code&gt; for integers (&lt;code&gt;%i&lt;/code&gt; will not work), &lt;code&gt;%x&lt;/code&gt; to print unsigned int as hex etc.&lt;/p&gt;
&lt;p&gt;It is better if you create a new question regarding how to interface with other components, as it is not really related to the min question. That way it is easier for others to make use of the answers later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37518?ContentTypeID=1</link><pubDate>Sun, 29 Nov 2015 19:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71e23f2a-7d78-441c-b7af-d0e7d76cf2cc</guid><dc:creator>jengil</dc:creator><description>&lt;p&gt;Einar - I Finally got it working, I think clicking the little add path navigation box may have done the trick, I think there must have been an error in my add paths.  Thank you immensely!&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m able to get this working - is there a list of easy to use print commands with RTT?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve completed the tutorial, but the color coding does not work (any tips?), and I&amp;#39;m still a little unsure of how to specifically print different data types (like ints and other) to the RTT with &amp;quot;SEGGER_RTT_printf&amp;quot; - is there anywhere that clarifies how this is done?  I&amp;#39;m still struggling with understanding some of the basic code and wanted to be able to print things out the help me the code and concepts.&lt;/p&gt;
&lt;p&gt;Are there additionally some basic tutorials that you could recommend that you think would help guide me to start interfacing with the various components I listed originally?&lt;/p&gt;
&lt;p&gt;Thanks for all the help again, its greatly appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37517?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2015 06:43:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d71b48b-bf5f-4ca7-8979-20d81556d536</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You are doing it right when you right click &amp;quot;nrf52832_xxaa&amp;quot; in order to create the RTT Group.&lt;/p&gt;
&lt;p&gt;The error you get indicates that SEGGER_RTT.h is not in the include path. Can you verify the following?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;you have copied the files from the archive, including SEGGER_RTT.h, to &amp;lt;Keil-install-dir&amp;gt;\ARM\Pack\NordicSemiconductor\RTT\ (replace  &amp;lt;Keil-install-dir&amp;gt; with wherever you ave Keil installed)?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;you have added the directory where y ou copied the files RTT (&amp;lt;Keil-install-dir&amp;gt;\ARM\Pack\NordicSemiconductor\RTT) to the include path (Step 2 in my answer). You can use the absolute path here. To be confident you get it right, navigate to the location using the file explorer and copy the path from the address bar and past it into Keil.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37516?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 14:26:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b951a794-9e37-42c9-ac54-f00834d0fd90</guid><dc:creator>jengil</dc:creator><description>&lt;p&gt;Einar,&lt;/p&gt;
&lt;p&gt;I missed this response as it was lower down and I didn&amp;#39;t see it.  I followed the steps that you have laid out step by step, which seem to be the same as the tutorial - only for the blinky example.  I am curious if I&amp;#39;m adding the &amp;quot;RTT&amp;quot; folder to the right spot - I right Click &amp;quot;nrf52832_xxaa&amp;quot; and click add group - However I am not given the option to add group if I actually right click &amp;quot;Project: blinky_blank_...&amp;quot; like the instructions say &amp;quot;right click on the project folder&amp;quot;.&lt;/p&gt;
&lt;p&gt;Upon following all of the outlined steps I receive only one error now, instead of three.  I have copied the error here:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;..\..\..\main.c(27): error:  #5: cannot open source input file &amp;quot;SEGGER_RTT.h&amp;quot;: No such file or directory
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I really don&amp;#39;t know what I&amp;#39;m doing wrong here, or why this is so difficult and confusing.  Is there another way to read real time (serial) communication? Where can I view sprint and printf outputs (serial windows don&amp;#39;t show them) and why is RTT preferred over this?&lt;/p&gt;
&lt;p&gt;Thanks for looking into this again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37515?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2015 07:05:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5de8378-dae6-4e15-bfec-5bdc186045bb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Yust so we are on the same page. Can you try to do this with the blinky example of the nRF52 SDK version 0.9.2? I just did this, following these exact steps. I would expect them to work for you as well.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download &lt;a href="http://download.segger.com/J-Link/RTT/RTT_Implementation_141217.zip"&gt;this archive&lt;/a&gt;, extract it and copy the RTT and Syscalls folder from the zip file into C:\Keil_v5\ARM\Pack\NordicSemiconductor&lt;/li&gt;
&lt;li&gt;In your blinky project, go to Project -&amp;gt; Options for Target ... -&amp;gt; C/C++ and add  C:\Keil_v5\ARM\Pack\NordicSemiconductor\RTT to the include path, without removing anything. This is easier if you click the button with thre dots &amp;quot;...&amp;quot; right of the include path, so that you can see each path on a separate line. When done, click &amp;quot;OK&amp;quot;.&lt;/li&gt;
&lt;li&gt;In Keil, right-click on the project-folder and click Add Group. Name it RTT&lt;/li&gt;
&lt;li&gt;Right click on the new group and select Add existing files to group &amp;#39;RTT&amp;#39;. Navigate to C:\Keil_v5\ARM\Pack\NordicSemiconductor\RTT and add SEGGER_RTT.c. Then click &amp;quot;Close&amp;quot;&lt;/li&gt;
&lt;li&gt;Put &lt;code&gt;#include &amp;quot;SEGGER_RTT.h&amp;quot;&lt;/code&gt; together with the other include statements in the top of the code.&lt;/li&gt;
&lt;li&gt;Write &lt;code&gt;SEGGER_RTT_WriteString(0, &amp;quot;Hello World!\n&amp;quot;);&lt;/code&gt; in the beginning of your &lt;code&gt;main()&lt;/code&gt; function.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have assumed that your Keil installation directory is C:\Keil_v5. If it is not, adapt any paths accordingly.&lt;/p&gt;
&lt;p&gt;Does this do the trick?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37514?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2015 22:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ebaace9-de31-4b6c-a16c-c4b2580baeb0</guid><dc:creator>jengil</dc:creator><description>&lt;p&gt;I see the &amp;quot;SEGGER_RTT.c&amp;quot; folder/file in the RTT folder within the nrf52832.... folder, but II still get the same errors during compile.  I updated to the newest version of Keil (5.17) from my older 5.16 version, and the errors still persist.  I tried on multiple examples now, and it doesn&amp;#39;t seem to be liking the simple SEGGER_RTT_WriteString() command... I am curious where printf outputs to and if I can just use that?&lt;/p&gt;
&lt;p&gt;I really am unsure why this is not working if I have the files added.  I also have tried adding the include path for the main.c file as well as the &amp;quot;target&amp;quot; (nRF52) but still cannot compile.&lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;
&lt;p&gt;Thanks for taking the time to work through this with me Einar!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37513?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2015 14:30:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d797c18-be03-4734-80d6-86a88ad8add8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The &amp;quot;Add Files...&amp;quot; dialog box does not normally close after you have clicked add. (I suppose this is in case you want to add more files, clicking &amp;quot;Add&amp;quot;.) You have to click close after adding the files. Are you sure the file is not being added? If not, then I guess this is a Keil bug, so maybe you should consider upgrading Keil.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37512?ContentTypeID=1</link><pubDate>Sun, 15 Nov 2015 07:00:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93984c5d-ab8f-4aa7-924d-58e42d946063</guid><dc:creator>jengil</dc:creator><description>&lt;p&gt;So I&amp;#39;ve tried this numerous times this week, all ending in the same results.  I keep trying to add the SEGGER_RTT.c file, and the dialog does not close when I click add, and I don&amp;#39;t see it added anywhere, making me think it is not being added to the new group.&lt;/p&gt;
&lt;p&gt;I am using those RTT files, and still am getting the same results.  It feels like i may be missing something as I still can&amp;#39;t get the print string to compile.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37511?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2015 07:46:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:258298b0-616e-4114-919b-5d7941df1325</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;When the C file SEGGER_RTT.c  is added to the project you should see that it is compiled in the Build Output window the next time you compile (only the first time, unless you modify it or clean the project). Are you using the &lt;a href="http://download.segger.com/J-Link/RTT/RTT_Implementation_141217.zip"&gt;RTT files&lt;/a&gt; linked to in the tutorial? I have followed the tutorial step-by-step using the nRF52 DK and nRF52 SDK 0.9.2 and did not face any issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37509?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2015 16:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:709bb5fd-6fc3-490f-8785-8f4833978375</guid><dc:creator>jengil</dc:creator><description>&lt;p&gt;I realized this was definitely part of the issue - but I am still not all of the way there.  I was using an older version (from the tutorial) instead of the newest version.  I have gone through the steps and now get the nRF52 option and RTT Viewer appears to &amp;quot;see&amp;quot; the nRF52.  My problem is now in Keil, when I try to build a simple PWM sketch with the two added lines:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;#include &amp;quot;SEGGER_RTT.h&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;&lt;em&gt;SEGGER_RTT_WriteString(0, &amp;quot;Hello World!\n&amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I then receive these errors when building the file (that previously built with no problems)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;..\..\main.c(43): error:  #79: expected a type specifier
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;SEGGER_RTT_WriteString(0, &amp;quot;Hello World!\n&amp;quot;);
....\main.c(43): error:  #79: expected a type specifier
SEGGER_RTT_WriteString(0, &amp;quot;Hello World!\n&amp;quot;);
....\main.c(43): error:  #260-D: explicit type is missing (&amp;quot;int&amp;quot; assumed)
SEGGER_RTT_WriteString(0, &amp;quot;Hello World!\n&amp;quot;);&lt;/p&gt;
&lt;p&gt;I have followed the steps quite closely in this example, and the only part I am unsure about is when I add the .c files to the RTT folder in the project - I simply click add and I don&amp;#39;t see anything happen after I&amp;#39;ve clicked it.  Maybe I&amp;#39;m missing something here?&lt;/p&gt;
&lt;p&gt;Any ideas?  Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Serial Viewer (RRT) Help</title><link>https://devzone.nordicsemi.com/thread/37510?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2015 10:19:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5277cbc2-c3f9-4d89-8e09-623bc62d0a86</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Which version of Segger J-Link software do you use? I have the nRF52 as a option, and I use version 5.02. Can you download and install the latest &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF52-DK/nRF5x-Tools-Win32/51499"&gt;nRF5x-Tools-Win32&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>