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
in_sane
PostPosted: Jan 25, 2012 - 07:11 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

I just installed the above on my machine and I get the following errors:

Build started 25.1.2012 at 10:49:28
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT rs232.o -MF dep/rs232.o.d -c rs232.c
/usr/bin/sh: -Wall: command not found
make: [rs232.o] Error 127 (ignored)

This same project on another machine with 4.19 and winavr 2010 reports an error like "mmcu=atmega168 unknown command"

It seems like make is not processing the command strings correctly. Has this problem shown up to anyone else?
I tried the config fix about manually putting in the paths to avrgcc and make but it makes no difference. The 4.18 version seems to find gcc and make fine, the 4.19 version does not show them but does generate a make file. Manually putting in the paths on that machine don't seem to make a difference.

First time trying to use avrtools 4 so please be patient Used Make for years on unix systems though.
All help will be appreciated.
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Jan 25, 2012 - 07:20 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 20707
Location: Wormshill, England

Your command should say
Code:
-mmcu=atmega168

i.e. have a hyphen

I suspect you are using an external Makefile, and the Makefile is corrupted.

AS4.18 should be very reliable.

AS4.19 introduces special features like forcing you to use a broken Toolchain.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
MBedder
PostPosted: Jan 25, 2012 - 07:22 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

...
 
 View user's profile Send private message  
Reply with quote Back to top
in_sane
PostPosted: Jan 25, 2012 - 07:32 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

Make file has the following entries:

## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)

## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

don't see anything wrong there and I have removed the makefile and let it be regenerated with same results. Would I be better off going back to an earlier version of winavr? 4.19/2010 combo misses the "-" on the mmcu statement and the 4.18/2010 version barfs at "-Wall". Is winavr 2010 a tested version? Is it Make or AVR studio parsing the commands? I would think it's make but mind could be going, it has been a while since I've coded much.
Thanks for your assistance
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Jan 25, 2012 - 07:39 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 20707
Location: Wormshill, England

Something is wrong. I would remove and re-install both packages.

If you still have a problem, do a Clean, then Build.

Copy-paste the complete text from the Build window and post it here preferably within CODE tags.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
in_sane
PostPosted: Jan 25, 2012 - 07:47 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

Thats why I tried another machine from the orginal 4.19/2010 installation. Problem changed but fundementally was still there. First environment is XP pro second environment is Vista. Don't know if thats relevent or not.

Code tags???

Either way I'll repost after cleaning all versions of XP machine and retrying. Thanks for help so far
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jan 25, 2012 - 08:05 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 22312
Location: Lund, Sweden

We have had several threads on this before. The thing all these (three or four?) threads have in common is that the avr-gcc command as such is missing in the compile command line (and also in the link command line IIRC).

I am too lazy to search those other threads out, but a careful selection of search terms (a part of the error message, hint, hint...) should bring them up. At least one the last month or so.

Since the "be nice at AVRfreaks" campaign is on, I won't say: Whatever happened to peoples ability to search the Web (and specifically 'freaks) when perhaps 95 percent of all questions already have their answers out there. Oh darn, now I did it any way.. Very Happy Well, might as well be a nice guy and do the search for you
[5 minutes of searching commences ]

Here:
http://www.avrfreaks.net/index.php?name ... ll+command
http://www.avrfreaks.net/index.php?name ... ll+command
http://www.avrfreaks.net/index.php?name ... ll+command
http://www.avrfreaks.net/index.php?name ... ll+command

You go read, but IIRC the net sum is that AVR Studio 4.19 is FUBAR in this respect.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
MBedder
PostPosted: Jan 25, 2012 - 08:13 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

/usr/bin/sh: -Wall: command not found mean that the executable (avr-gcc.exe) is not found, so that's why I posted a picture above - have you seen it?

_________________
Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jan 25, 2012 - 08:17 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 22312
Location: Lund, Sweden

Quote:

/usr/bin/sh: -Wall: command not found mean that the executable (avr-gcc.exe) is not found

Not sure if we agree or not here, MBedder.

As I understand it the "avr-gcc" is actually missing in the generated command line (i.e. Studio generates a command line that is "F'd U"). The generated command line actually starts
Code:
-Wall ...

