This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf() causes uVision and JTAG to disconnect

There is a Keil example that shows how to redirect 'printf' located in the Keil directory:
C:\Keil\ARM\Boards\Keil\MCBSTM32E\RTX_Traffic

I am following this example copying 'Retarget.c' and 'Serial.c' into my project. I have also added UART initialization code.

At this point the following printf works great:

printf("-Performing Hardware Initialization\n");

However, when calling 'printf' with a different argument as shown below:

unsigned int stacked_r0 = 0xaa00bb11;
...

printf ("R0 = %x\n", stacked_r0);
the tools (uVision and JTAG) lose connection with the target board.  To get connected to the target board I have to hold the Reset button and let go of it just before attempting to connect.  Otherwise it is unsuccessful connecting to the target board.

Why would this be?  Is there a missing library?


0