Debugger probe J-Link from Segger not printing messages to J-Link RTT Viewer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugger probe J-Link from Segger not printing messages to J-Link RTT Viewer

2,714 Views
espiriki
Contributor II

I`m not sure if this is a problem with anything related to the NXP software

But I was working with some legacy projects and I was able to get output from the debugger using the follownig command

SEGGER_RTT_printf(0, " INIT MAIN LOOP\r\n");

But I updated the MCU Expresso version from 10.3 to 11.0.0 build 2516 and it is not working anymore

The program executes the above line but I can`t see any output in the Segger J-Link software, and the only thing that changed was the IDE vesion

Can anyone help me find out what may be the cause of this problem?

Kind regards

0 Kudos
Reply
6 Replies

2,546 Views
espiriki
Contributor II

I called the function SEGGER Init. And I have the SEGGER_RTT variable.

The only difference from your setup is that I have an error when I click the Channel Infos option in the upper menu

The error is in the screenshot in my previous post 

This is really strange. DO you have the installer for the 10.3 version? I think I`m gonna go back to the previous version of the MCU Expresso. I really need these debug messages

THank you

0 Kudos
Reply

2,545 Views
BlackNight
NXP Employee
NXP Employee

I believe this is more a problem of Linux and SEGGER than MCUXpresso. The IDE really has nothing to do with the RTT, except that the SEGGER_RTT variable might be optimized be the linker (which you confirm is not the case). The RTT can be used without an IDE too. You might try to connect to your board with RTT from a Windows host to check if the problem is really on the Linux side. What I have seen (at least on Windows) is the problem of mixing different J-Link versions. SEGGER recently changed the installation procedure to combine everything into a single installation folder, so this might be the issue. In any case, make sure you are compiling and using and executing all the same SEGGER versions.

Other thoughts:

- does your SEGGER RTT variable have the same string at the beginning as in my screenshot? Because the RTT is checking for that signature (and not for the variable name). It scans the RAM for that signature

- maybe the RTT fails to detect that signatur. I had cases where the RTT was assuming the wrong RAM memory map. Find out the address of your SEGGER_RTT variable and use that address manually in the dialog below:

pastedImage_1.png

I hope this helps,

Erich

0 Kudos
Reply

2,545 Views
espiriki
Contributor II

I just realized that I can connect to the probe using any frequency. What should be the correct frequency?

Does this depend on the microcontroller I`m using? I`m using a MKL17Z64XXX4

0 Kudos
Reply

2,546 Views
BlackNight
NXP Employee
NXP Employee

I have updated from 10.3.1 to 11.0.0 and the SEGGER RTT works the same as before.

I would check in the Viewer if the channel #0 is properly recognized:

pastedImage_1.png

if not it means that the RTT block is not present and might have been removed by the linker?

I hope this helps,

Erich

0 Kudos
Reply

2,546 Views
espiriki
Contributor II

Hi Erich, thanks for the answer.

How can I check this? I`ve tried all the options here but I couldn`t find the window that`s on your screenshot

Maybe because I`m using Linux it`s a bit different

There`s an option called "Channel Infos" but it gives me an error when I try to open it:

Screenshot from 2019-07-31 17-28-15.png

I`m able to disconnect and connect from the debugger using F3 and F2 respectively, as you can see in the background of the error

And if the linker is really removing the RTT block, how can I prevent this from happening?

Thanks!

0 Kudos
Reply

2,546 Views
BlackNight
NXP Employee
NXP Employee

It is here for me:

pastedImage_2.png

check in the linker map/debugger that you have this variable present:

pastedImage_1.png

It not, it means you probably did not call the SEGGER Init function (SEGGER_RTT_Init()).

I hope this helps,

Erich

0 Kudos
Reply