A problem to compile RTEMS with manually makefile scripts,maybe a linking proble
Ralf Corsepius
corsepiu at faw.uni-ulm.de
Tue Nov 5 15:14:08 UTC 2002
Am Die, 2002-11-05 um 15.42 schrieb 张 智超:
> I'm a student,I want to study RTEMS.
> I try to write a MakeFile manually to compile RTEMS.
This is far from being a clever decision..
> The compile process
> succeed,then I use i386-rtems-ar command to create static lib
> (libkernel,libbsp,libc,libstart)just like the auto generate scripts do,it
> is also OK.
> But when I build the demo(c/src/tests/samples/hello) ,gcc report:
>
> /c/src/tests/samples/hello/init.c:31: undefined reference to `printk'.
> but I can sure the printk define and implement in libbsp.a.Because the
> result of command "i386-rtems-nm -s libbsp.a" contain :
>
> printk.o:
> U BSP_output_char
> 00000271 t Letext
> 00000000 t printNum
> 000000c4 T printk
>
>
> The scripts to build the demo is:
> ${CC} -c -Wall -fasm -g ${INCLUDEFLAGS} init.c -o init.o
> ${AR} ruvs libhello.a init.o
> ${LD} -N -T linkcmds -Map map.txt -e _start -L./ --start-group -l hello
> -lc -lkernel -lbsp -lstart --end-group init.o -o hello.elf
>
> What's Wrong??
RTFM - You're on your own
Ralf
More information about the users
mailing list