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


Joined: Feb 12, 2005
Posts: 16308
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: 62299
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: 7
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...

_________________
Test...
 
 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: 62299
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: 7
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?

_________________
Test...
 
 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: 62299
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: 18555
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