EmbDev.net

Forum: ARM programming with GCC/GNU tools pn won't compile but cygwin will


Author: eric (Guest)
Posted on:

Rate this post
0 useful
not useful
I am running WinXP and have installed WinARM using the guide at
http://winarm.scienceprog.com/winarm-tools/quick-s...

But I still can't get the sample programs to compile using pn. I added
";c:\WinARM\bin;c:\WinARM\utils\bin;" (without quotes) to the PATH
environment variable and it still doesn't compile (I tried re-booting to
ensure PATH was set). The error I get from pn is:

> "make.exe" all

-------- begin --------
process_begin: CreateProcess((null), arm-elf-gcc --version, ...) failed.
make (e=2): The system cannot find the file specified.

make.exe: *** [gccversion] Error 2

> Process Exit Code: 2
> Time Taken: 00:01

I tried compiling the program from the Cygwin command line and it works
fine (output on the bottom). I tried from Dos and I get the same output
as pn above. Any ideas? It seems to be a path problem but
";c:\WinARM\bin;c:\WinARM\utils\bin;" is in there.


Thanks,

--eric


here's the output from Cygwin:
$ make

-------- begin --------
arm-elf-gcc.exe (GCC) 4.1.1 (WinARM)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


Assembling (ARM-only): build/crt0.S
arm-elf-gcc -c -mcpu=arm7tdmi  -I. -x assembler-with-cpp -DROM_RUN
-Wa,-adhlns=b
uild/crt0.lst,-gdwarf-2 build/crt0.S -o build/crt0.o

Compiling C: ledswitch.c
arm-elf-gcc -c  -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN  -Os -Wall
-Wcast-align
-Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls
-Wreturn-type
 -Wshadow -Wunused -Wa,-adhlns=ledswitch.lst   -MD -MP -MF
.dep/ledswitch.o.d -W
strict-prototypes -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs
-std=gnu99 ledswitch.c -o ledswitch.o

Linking: ledswitch.elf
arm-elf-gcc  -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN  -Os -Wall
-Wcast-align -Wc
ast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls
-Wreturn-type -W
shadow -Wunused -Wa,-adhlns=build/crt0.lst   -MD -MP -MF
.dep/ledswitch.elf.d bu
ild/crt0.o    ledswitch.o     --output ledswitch.elf -nostartfiles
-Wl,-Map=leds
witch.map,--cref -lc  -lm -lc -lgcc -Tbuild/LPC2106-ROM.ld

Creating load file for Flash: ledswitch.hex
arm-elf-objcopy -O ihex ledswitch.elf ledswitch.hex

Creating Extended Listing: ledswitch.lss
arm-elf-objdump -h -S -C ledswitch.elf > ledswitch.lss

Creating Symbol Table: ledswitch.sym
arm-elf-nm -n ledswitch.elf > ledswitch.sym

Size after:
ledswitch.elf  :
section           size         addr
.text              476            0
.stack            1024   1073741824
.comment            27            0
.debug_aranges      64            0
.debug_pubnames     27            0
.debug_info        249            0
.debug_abbrev      145            0
.debug_line        210            0
.debug_frame        64            0
.debug_str          92            0
.debug_loc          62            0
.debug_ranges       24            0
Total             2464



Errors: none
-------- end --------

Author: Michael Fischer (mifi)
Posted on:

Rate this post
0 useful
not useful
Hello Eric,

> process_begin: CreateProcess((null), arm-elf-gcc --version, ...) failed.
> make (e=2): The system cannot find the file specified.

Can you start in the dos box the following command:

arm-elf-gcc --version

The make could not find the arm-elf-gcc.

Regards,

Michael

Author: eric (Guest)
Posted on:

Rate this post
0 useful
not useful
Michael Fischer wrote:
> Hello Eric,
>
>> process_begin: CreateProcess((null), arm-elf-gcc --version, ...) failed.
>> make (e=2): The system cannot find the file specified.
>
> Can you start in the dos box the following command:
>
> arm-elf-gcc --version
>
> The make could not find the arm-elf-gcc.
>
> Regards,
>
> Michael


Sorry, I forgot to include the fact that the path seems setup correctly
when using Dos:

C:\>arm-elf-gcc --version
arm-elf-gcc (GCC) 4.1.1 (WinARM)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


Which is the same from Cygwin:
$ arm-elf-gcc --version
arm-elf-gcc.exe (GCC) 4.1.1 (WinARM)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Is there something wrong with my PN setup?


Thanks,

--eric

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
Can you please try to do a make all from the "Windows-Shell" (not the
cygwin-shell/bash) just to check it's a setup-problem with the system or
PN.

c:\>cd \path\to\project

c:\path\to\project> make all

Are there any entries for cygwin or mingw in the search-Path?

Martin Thomas

Author: eric (Guest)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> Can you please try to do a make all from the "Windows-Shell" (not the
> cygwin-shell/bash) just to check it's a setup-problem with the system or
> PN.
>
> c:\>cd \path\to\project
>
> c:\path\to\project> make all
>
> Are there any entries for cygwin or mingw in the search-Path?
>
> Martin Thomas

C:\WinARM\examples\lpc2106_blink_switch>make all

-------- begin --------
process_begin: CreateProcess((null), arm-elf-gcc --version, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [gccversion] Error 2


The call from Dos fails the same way that PN does. Just checked the Path
(both system and user) and neither of them have cygwin or mingw in them.


--eric

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
eric wrote:
> Martin Thomas wrote:
>> Can you please try to do a make all from the "Windows-Shell" (not the
>> cygwin-shell/bash) just to check it's a setup-problem with the system or
>> PN.
>>
>> c:\>cd \path\to\project
>>
>> c:\path\to\project> make all
>>
>> Are there any entries for cygwin or mingw in the search-Path?
>>
>> Martin Thomas
>
> C:\WinARM\examples\lpc2106_blink_switch>make all
>
> -------- begin --------
> process_begin: CreateProcess((null), arm-elf-gcc --version, ...) failed.
> make (e=2): The system cannot find the file specified.
> make: *** [gccversion] Error 2
>
>
> The call from Dos fails the same way that PN does. Just checked the Path
> (both system and user) and neither of them have cygwin or mingw in them.
>
>
> --eric

I can not reproduce this problem here.

Please try the alternate utility collection from
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm...
WinARM_utils_testing_20060719.zip

Author: eric (Guest)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> I can not reproduce this problem here.
>
> Please try the alternate utility collection from
> http://www.siwawi.arubi.uni-kl.de/avr_projects/arm...
> WinARM_utils_testing_20060719.zip


This has been driving me nuts but I found the problem. The problem is
close to what Martin had suggested at one point (cygwin being in my
path). Turns out that my Libero program (fpga design software) had
make.exe, sh.exe and a bunch of other similar utils; Libero put those
utils in my path.

I found this because calling "sh.exe" from the winarm's directory (in
dos) had a different prompt if I called sh.exe from any other directory.

Thanks for your help Martin.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.