This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

RE: Compilation issues for ARM when using arm-elf-gcc on Windows( cygwin )


Hi,


> -----Original Message-----
> From: Sukesh.Acharya@siritech.com [mailto:Sukesh.Acharya@siritech.com]
> Sent: Monday, May 27, 2002 11:30 AM
> To: crossgcc@sources.redhat.com
> Subject: Compilation issues for ARM when using arm-elf-gcc on Windows(
> cygwin )
> Importance: High
> 
> 
> Hi,
> 
> I am using the cygwin tools and I want to compile C programs 
> on Windows.
> I have followed the instructions given on the redhat site(eCOS) for
> configuring toolchain.

If you are going to run application with  eCos, you have to link your application with target.ld built while building eCos. Refer to examples provided along with eCos. It has its own startup file and C library. For stdio.h, you have to provide include path to include directory in XXX_install where XXX is the configuration name given while saving configuration in configtool.

Dhananjay
 
> I have configured binutils, gcc and gdb toolchain using cygwin for ARM
> I am not able to compile and link C programs( even hello.c) using
> arm-elf-gcc for ARM using cygwin prompt.
> 
> Do I need to install any other package or configure eCOS 
> properly?? Do I
> need to install newlib or glibc ??
> 
> Here are the erros that I am getting when I try to compile and link a
> sample hello.c for ARM using arm-elf-gcc
> 
> Do help me with this!!
> If I need to configure eCOS please do send me the exact steps 
> and also If I
> am missing something do let me know!!
> 
> Here is the error and source for the sample hello program..
> 
> --------------------------------------------------------------
> --------------------------------------------------------------
> ------------------------------------------
> Source: (hello.c)
> /* this is a simple hello world program */
> #include <stdio.h>
> 
> int main(void)
> {
>   printf("Hello, eCos world!\n");
>   return 0;
> }
> --------------------------------------------------------------
> --------------------------------------------------------------
> ------------------------------------------
> $ arm-elf-gcc hello.c
> hello.c:2:19: stdio.h: No such file or directory
> 
> --------------------------------------------------------------
> --------------------------------------------------------------
> ------------------------------------------
> If I comment the stdio,h I get the following linker error!!
> 
> --------------------------------------------------------------
> --------------------------------------------------------------
> ------------------------------------------
> $ arm-elf-gcc hello.c
> /tools/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0.4/../../../../
> arm-elf/bin/ld:
> 
> cannot op
> en crt0.o: No such file or directory
> collect2: ld returned 1 exit status
> 
> --------------------------------------------------------------
> --------------------------------------------------------------
> ------------------------------------------
> 
> Do reply ASAP
> 
> 
> -Thanks,
> Sukesh
> 
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, 
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to 
> crossgcc-unsubscribe@sources.redhat.com
> 
> 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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