printf through usart

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

printf through usart

1,605 Views
GP
Contributor I
Hi every one,
 
I am using the M52233DEMO board with codewarrior 6.3.
I have to access the USART via the printf() statement, but I don't succeed in redirect stdout.
The 'Console I/O' window appears with the text I have to transmit, but the terminal I use doesn't display this message. Does anyone know how to resolve this problem ?
Labels (1)
0 Kudos
2 Replies

421 Views
SimonMarsden_de
Contributor II
If you've created a sample project from the CodeWarrior Stationery, you should find that it has three build targets. The names are something like:

M52233 DEMO Console Debug
M52233 DEMO UART Debug
M52233 DEMO Internal ROM


The first two of these targets are for quickly getting your code up and running. The debugger initialises the board for you and then downloads your code into RAM on the board.

The final target builds the version where the application boots from Flash, which is what you'll need to do in the end. After building it, you need to 'burn' the code into the Flash memory on the board.

To answer your question specifically, if you select the first target 'Console Debug', all I/O will appear in a Console Window on your PC. You need to choose the second target 'UART Debug' if you want I/O to be done via the UART (The third target also does this).


Hope this helps


Simon
0 Kudos

421 Views
GP
Contributor I
Allright Simon, I understand now
 
Many thanks
0 Kudos