HC12: Link Error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,113件の閲覧回数
quassia
Contributor I
When I make the program " Helloworld". It always shows linked failed:
C:\.....HC12C\lib\ansibi.lib is undefined.
Why?
I remove lib\ansibi.lib then add it. It still has this problem.
Thanks
 

Message Edited by CrasyCat on 2007-04-13 02:26 PM

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
794件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
The derivative independent ansibi.lib cannot contain SCI code as
this has to be adapted the your actual speeds and SCI port number.
Therefore your have to provide you own TERMIO_Putchar and TERMIO_Init functions.
Have a look at the code in
lib\hc12c\src\termio.c
Adapt TERMIO_Init and call it before using printf.

Daniel

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
794件の閲覧回数
quassia
Contributor I
My program is:
#include <hidef.h>      /* common defines and macros */
#include <mc9s12a512.h>     /* derivative information */
#include <stdio.h>
#pragma LINK_INFO DERIVATIVE "SampleS12"
void main(void) { 
  printf("Hello World");
}
 
When I complile it shows 1 warnings:
Warning: c1420: Result of function-call is ignored main.c line 11
When I make it shows
Link Error: L1822: Symbol TERMIO_PutChar in file C:\Program Files\Metrowerks\..\HC12c\lib\ansibi.lib
is undefined
Link Error:Link failed
Thanks
0 件の賞賛
795件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
The derivative independent ansibi.lib cannot contain SCI code as
this has to be adapted the your actual speeds and SCI port number.
Therefore your have to provide you own TERMIO_Putchar and TERMIO_Init functions.
Have a look at the code in
lib\hc12c\src\termio.c
Adapt TERMIO_Init and call it before using printf.

Daniel
0 件の賞賛
794件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
Can you copy the exact error message you get?
(Ctrl-C in the message window does work)
The term "undefined" sounds more like it would not find something inside of the ansi lib than it would not find it.
Does it behave the same when you pick another lib?
Daniel