Segger J-Link User Manual page 371

Hide thumbs Also See for J-Link:
Table of Contents

Advertisement

13.7 FAQ
Q:
How does J-Link find the RTT buffer?
A:
There are two ways: If the debugger (IDE) knows the address of the SEGGER RTT
Control Block, it can pass it to J-Link. This is for example done by J-Link Debugger.
If another application that is not SEGGER RTT aware is used, then J-Link searches
for the ID in the known target RAM during execution of the application in the back-
ground. This process normally takes just fractions of a second and does not delay
program execution.
Q:
I am debugging a RAM-only application. J-Link finds an RTT buffer, but I get no
output. What can I do?
A:
In case the init section of an application is stored in RAM, J-Link migh falsely iden-
tify the block in the init section instead of the actual one in the data section.
To prevent this, set the define SEGGER_RTT_IN_RAM to 1. Now J-Link will find the
correct RTT buffer, but only after calling the first SEGGER_RTT function in the
application. A call to SEGGER_RTT_Init() at the beginning of the application is rec-
ommended.
Q:
Can this also be used on targets that do not have the SWO pin?
A:
Yes, the debug interface is used. This can be JTAG or SWD (2pins only!) on most
Cortex-M devices, or even the FINE interface on some Renesas devices, just like
the Infineon SPD interface (single pin!).
Q:
Can this also be used on Cortex-M0 and M0+?
A:
Yes.
Q:
Some terminal output (printf) Solutions "crash" program execution when executed
outside of the debug environment, because they use a Software breakpoint that
triggers a hardfault without debugger or halt because SWO is not initialized. That
makes it impossible to run a Debug-build in stand-alone mode.
What about SEGGER-RTT?
A:
SEGGER-RTT uses non-blocking mode per default, which means it does not halt
program execution if no debugger is present and J-Link is not even connected. The
application program will continue to work.
Q:
I do not see any output, although the use of RTT in my application is correct. What
can I do?
A:
In some cases J-Link cannot locate the RTT buffer in the known RAM region.
In this case the possible region or the exact address can be set manually via a J-
Link exec command:
Set ranges to be searched for RTT buffer: SetRTTSearchRanges <RangeStart
[Hex]> <RangeSize >[, <Range1Start [Hex]> <Range1Size>, ...] (e.g. "SetRTT-
SearchRanges 0x10000000 0x1000, 0x2000000 0x1000")
Set address of the RTT buffer: SetRTTAddr <RTTBufferAddress [Hex]> (e.g. "Set-
RTTAddr 0x20000000")
Set address of the RTT buffer via J-Link Control Panel -> RTTerminal
Note:
J-Link exec commands can be executed in most applications, for example
in J-Link Commander via "exec <Command>", in J-Link GDB Server via "monitor
exec <Command>" or in IAR EW via "__jlinkExecCommand("<Command>");" from a
macro file.
J-Link / J-Trace (UM08001)
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
371

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the J-Link and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

J-trace

Table of Contents

Save PDF