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?

  • Einar,

    I missed this response as it was lower down and I didn'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'm adding the "RTT" folder to the right spot - I right Click "nrf52832_xxaa" and click add group - However I am not given the option to add group if I actually right click "Project: blinky_blank_..." like the instructions say "right click on the project folder".

    Upon following all of the outlined steps I receive only one error now, instead of three. I have copied the error here:

    ..\..\..\main.c(27): error:  #5: cannot open source input file "SEGGER_RTT.h": No such file or directory
    

    I really don't know what I'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't show them) and why is RTT preferred over this?

    Thanks for looking into this again.

Reply
  • Einar,

    I missed this response as it was lower down and I didn'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'm adding the "RTT" folder to the right spot - I right Click "nrf52832_xxaa" and click add group - However I am not given the option to add group if I actually right click "Project: blinky_blank_..." like the instructions say "right click on the project folder".

    Upon following all of the outlined steps I receive only one error now, instead of three. I have copied the error here:

    ..\..\..\main.c(27): error:  #5: cannot open source input file "SEGGER_RTT.h": No such file or directory
    

    I really don't know what I'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't show them) and why is RTT preferred over this?

    Thanks for looking into this again.

Children
No Data
Related