and sure enough, there is no such command to be found.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
MBedder
PostPosted: Jan 25, 2012 - 08:23 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

AVR Studio takes an executable name/path as configured in aforementioned dialog, so the empty dialog field produces empty executable name. Adding the path manually (pressing "Browse..." and pointing to .exe) should fix the "problem".

_________________
Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jan 25, 2012 - 09:18 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 71936
Location: (using avr-gcc in) Finchingfield, Essex, England

Why are we re-hashing this for the Nth time. It's a fault (or deliberate ploy by Atmel) in 4.19

It won't find WinAVR automatically any more.

So set it manually.

End of.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
in_sane
PostPosted: Jan 25, 2012 - 09:22 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

Ok,
Just re-installed studio 4.19, winavr 2010, pointed config option to 2010 GCC and 2010 Make and did a clean and rebuild.

Same results. "-Wall" not found.
Entries in Makefile look normal.

Are 4.19 and winavr 2010 not compatible any longer? This new install did go past the "mmcu" snag this combo was snaging on before but now matches the 4.18/2010 combo I was using on my other machine. If there is more of a tutorial on this please point me to it as the links passed on before did not address more than what I have done so far(as far as I can see)
Thanks for your patiences

Code:

[color=brown][size=9]Build started 25.1.2012 at 13:05:39
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT rs232.o -MF dep/rs232.o.d  -c  rs232.c
/usr/bin/sh: -Wall: command not found
make: [rs232.o] Error 127 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Command.o -MF dep/Command.o.d    -c -o Command.o Command.c
/usr/bin/sh: -Wall: command not found
make: [Command.o] Error 127 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Main.o -MF dep/Main.o.d  -c  Main.c
/usr/bin/sh: -Wall: command not found
make: [Main.o] Error 127 (ignored)
mmcu=atmega168 -Wl,-Map=mtrcntrl.map rs232.o Command.o Main.o     -o mtrcntrl.elf
/usr/bin/sh: -Wl,-Map=mtrcntrl.map: command not found
make: [mtrcntrl.elf] Error 127 (ignored)
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature  mtrcntrl.elf mtrcntrl.hex
avr-objcopy: 'mtrcntrl.elf': No such file
make: *** [mtrcntrl.hex] Error 1
Build failed with 1 errors and 0 warnings...[/size
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jan 25, 2012 - 09:24 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 71936
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

Just re-installed studio 4.19,

Quote:

The OP has 4.18.

We sure?

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Jan 25, 2012 - 09:26 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Can you attach your Config > Custom Options dialog screenshot as shown above?
 
 View user's profile Send private message  
Reply with quote Back to top
in_sane
PostPosted: Jan 25, 2012 - 09:43 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

Opps, noted I was linked to gcc.exe not avr-gcc.exe, fixed that, cleaned, rebuilt now I'm back to :

'mmcu' is not recognised as an internal or external command,

Code:

Make file section
## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)

## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

sorry if i'm being a dung head.
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jan 25, 2012 - 09:46 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 71936
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

'mmcu' is not recognised as an internal or external command,

Ctrl-C then Ctrl-V the complete build output.

Also if you drop to a Command prompt and say "which avr-gcc.exe" what does it say? On my machine it is:
Code:
C:\[i386_vc]>which avr-gcc.exe
E:\WinAVR-20100110\bin\avr-gcc.exe

It would be VERY curious if you have a copy of avr-gcc.exe that doesn't know the -mmcu= option. Of course you DO have avr32-gcc.exe which most certainly does NOT know about it but you couldn't have inadvertently typed a "32" in there could you?

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
in_sane
PostPosted: Jan 25, 2012 - 09:58 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

Ok when I do a command window it comes back C:\WINAVR~1\bin\avr-gcc.exe

as far as the complete build output its as follows
Code:

Build started 25.1.2012 at 13:36:21
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT rs232.o -MF dep/rs232.o.d  -c  rs232.c
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [rs232.o] Error 1 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Command.o -MF dep/Command.o.d    -c -o Command.o Command.c
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [Command.o] Error 1 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Main.o -MF dep/Main.o.d  -c  Main.c
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [Main.o] Error 1 (ignored)
mmcu=atmega168 -Wl,-Map=mtrcntrl.map rs232.o Command.o Main.o     -o mtrcntrl.elf
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [mtrcntrl.elf] Error 1 (ignored)
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature  mtrcntrl.elf mtrcntrl.hex
avr-objcopy: 'mtrcntrl.elf': No such file
make: *** [mtrcntrl.hex] Error 1
Build failed with 1 errors and 0 warnings...

 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Jan 25, 2012 - 10:04 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 20707
Location: Wormshill, England

Follow Mbedder's advice and configure your tool paths correctly. He has given you a picture to match exactly.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
in_sane
PostPosted: Jan 25, 2012 - 10:24 PM
Newbie


Joined: Dec 30, 2008
Posts: 8
Location: San Diego,CA

to all

avr-gcc: C:\WinAVR-20100110\bin\avr-gcc.exe
make:C:\WinAVR-20100110\utils\bin\make.exe

if you can see something wrong with these entries I would appreciate it for a heads up. If not the only thing I can conclude is studio 4.19 and winavr 2010 no longer work together and I am screwed.

Code:
Build started 25.1.2012 at 14:19:33
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT rs232.o -MF dep/rs232.o.d  -c  rs232.c
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [rs232.o] Error 1 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Command.o -MF dep/Command.o.d    -c -o Command.o Command.c
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [Command.o] Error 1 (ignored)
mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Main.o -MF dep/Main.o.d  -c  Main.c
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [Main.o] Error 1 (ignored)
mmcu=atmega168 -Wl,-Map=mtrcntrl.map rs232.o Command.o Main.o     -o mtrcntrl.elf
'mmcu' is not recognized as an internal or external command,
operable program or batch file.
make: [mtrcntrl.elf] Error 1 (ignored)
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature  mtrcntrl.elf mtrcntrl.hex
avr-objcopy: 'mtrcntrl.elf': No such file
make: *** [mtrcntrl.hex] Error 1
Build failed with 1 errors and 0 warnings...

Code:

###############################################################################
# Makefile for the project mtrcntrl
###############################################################################

## General Flags
PROJECT = mtrcntrl
MCU = atmega168
TARGET = mtrcntrl.elf
CC =

CPP = avr-g++

## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)

## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -std=gnu99 -DF_CPU=14745600UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

## Assembly specific flags
ASMFLAGS = $(COMMON)
ASMFLAGS += $(CFLAGS)
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2

## Linker flags
LDFLAGS = $(COMMON)
LDFLAGS +=  -Wl,-Map=mtrcntrl.map


## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature

HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings


## Objects that must be built in order to link
OBJECTS = rs232.o Command.o Main.o

## Objects explicitly added by the user
LINKONLYOBJECTS =

## Build
all: $(TARGET) mtrcntrl.hex mtrcntrl.eep mtrcntrl.lss## Compile
rs232.o: ./rs232.c
   $(CC) $(INCLUDES) $(CFLAGS) -c  $<

Main.o: ./Main.c
   $(CC) $(INCLUDES) $(CFLAGS) -c  $<

##Link
$(TARGET): $(OBJECTS)
    $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)

%.hex: $(TARGET)
   avr-objcopy -O ihex $(HEX_FLASH_FLAGS)  $< $@

%.eep: $(TARGET)
   -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0

%.lss: $(TARGET)
   avr-objdump -h -S $< > $@

## Clean target
.PHONY: clean
clean:
   -rm -rf $(OBJECTS) mtrcntrl.elf dep/* mtrcntrl.hex mtrcntrl.eep mtrcntrl.lss mtrcntrl.map


## Other dependencies
-include $(shell mkdir dep 2>NUL) $(wildcard dep/*)

 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Jan 25, 2012 - 10:33 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

clawson wrote:
Quote:

Just re-installed studio 4.19,

Quote:

The OP has 4.18.

We sure?
I was, reading the thread title. Now I doubt Laughing
 
 View user's profile Send private message  
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