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

NRF LOG + JLINKRTTClientExe

Hello,

NRF52840

SDK 15.3.0

SoftDevice: s140

OS: Ubuntu

IDE: SES

I am having difficulty getting consistency out of the RTT + NRF_LOG_INFO() print statement. It has printed what I expected in a timely manner before, but also has not responded moments later. Can you confirm the limitations of using the RTT + NRF_LOG_INFO(), and If I am unintentionally breaking it.

I have been connecting the JLinkExe, and the JLinkRTTExe in the terminal, then from there I go about loading software in SES, and debugging, adding breakpoints, loading changes. All without touching, or renewing the JLinkExe or JLinkRTTExe. Is this the expected workflow for using the RTT and NRF_LOG_INFO()? Or should the RTT be reconnected everytime I load new code?

I will say I am able to get the RTT to respond as expected some times, but other times it is either sluggish to print, or does not print at all. I am simply pressing a switch, and printing out, pressed or released.

Does the RTT use any peripherals or support that I may also be using elsewhere?

JLinkExe Setup

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SEGGER J-Link Commander V6.52 (Compiled Sep 27 2019 17:53:46)
DLL version V6.52, compiled Sep 27 2019 17:53:31
Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Hardware version: V1.00
S/N: 683177789
VTref=3.300V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: NRF52840_XXAA
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

JLinkRTTClient

Fullscreen
1
2
3
SEGGER J-Link V6.52 - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15 V1.0, SN=683177789
Process: JLinkExe
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parents
  • Hi Paul

    I have been connecting the JLinkExe, and the JLinkRTTExe in the terminal, then from there I go about loading software in SES, and debugging, adding breakpoints, loading changes. All without touching, or renewing the JLinkExe or JLinkRTTExe. Is this the expected workflow for using the RTT and NRF_LOG_INFO()? Or should the RTT be reconnected everytime I load new code?

    RTT uses a control block that is located in RAM on the target device, see this page for more information. Everytime you re-compile your code and flash it to the target, you are most likely also shifting the location of this control block. If this happens you will have to reconnect with Jlink. You can also place the control block at a static location in RAM so that the control block is at the same location all the time. 

    Best regards

    Bjørn

  • That makes sense to the problem I was seeing. 

    How would I go about making the module static? My initial guess is to change the RTT files to be static, or at leat the buffers. I am unsure of exactly what I would need to change for the module to be static and work through different uploads.

    Thank you,

  • Hi Paul, 

    there are some users that have placed the Segger Control Block at a specific RAM address when they wanted to get RTT output from both the bootloader and application, see https://devzone.nordicsemi.com/f/nordic-q-a/20708/rtt-logging-from-application-started-by-bootloader/80812#80812

    Best regards

    Bjørn

Reply Children
No Data