how to make printf work for HCS08QG8?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to make printf work for HCS08QG8?

4,263件の閲覧回数
Fan
Contributor I
This must be a dumb question: how to make printf work? If I put a printf() in my code, I got compilation error:
------------------------------------------------------------------------------------------------------------------------
Link Error   : L1822: Symbol TERMIO_PutChar in file C:\Program Files\Freescale\CW08 V5.0\lib\hc08c\lib\ansiis.lib is undefined

Link Error   : Link failed
-------------------------------------------------------------------------------------------------------------------------
I am using a P&E USB Multilink  debugger directly on my physical board.
Any help will be greatly appreciated. This is blocking all my code development.
 
Thanks  
 
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

940件の閲覧回数
admin
Specialist II
I never got printf() to work for me (despite using termio.c).  If you just want to shove simple data out the serial port, you might be better off just writing yourself some quickie output functions specific to your data.
 
just my $0.02
Tomahawk
0 件の賞賛
返信

940件の閲覧回数
Fan
Contributor I
Thanks for the reply. Do you know what program to use to display the serial port data?
 
0 件の賞賛
返信

940件の閲覧回数
Lundin
Senior Contributor IV
Hyperterminal comes with Windows. It is a bad program, however. Google for "serial terminal program" or something like that. Here is a free one:
http://hp.vector.co.jp/authors/VA002416/teraterm.html

To connect to the PC's COM-ports, you need RS232. SPI won't do. Use the SCI and a RS232 tranceiver.
0 件の賞賛
返信

940件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
Check the lib\hc08c\src\termio.c, and add an adapted copy to your project.
The point is that the code actually sending the character with the SCI is derivative specific, therefore it cannot be in the generic ansi library.
(Also which sci to use in case your derivative has more than one)

Daniel
0 件の賞賛
返信

940件の閲覧回数
Fan
Contributor I
Thanks a lot for the response.
I implemented termio_putchar(), and get the code the compile. I used SPI output. Is the next step to write a PC side program to display the data? Somewhere on the board people were saying to use hyperterm for display. Where can I get one? What kind of connector do I need to connect SPI output to PC?
 
0 件の賞賛
返信