--- In lpc2000@yahoogroups.com, Tom Walsh <tom@...> wrote:
>
> Robert Adsett wrote:
>
> >At 11:17 PM 4/5/2006 +0000, ocnek1 wrote:
> >
> >
> >>Let me first say I'm pretty new at GNUARM so please be somewhat
kind...
> >>
> >>
> >
> >We'll try :)
> >
> >
> >
> >>Now to my problem. I was tring to use Robert Adsett's ibutton test
> >>port with my WinARM installation. Everything seems to go fine then I
> >>get this Linking error. I have no clue how to fix this, so if someone
> >>could point it out or point me in the right direction it would be
great.
> >>
> >>I did not make a ibutton library I just included the .c files in my
> >>make file. I would like to compile the ibutton port into a librar
> >>file but that is another problem :)
> >>
> >>
> >>Thanks,
> >>Oc.
> >>
> >>Linking: test1.elf
> >>arm-elf-gcc -mcpu=arm7tdmi -I. -g -DROM_RUN -O0 -funsigned-char
> >>-funsigned-bitfields -fpack-struct -fshort-enums -Wall
> >>-Wstrict-prototypes -Wa,-adhlns=test1.o -std=gnu99 -MD -MP -MF
> >>.dep/test1.elf.d test1.o
> >>C:\WinARM\arm-elf\include\arch\philips\ibutton\common\ownet.o
> >>C:\WinARM\arm-elf\include\arch\philips\ibutton\common\lpcses.o
> >>
> >>
> >
> ><snip>
> >
> >
> >
> >>C:\WinARM\arm-elf\include\arch\philips\ibutton\common\mbee.o
> >>C:\WinARM\arm-elf\include\arch\philips\ibutton\common\pw77.o
> >>build/crt0.o --output test1.elf -nostartfiles
> >>-Wl,-Map=test1.map,--cref -lm -lc -lnewlib-lpc -lm
-Tbuild/LPC210x_ROM.ld
>
>>c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib\libc.a(makebuf.o):
> >>In function `__smakebuf':makebuf.c:(.text+0x110): undefined reference
> >>to `isatty'
> >>collect2: ld returned 1 exit status
> >>make.exe: *** [test1.elf] Error 1
> >>
> >>
> >
> >Apparently ld can't find isatty. I suspect either a link order
problem or
> >possibly a lack of room.
> >
> >
> >
> BTDT. No, it is an extern reference from newlib, but it needs to be
> stubbed out:
>
> ============ begin isatty.c ==============
> #include <unistd.h>
>
> int isatty (int fd)
> {
> return 0;
> }
> ============= snip ==================
>
> Just add that function in your sources (or a seperate file in your
project).
>
>
> TomW
>
> --
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>
TomW,
Thank you! That worked. It now compiles with no errors!! Is this an
error with newlib? If you can explain why this happend that would be
great. I would like to understand why this problem happend so I will
be prepared the next time it shows up.
Thanks again,
Oc.
P.S. Here is the size output in case anybody wanted to know:
Size after:
test1.elf :
section size addr
startup 32 0
prog 96200 32
.data 2380 1073741824
.bss 976 1073744204
.debug_abbrev 9727 0
.debug_info 57540 0
.debug_line 15507 0
.debug_frame 9936 0
.debug_loc 60936 0
.debug_pubnames 11934 0
.debug_aranges 968 0
.debug_str 13472 0
.comment 1998 0
.debug_ranges 744 0
Total 282350Message
Re: Linking Error....iButton Test program Robert Adsett's Port
2006-04-06 by ocnek1
Attachments
- No local attachments were found for this message.