Re: problems with ARM-ELF toolchain under Cygwin

Dec 13, 2004 5 Replies

Hi Jens,



I am getting the same assembler error when using ARM GNU tools (Rev:



2.95.3-1).

arm-unknown-elf-gcc -c src\test.c -gdwarf-2 -mcpu=arm7tdmi -o Debug\Objects\test.o



Assembler messages: Error: Can't open for reading. : No such file or directory



Errors during build.



Can you tell me what I am doing wrong. Any info you can provide would be helpfull..



Thanks JPatel



Jens Hildebrandt wrote:



Tauno Voipio wrote:
> > "Jens Hildebrandt" wrote

in



> message news:3e2d039e$ snipped-for-privacy@news.uni-rostock.de...
> >
> >>Tauno Voipio wrote:
> >>
> >>>"Jens Hildebrandt"

wrote in



>>>message news:3e2bf2f1$ snipped-for-privacy@news.uni-rostock.de...
> >>>
> >>>
> >>>>Hello all you ARM specialists out there!
> >>>>
> >>>>May be some of you ran into the same problem I have and know a

solution


>>>
> >>>for it.
> >>>
> >>>
> >>>>I installed the ARM-ELF GNU toolchain for Cygwin from

formatting link
.


>>>>Installation on my Win2k/SP3-Cygwin1.3 system went smooth, all

the files


>>>
> >>>were
> >>>
> >>>
> >>>>copied to my c:\cygwin directory. After rebooting I tried to

translate


>
> > one
> >
> >>>of
> >>>
> >>>
> >>>>the examples (/usr/local/arm-elf/OCDemon-arm7-example/ for those

of you


>>>
> >>>who use
> >>>
> >>>
> >>>>the same tools)that came with the package. And here I'm already

stuck.


>>>
> >>>Typing in
> >>>
> >>>
> >>>>"make test" after changing into the example directory brought me

the


>
> > error
> >
> >>>message
> >>>
> >>>
> >>>>arm-elf-gcc -g -c -o crt0.o crt0.S
> >>>>Assembler messages:
> >>>> for reading.open
> >>>>: No such file or directory
> >>>>make: *** [crt0.o] Error 1
> >>>
> >>>
> >>>Do you have crt0.S in the directory you're building?
> >>>
> >>>Maybe you're missing the runtime library.
> >>>
> >>>
> >>>Tauno Voipio
> >>>tauno voipio @ iki fi
> >>>
> >>>
> >>
> >>The source file is in the directory where I'm trying to build and

search


>
> > paths
> >
> >>and runtime library seem to be ok. I called the compiler with the
> >>-print-search-dirs and -print-libgcc-file-name options and the

directories


>
> > and
> >
> >>file names I got for reply all do exist.
> >>When I call the gcc with the -S option to generate assembler code

only and


>
> > run
> >
> >>the assembler on the generated file afterwards no problems occur.
> >>It seems as if the assembler called from inside gcc has trouble

finding


>
> > the
> >
> >>intermediate file generated by the preprocessor. Any ideas where

that may


>
> > come from?
> >
> >>Jens
> >>
> >
> >
> > Is the GCC generated with --with-gnu-as ?
> >
> > Tauno Voipio
> > tauno voipio @ iki fi
> >
> >
> This is a prebuild package for cygwin that comes together with the

examples and


is installed into the Cygwin dierectory with an InstallShield

installation


routine. So, I don't know with what options the arm-gcc was build.
> Meanwhile I used a tool to trace the file accesses during the gcc

run. The error


comes when the program tries to open a file or directory named path>/unknown/ . Looks like there is an Environment

variable or


similar missing and when the program builds a path using that

variable the


following file access of course goes wrong. Unfortunately I have no

clue what


variable that might be. Is there a list anywhere of what environment

variables


gcc needs ?
>
> Thanks,
> Jens

Try this:

arm-unknown-elf-gcc -c -gdwarf-2 -mcpu=arm7tdmi -o Debug/Objects/test.o src/test.c

(all on a single line).

If that fails, copy the source into current directory and try again (with no directory for source file).

It seems that your build environment is confused where the intermediate assembler source (test.s) will be stored.

Tauno Voipio tauno voipio (at) iki fi

I am still getting the same error. Path setting looks ok. It used to work, but since I install the cygwin 1.5.12-1, some thing got messed up. Could not figure out what it is..

-Jwal> JPatel wrote:

(Rev:

would

intermediate

Thank you Tauno Voipio

Finally I am able to figure out.. It was a pathing issue.

set COMPILER_HOME=c:\tools\gnu\arm\2.95.3-1 set GCC_EXEC_PREFIX=%COMPILER_HOME%\lib\gcc-lib set PATH=%COMPILER_HOME%\lib\gcc-lib\arm-unknown-elf\2.95.3;%COMPILER_HOME%\arm-unknown-elf\Bin;%COMPILER_HOME%\Bin;%COMPILER_HOME%\arm-unknown-elf\Lib;%PATH%

Now I am able to compile and build the files without the "Assembly Message: Error: Can't open for reading. : No such file or directory Errors during build."

- JPatel

Thank you Tauno Voipio.

I finially got it working..It was pathing issue..

set INSTALLDIR=C:\mgc\embedded set COMPILER_HOME=%INSTALLDIR%\tools\gnu\arm\2.95.3-1 set GCC_EXEC_PREFIX=%COMPILER_HOME%\lib\gcc-lib set PATH=%COMPILER_HOME%\lib\gcc-lib\arm-unknown-elf\2.95.3;%COMPILER_HOME%\arm-unknown-elf\Bin;%COMPILER_HOME%\Bin;%COMPILER_HOME%\arm-unknown-elf\Lib;%PATH%

-JPatel

Tauno Voipio wrote:

(Rev:

would

intermediate

PATH=%COMPILER_HOME%\lib\gcc-lib\arm-unknown-elf\2.95.3;%COMPILER_HOME%\arm-unknown-elf\Bin;%COMPILER_HOME%\Bin;%COMPILER_HOME%\arm-unknown-elf\Lib;%PATH%

Thanks.

Positive feedback keeps the response engine running.

Season's greetings.

Tauno Voipio tauno voipio (at) iki fi

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required