Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
MarkMatthews
PostPosted: Mar 06, 2012 - 01:18 AM
Newbie


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
 
 View user's profile Send private message  
Reply with quote Back to top
MarkMatthews
PostPosted: Mar 06, 2012 - 02:21 AM
Newbie


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
 
 View user's profile Send private message  
Reply with quote Back to top
EW
PostPosted: Mar 06, 2012 - 05:39 PM
Raving lunatic


Joined: Mar 01, 2001
Posts: 4953
Location: Rocky Mountains

Thanks for posting the solution.

_________________
Eric Weddington
Marketing Manager
Open Source & Community
Atmel
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
sycorax
PostPosted: Mar 11, 2012 - 04:45 PM
Newbie


Joined: Sep 15, 2005
Posts: 6


This is the reason .. but what's the solution now ?
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Mar 11, 2012 - 05:02 PM
10k+ Postman


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

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
tns1@cox.net
PostPosted: Mar 12, 2012 - 12:11 AM
Rookie


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.
 
 View user's profile Send private message  
Reply with quote Back to top
soundararajan
PostPosted: Mar 15, 2012 - 06:46 PM
Hangaround


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
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits