Help on Linking problem in CodeWarrior V6.3

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Help on Linking problem in CodeWarrior V6.3

1,057 次查看
MrWrong
Contributor I
Hi all,

I just want to write a simple program to test the UART on M5211DEMO board. This is the program:

#include <stdio.h>
#include "uart.h"

int main()
{
char c;

//initialize UART
uart_init (0, 83333, 19200, 0);
while(1)
{
//check to see if a character is present
if(uart_getchar_present(0))
{
c = uart_getchar (0);
}
}

return 1;
}

When I "Make" the project, I got a link error that it cannot recognize uart_init, uart_getchar_present, and uart_getchar. I already put #include "uart.h" at the top of the file. Is there anything I can do to fix this?

Thanks
标签 (1)
标记 (1)
0 项奖励
1 回复

220 次查看
Nouchi
Senior Contributor II
Hello,

If you want to use uart functions, you must add in your project the right libraries like
C_4i_CF_MSL.a or C_4i_CF_SZ_MSL.a.
If you want to use floating point functions you have to rebuild libraries, take a look at this thread:
http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&message.id=2183&view=by_date_asc...

Emmanuel

Message Edited by BugMan on 2006-09-13 08:35 AM

0 项奖励