| Author |
Message |
|
|
Posted: Mar 06, 2012 - 01:18 AM |
|

Joined: Mar 06, 2012
Posts: 2
|
|
Hi All,
I've just upgraded from AVR Studio 5.0 to 5.1 and am trying to compile the below code.
int main (void) {
while(1);
}
So the code is fine but I get the following error.
Invoking: AVR/GNU C Compiler
"C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -O1 -fpack-struct -fshort-enums -g2 -Wall -c -std=gnu99 -MD -MP -MF "CProgram1.d" -MT"CProgram1.d" -mmcu=atmega328p -o"CProgram1.o" ".././CProgram1.c"
/bin/sh: C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\bin\avr-gcc.exe: command not found
make: *** [CProgram1.o] Error 127
Done executing task "RunCompilerTask" -- FAILED.
Well avr-gcc.exe definitely exists at that location and if I run the above command directly from the commandline everything works.
Seems others have had this problem but no solution http://www.mikrocontroller.net/topic/249128
Thanks,
Mark |
|
|
| |
|
|
|
|
|
Posted: Mar 06, 2012 - 02:21 AM |
|

Joined: Mar 06, 2012
Posts: 2
|
|
Problem Solved.
AVR Studio looks for the first shell it can find on your $PATH, which happened to be cygwin. Cygwin of course doesn't use the default windows drive mappings and hence couldn't find avr-gcc.exe
Regards,
Mark |
|
|
| |
|
|
|
|
|
Posted: Mar 06, 2012 - 05:39 PM |
|


Joined: Mar 01, 2001
Posts: 4953
Location: Rocky Mountains
|
|
| Thanks for posting the solution. |
_________________ Eric Weddington
Marketing Manager
Open Source & Community
Atmel
|
| |
|
|
|
|
|
Posted: Mar 11, 2012 - 04:45 PM |
|

Joined: Sep 15, 2005
Posts: 6
|
|
| This is the reason .. but what's the solution now ? |
|
|
| |
|
|
|
|
|
Posted: Mar 11, 2012 - 05:02 PM |
|


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
but what's the solution now ?
Mark already said? You rearrange PATH so the make.exe in AS5.1 is the one found first. That is:
Code:
Directory of C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1\AVRToolchain\bin
22/12/2011 12:59 175,104 make.exe
|
_________________
|
| |
|
|
|
|
|
Posted: Mar 12, 2012 - 12:11 AM |
|

Joined: Jul 28, 2007
Posts: 37
|
|
This is discussed at length here (see 2nd page):
http://www.avrfreaks.net/index.php?name ... p;t=117712
So add two new paths for the 5.1 toolchain to PATH, then move two WinAVR toolchain paths from the beginning of PATH to the end.
You can check the -v box in Device&Debugger dialog misc tab, to get verbose output. It is well hidden. Click once on the Device name in the toolbar. |
|
|
| |
|
|
|
|
|
Posted: Mar 15, 2012 - 06:46 PM |
|


Joined: Jan 03, 2011
Posts: 127
Location: East coast, India
|
|
| I guess this should not be the case. from the output window it seems that the absolute path of the toolchain executable is passed to the studio, so it should work. But what is <b> /bin/sh: </b> that is prefixed ? Can you share the make file that is auto generated ? . Should be in <Project folder>\configuration |
|
|
| |
|
|
|
|
|