[SOLVED] RTT on MacOSX, TI CodeComposerStudio, Tiva LaunchPad

On Mac OSX (OSX 10.10) I have J-Link (V10) working with TI's CodeComposerStudio (CCS 7.3) and the Tiva launchpad TM4C123GH6PM (Tiva) - no problems there. I can run and debug the Tiva thru CCS or run standalone (powered through the J-Link).

By using the workaround in this Segger-forum post, I can get my simple blinky/RTT program to compile in CCS, and per the terminal output I see, can seemingly connect from a Mac Terminal to this running code via JLinkEXE and/or JLinkRTTClient but I cannot see any RTT output.

I have tried various combinations of the Tiva running under CCS debug and/or simply standalone (powered by the J-Link).

I will be happy to post any number of dumps for the various JLinkEXE and JLinkClient configurations I have tried, but first I thought I should verify some fundamentals:

Am I missing some compiler setting and/or fundamental concept? (why didn't my simple RTT program compile right out of the box? that is, why did I have to use the above-linked work around posted for SystemView?)

Is RTT supposed to work under OSX when the Tiva is flashed via the J-Link from the CCS IDE?

Am I missing some compiler setting and/or fundamental concept? (why didn't my simple RTT program compile right out of the box? that is, why did I have to use the above-linked work around posted for SystemView?)

SystemView has only been used with CCS in combination with embOS, therefore the default combination used the embOS locking mechanism.
That is why you need to apply the workaround from the other post to make sure no unknown functions from embOS are used.

Is RTT supposed to work under OSX when the Tiva is flashed via the J-Link from the CCS IDE?

RTT should be generally working on OSX with that device family.

Where are you placing the RTT control block? Make sure it is within RAM boundaries that are known to J-Link. This would be starting at 0x20000000 and size 0x8000.

To set another address you can specify it either per command line with the JLinkRTTViewer with command --rttaddr or with Command string SetRTTAddr in J-Link Commander.
More information can be found in the J-Link User Manual.

Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: Contact Us

Nino,
Thanks for responding.
In case there are any Mac OSX/Tiva/CodeComposerStudio(CCS) people following, especially anyone new to the world of SEGGER, here is what finally worked for me.

On the Mac, there is no JLinkRTTViewer; these notes are centered around using JLinkExe and JLinkRTTClient. I also punched through to JLinkRTTLogger but won't say much more about that here.

I got the JLinkRTTClient to work with and without the CCS Debugger running. The auto-location of the control block did not work at all for me - for example, within JLinkExe, I tried variations of the

J-Link>exec SetRTTSearchRanges 0x20000000 0x800

command, but could never make it work.

In hindsight, I spent too much time thinking i just had to get the address *close* since the documentation suggests that the controlBlock address is *usually* found automatically (JLink scanning for the id in certain memory spaces).
No.
Within my setup anyway, close didn't matter at all; 1 byte off wasn't close enough.

Nor could I ever get the SetRTTSearchRanges command to work.

Finally I focused on exactly specifying the address of the control block.
For anyone reading these notes, it can easily be found a few ways:

The map file: CCS has it as (.common:_SEGGER_RTT)

Looking at address of _SEGGER_RTT within debugger. Note that _SEGGER_RTT is instantiated within SEGGER_RTT.c

Or more perversely you could even loop through memory yourself, searching for the initialized string "SEGGER RTT" in memory, as long as you make sure SEGGER_RTT_Init() has been called previously.

In any case, once you have the exact address, you can enter it within JLinkExe. For me, the control block was at 0x20000400.

J-Link>exec SetRTTAddr 0x20000400

Note that JLink provides no feedback about whether or not your JLink 'exec command' is good or bad, ie if it thinks there is actually an initialized control block at your address. It only complains on a parsing error.

So, in summary:

1) Ascertain the address of _SEGGER_RTT variable (the RTT control block).

Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: Contact Us