Saturday, December 16th 2017, 9:38pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

eliotstock

Beginner

Date of registration: Apr 12th 2015

Posts: 14

1

Tuesday, May 17th 2016, 3:48pm

[SOLVED] Using RTT logging without GDB debugging

Hi there,

I'd like to automate the running of some test code on my boards. The aim is to have a makefile target, "make test" which:

* Compiles my firmware with a -D flag set for test
* Flashes the code to my board
* Starts JLinkRTTClient
* Runs my code, so that I can watch the log output on the terminal

I notice that JLinkRTTClient looks to connect to localhost:19021 and that there's a server there listening if I also start JLinkGDBServer. I'd like to keep it simple, however, and not start the GDB server if I can avoid it. Same goes for the GDB client. I don't want to have to interact with the GDB client in order to start the test output.

Is there a way to start *just* the RTT server and RTT client and have the code execute immediately? I've checked the command line options in the PDF doc, but haven't found anything to control this.

Thanks.

eliotstock

Beginner

Date of registration: Apr 12th 2015

Posts: 14

2

Tuesday, May 17th 2016, 4:48pm

PS: I've seen the mention of the RTT Logger in the PDF docs, but can find no executable for it.

Quoted

J-Link RTT Logger opens a dedicated connection to J-Link and can be used stand-
alone, without running a debugger.



eliotstock

Beginner

Date of registration: Apr 12th 2015

Posts: 14

3

Tuesday, May 17th 2016, 5:17pm

As it happens, v5.12f was released just today and now includes the JLinkRTTLogger executable for Mac. So I can now run that instead of JLinkRTTClient, but I still have questions about getting this working.

1. Does JLinkRTTLogger still require JLinkGDBServer to be running?

2. What are the command line options? If I pass these in, they seem to be ignored:

/Applications/SEGGER/JLink/JLinkRTTLogger -device nrf51822 -if swd -speed 1000

/Applications/SEGGER/JLink/JLinkRTTLogger --help

3. Can I get the output to go to stdout rather than a file?

At the moment, all I can get the logger to do is produce an empty log file.


Thanks.

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 366

4

Wednesday, May 18th 2016, 11:09am

Hi,

JLinkRTTLogger does not require any other J-Link software to be running.

Currently RTT Logger does not support configuration via command line options.

The purpose of RTT Logger is to write the output into a file, therefore it is not possible to send it to stdout.

By default RTT Logger logs the output on RTT Channel 1, it needs to be set to 0 to log the default Terminal output.

If you require any more advanced RTT logging functionality,
you could use the J-Link SDK to create your own RTT logging application.

Best regards
Johannes

eblot

Beginner

Date of registration: Jun 15th 2017

Posts: 1

5

Friday, June 16th 2017, 10:28am

Hi,

It seems that the command line option switch has been implemented since this post, such as:

JLinkRTTLogger -Device NRF52 -If SWD -Speed 4000 -RTTChannel 0

However, no sign of a stdout support, which might not be useful on Windows, but definitely a miss on Unix (either Linux or macOS) environment.

Is the logger tool source code available (as part of the SDK for example) as I really need this kind of feature.

Thanks.

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

6

Friday, June 16th 2017, 11:13am

Hi,


Quoted

Is the logger tool source code available (as part of the SDK for example) as I really need this kind of feature.

yes, the RTT logger src code is available as part of the J-Link SDK (Part No 8.08.06 on the price list).


Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link