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: 20706
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: 20706
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: 22301
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: 22301
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: 71915
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: 71915
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: 71915
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: 20706
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
david.prentice
PostPosted: Jan 25, 2012 - 10:39 PM
10k+ Postman


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

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

###############################################################################
# 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.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
in_sane
PostPosted: Jan 26, 2012 - 12:45 AM
Newbie


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

To all, I would like to apologize to anyone I might have offended.

The results of my problem was a combination of oversites and ignorance.

I originally poked to many things trying to make it work, in the process switched to an external makefile which was not updated by subsequent fixes. Once I (finally) listened and carefully checked what was going on and used the correct paths (and internal makefile) things are now working, except for my lame code but that’s another matter.

The point of the post is to thank all those with enough patience to stay with me (david.prentice and Mbedder)and hope in the future I can listen better to aid given.

again, Thank You all
 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Jan 26, 2012 - 08:28 AM
Raving lunatic


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

Nevertheless, thank you for a good investigation. This thread from now on will make a good help to those who will undoubtedly fall into the same pit (the GUI config + makefile mismatch) in the future. Good luck!

_________________
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
icysun
PostPosted: Feb 18, 2012 - 05:58 PM
Newbie


Joined: May 23, 2010
Posts: 2


The Problem has been solved.I have faced the same error , then donwload and Install the latest AVR Toolchain 3.3.0 and AVRstudio 4.19 will work perfectly.Laughing

Direct Link to Toolchain

http://www.atmel.com/Images/avr-toolcha ... 32.x86.exe
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Feb 20, 2012 - 10:31 AM
10k+ Postman


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

Quote:

Install the latest AVR Toolchain 3.3.0 and AVRstudio 4.19 will work perfectly

But the "toolchain" has build errors which is why we're all sticking with WinAVR20100110 until Atmel learn to build a fault free one.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
Murali4b1
PostPosted: Aug 23, 2012 - 01:18 PM
Newbie


Joined: Mar 01, 2012
Posts: 16
Location: India

Clawson said:
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.

I set it was by manually but there is no report about memory usage(PROGRAM and DATA).
It was showing like this

Build started 23.8.2012 at 17:01:51
avr-gcc -mmcu=atmega8 -Wall -gdwarf-2 -DF_CPU=120000UL -O2 -fsigned-char -MD -MP -MT LCDTest.o -MF dep/LCDTest.o.d -c ../LCDTest.c
../LCDTest.c:6: warning: return type of 'main' is not 'int'
avr-gcc -mmcu=atmega8 -Wall -gdwarf-2 -DF_CPU=120000UL -O2 -fsigned-char -MD -MP -MT lcd.o -MF dep/lcd.o.d -c ../lcd.c
avr-gcc -mmcu=atmega8 LCDTest.o lcd.o -o LCDTest.elf
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature LCDTest.elf LCDTest.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex LCDTest.elf LCDTest.eep || exit 0
Build succeeded with 1 Warnings...


Any suggestions...

_________________
AVRSTUDIO4.17
WinAVR-20090313
Windows XP
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Aug 23, 2012 - 02:53 PM
10k+ Postman


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

Quote:

Any suggestions...


Look at the Makefile - it *should* be invoking avr-size. If it doesn't you can do this separately anyway. The syntax is:
Code:
avr-size -mmcu=atmega16 -C project.elf

Replace the -mmcu in this with whatever model you use and also change the name of the file. I guess for you it would be:
Code:
avr-size -mmcu=atmega8 -C LCDTest.elf

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
Murali4b1
PostPosted: Aug 27, 2012 - 02:03 PM
Newbie


Joined: Mar 01, 2012
Posts: 16
Location: India

I tried to find memory usage from make file but i did not get,
i think some hidden problem(or not compiled well).
Here i am providing my make file


###############################################################################
# Makefile for the project LCDTest
###############################################################################

## General Flags
PROJECT = LCDTest
MCU = atmega8
TARGET = LCDTest.elf
CC = avr-gcc

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 -DF_CPU=120000UL -O2 -fsigned-char
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 +=


## 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 = LCDTest.o lcd.o

## Objects explicitly added by the user
LINKONLYOBJECTS =

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

lcd.o: ../lcd.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) LCDTest.elf dep/* LCDTest.hex LCDTest.eep

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


is it compiled well or not?

_________________
AVRSTUDIO4.17
WinAVR-20090313
Windows XP
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Aug 27, 2012 - 02:24 PM
10k+ Postman


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

Well clearly there's no mention of AVR-size there so, like I say, run it separately.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Aug 27, 2012 - 02:37 PM
10k+ Postman


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

Quote:
is it compiled well or not?

The answer to that specific question lies in the output from running the makefile, not in the makefile itself.
 
 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