This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

app build error


Hi all,

I compiled the following code.

==================================================================
void cyg_user_start(void)
{
    cyg_hal_plf_comms_init();
        
    while(1)
    {
    	set_leds(0xff);
    	cyg_hal_plf_serial_write(&at91_ser_channels[1], (char *)menu, sizeof(menu));
    	set_leds(0x00);
    }
}
=======================================================================

But there is error message as following.

=================================================================================================
arm-elf-gcc -mcpu=arm7di                         -c -o eb40.o -g -Wall -I/cygdrive/d/ecos_work/ecos_lib/eb40_install/include -ffunction-sections -fdata-sections eb40.c
eb40.c: In function `cyg_user_start':
eb40.c:44: warning: implicit declaration of function `cyg_hal_plf_comms_init'
eb40.c:48: warning: implicit declaration of function `set_leds'
eb40.c:51: warning: implicit declaration of function `cyg_hal_plf_serial_write'
arm-elf-gcc -mcpu=arm7di                         -nostartfiles -L/cygdrive/d/ecos_work/ecos_lib/eb40_install/lib -Wl,--gc-sections -o eb40 eb40.o -Ttarget.ld -nostdlib
eb40.o: In function `cyg_user_start':
/cygdrive/d/ecos_work/eb40.c:51: undefined reference to `cyg_hal_plf_serial_write'
/cygdrive/d/ecos_work/eb40.c:51: relocation truncated to fit: R_ARM_PC24 cyg_hal_plf_serial_write
collect2: ld returned 1 exit status
make: *** [eb40] Error 1
====================================================================================================

I have two question.

1. Why those three functions declaration are implicit? Where is the headfile that define them?

2. Why is the "cyg_hal_plf_serial_write" function is claimed undefined as a fatal error while 
   the other 2 functions can pass? 


Thanks a lot!!	

Best Regards,
Lin Ming
2002-08-16



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]