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!

Parents
  • 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.

    1. Download this archive, extract it and copy the RTT and Syscalls folder from the zip file into C:\Keil_v5\ARM\Pack\NordicSemiconductor
    2. In your blinky project, go to Project -> Options for Target ... -> 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 "..." right of the include path, so that you can see each path on a separate line. When done, click "OK".
    3. In Keil, right-click on the project-folder and click Add Group. Name it RTT
    4. Right click on the new group and select Add existing files to group 'RTT'. Navigate to C:\Keil_v5\ARM\Pack\NordicSemiconductor\RTT and add SEGGER_RTT.c. Then click "Close"
    5. Put #include "SEGGER_RTT.h" together with the other include statements in the top of the code.
    6. Write SEGGER_RTT_WriteString(0, "Hello World!\n"); in the beginning of your main() function.

    I have assumed that your Keil installation directory is C:\Keil_v5. If it is not, adapt any paths accordingly.

    Does this do the trick?

  • You are doing it right when you right click "nrf52832_xxaa" in order to create the RTT Group.

    The error you get indicates that SEGGER_RTT.h is not in the include path. Can you verify the following?

    1. you have copied the files from the archive, including SEGGER_RTT.h, to <Keil-install-dir>\ARM\Pack\NordicSemiconductor\RTT\ (replace <Keil-install-dir> with wherever you ave Keil installed)?

    2. you have added the directory where y ou copied the files RTT (<Keil-install-dir>\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.

Reply
  • You are doing it right when you right click "nrf52832_xxaa" in order to create the RTT Group.

    The error you get indicates that SEGGER_RTT.h is not in the include path. Can you verify the following?

    1. you have copied the files from the archive, including SEGGER_RTT.h, to <Keil-install-dir>\ARM\Pack\NordicSemiconductor\RTT\ (replace <Keil-install-dir> with wherever you ave Keil installed)?

    2. you have added the directory where y ou copied the files RTT (<Keil-install-dir>\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.

Children
No Data
Related