This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Serial Viewer (RRT) Help

Hello,

I am just starting working with the nRF52 development kit and have a couple guidance questions. I'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 questions but I'm new to this. Ideally, I'd like to hook up an LCD screen and rotary encoder to one end of my link, and after I learn to implement these items I'd like to set up some bluetooth applications. Before I can accomplish any of this however, I have to figure out a way to get real time serial outputs so I can observe how everything is working and for assistance in debug and eventually, radio and bluetooth verification.

I initially tried the Keil Serial windows, but with no avail I followed the tutorial here (devzone.nordicsemi.com/.../) but my RTTViewer does not offer a nRF52 for an option, and does not find an "emulator" when attempting to connect. It then asks for an IP address which I don't know. I am unsure what the correct method to go about viewing serial output from the microcontroller is. Does anyone have any guidance on how to view real time serial output from the nRF52?

Additionally, is there any where to look for help setting up and printing to a typical 16x2 character LCD screen like this (www.newhavendisplay.com/nhd0216k1zflybw-p-284.html) and also interfacing with a simple (quadrature or grey code output) rotary encoder?

These two items would allow me to get started working on some of my projects and then get the radios and bluetooth talking.

Thanks for any help or input on this topic!

  • 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 nRF5x-Tools-Win32?

  • 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 "see" the nRF52. My problem is now in Keil, when I try to build a simple PWM sketch with the two added lines:

    #include "SEGGER_RTT.h"

    and

    SEGGER_RTT_WriteString(0, "Hello World!\n");

    I then receive these errors when building the file (that previously built with no problems)

    ..\..\main.c(43): error:  #79: expected a type specifier
    

    SEGGER_RTT_WriteString(0, "Hello World!\n"); ....\main.c(43): error: #79: expected a type specifier SEGGER_RTT_WriteString(0, "Hello World!\n"); ....\main.c(43): error: #260-D: explicit type is missing ("int" assumed) SEGGER_RTT_WriteString(0, "Hello World!\n");

    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't see anything happen after I've clicked it. Maybe I'm missing something here?

    Any ideas? Thanks

  • 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 RTT files 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.

  • So I'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't see it added anywhere, making me think it is not being added to the new group.

    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't get the print string to compile.

    Thanks

  • The "Add Files..." dialog box does not normally close after you have clicked add. (I suppose this is in case you want to add more files, clicking "Add".) 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.

Related