fresh install of avr 4.18 and winavr 20100010 problems

30 posts / 0 new
Last post
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

[=brown][=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
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Just re-installed studio 4.19,

Quote:

The OP has 4.18.

We sure?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you attach your Config > Custom Options dialog screenshot as shown above?

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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,

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.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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:

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?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

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...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

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...
###############################################################################
# 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/*)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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 :lol:

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it not possible for you to simply follow Mbedder's picture?

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

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

CPP = avr-g++

You can see that the $(CC) has an empty string.
Tick the boxes properly and it will get your WinAvr paths.

David.

Pages