- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello everybody!
I was wondering if there's any way to display debug information in the command window. I mean, to help debugging, I want to print a string in the command window when a specific action has been done, for example, when a button is pressed I want the command window to show "BUTTON PRESSED".
I'm programming in C, using Codewarrior for the mc9s12a128 y mc9s12a256.
The code will look something like this:
if (button_port == 1) {
/* ACTIONS WHEN BUTTON PRESSED */
write_in_cmd_window("BUTTON PRESSED") <--- This will be the command or instruction I'm looking for in order to "comunicate" with the command window, if possible.
}
Thanks in advance, I hope this can be done!
SebaS
解決済! 解決策の投稿を見る。
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello
HI-WAVE does not allow you to send messages from the application to the
command window.
When debugging on your hardware stdout should be redirected to some peripheral.
Modifying TermIO.c you can send the data to any peripheral available (SCI, LCD, ...).
But you need to get one free resource dedicated to that.
CrasyCat
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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!
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello
HI-WAVE does not allow you to send messages from the application to the
command window.
When debugging on your hardware stdout should be redirected to some peripheral.
Modifying TermIO.c you can send the data to any peripheral available (SCI, LCD, ...).
But you need to get one free resource dedicated to that.
CrasyCat
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Sebastian,
I don't know how to printf from target to Hiwave windows, but I know how to do that with NoICE debugger (http://www.noicedebugger.com). Feature is called Virtual UART. Here's their help system
http://www.noicedebugger.com/help/help.htm
and here's direct url to how it may work
http://www.noicedebugger.com/help/bdm12.htm#VIRTUAL_UART