How to use SEGGER RTT view - no IDE

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
daleonpz
Offline
Last seen: 2 years 3 weeks ago
Joined: 2020-02-17 14:14
How to use SEGGER RTT view - no IDE

Hi,

I'm trying to make SEGGER RTT work. I'm using CMake to compile my application on Ubuntu.

I added  `#include SEGGER_RTT.h` to `main.c`.  In main() I call `SEGGER_RTT_Init()` and then I just do a while loop with `SEGGER_RTT_WriteString(0, "HELLO \n");`

In my `custom_config_qspi.h` I added `#define CONFIG_RTT    1`.

I also added the SEGGER_RTT.c and SEGGER_RTT_printf.c and SEGGER headers.

This is what I do:

- Build and flash my DA14681 microcontroller

- Grep from memory map the address of _SEGGER_RTT

- Open JLink  RTT Viewer V6.70 :

      - Type of connection: USB,
      - Target: DA14681
      - Interface: SWD (4000 Hz)
      - RTT control block: Address from grep

But I receive no output

I hop you could help me ..thanks

 

 

Keywords: 
Device: 
PM_Dialog
Offline
Last seen: 9 months 1 day ago
Staff
Joined: 2018-02-08 11:03
Hi daleonpz,

Hi daleonpz,

Please take a look at the freertos_rtt project of the SDK1.0.14. This project is located under projects\dk_apps\templates path and redirects I/O (e.g. printf) to SEGGER's Real Time Terminal. Please check the printf() function in freertos_rtt\startup\config.c file. This function uses SEGGER_RTT_vprintf(). The CONFIG_RTT macro should be defined as well in custom_config_xxxx.h. Regarding the RTT, this example should be taken as a reference. For more information, please refer to SEGGER website.

Thanks, PM_Dialog

daleonpz
Offline
Last seen: 2 years 3 weeks ago
Joined: 2020-02-17 14:14
Thanks for the reply.. it was

Thanks for the reply.. it was a HW problem with the debugger. I ordered another and it worked.

PM_Dialog
Offline
Last seen: 9 months 1 day ago
Staff
Joined: 2018-02-08 11:03
Hi daleonpz,

Hi daleonpz,

Glad that you got it working! If you have any other question, please feel free to create a new forum ticket.

Thanks, PM_Dialog