lpcware

Why does semihosting stop working when I add c++ code to the system

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by modig on Fri Apr 10 02:22:17 MST 2015

I am new to using the LPCXpresso and have a LPCXpresso11U68 which I want to run some c++ code on.

( Uisng version  v.7.7.2_379 )

I created a new c++ project and switched on the newlib adding the following printf statement to to the main routine

while(1) {
i++ ;
if ( i > 10000)
{
printf ( "hello world \n\r");
i =0;
}

This all works well and I see a continous stream of output on the console.

The problem is that when I add some more simple c++ to the system the printf stops working.
This can be only a couple of class declarations.

Does anybody know what causes this or should semihosting work at all in this instance.

Outcomes