Semihost output problems using SEGGER JLink debugger.

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

Semihost output problems using SEGGER JLink debugger.

Contributor V


I've run into a problem using the semihost option with a SEGGER JLink debugger.

I am using the RT1020-EVK board. I created a new C++ project configured for semihosting. The only change I made was to add some std::cout calls to the file MIMXRT1021_Project.cpp:

PRINTF("Hello World\n");
std::cout << "Print1 using std::cout" << std::endl;
std::cout << "Print2 using std::cout" << std::endl;
std::cout << "Print3 using std::cout" << std::endl;

The output I would expect is:

Hello World
Print1 using std::cout
Print2 using std::cout
Print3 using std::cout

And this is indeed the output I see using the LPC-Link2 debugger.

The output I actually see using the SEGGER JLink is:

Hello World
Print1 using std::cout

So the Print2 and Print3 lines are missing, and I am getting the last 4 characters of each line reprinted on a subsequent line.

MCUXpresso IDE v11.6.0 [Build 8187] [2022-07-13]
SEGGER J-Link Ultra V5.1
SEGGER J-Link GDB Server V7.70c

What could be causing this please?
And how do I fix it?

Project attached as a zip file.

Many thanks and kind regards,



Labels (1)
Tags (3)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport


First of all, sorry for the later response.

To be honest, we do not have Segger J-Link ULTRA+ debugger tool on hand and could not do a similar test onsite.

From customer description, LPC-LINK2 debugger could get serial output as expected, while VCOM of J-Link ULTRA+ could not. From my view, the RT1020 UART port should output the same data, whatever using LPC-Link2 or J-Link. The only issue could happen with J-Link VCOM driver if related setting and transmit data to serial termial software correctly. Customer could check if Segger provide the updated VCOM driver. 

Thanks for the attention.


0 Kudos