Thanks, Tom! I read that thread and I've been searching on the forums, but I couldn't find the solution to my problem. Every thread I found (also the one you suggested) are about printf, it uses a serial port for the communication and requieres the initialization and implementation of some TERMIO functions. The actual project I'm working on uses ALL the avaible serial ports so I can't use one of them for the printf.
Let me explain a little more what I want to do: In the command window of the CodeWarrior Debugger (HiWave) one can input some "code" in order to inspect the value of the variables. This can be done, for example, like this: (">>" is the command window input line)
>>e VAR1
An it "prints" the value or VAR1. It could also be done with a printf.
What I want is the MCU (actually, code inside it) to communicate with the HiWave command windows and execute, for example, "e VAR1" so in the command window I can see the value of VAR1.
Later, what I'll do is NOT to execute commands, but to print comments, so I can trace and follow the behavior of the code I'm debugging.
I hope that can be done, and thanks to all!