| Author |
Message |
|
|
Posted: Jan 25, 2012 - 10:39 PM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Jan 26, 2012 - 12:45 AM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Jan 26, 2012 - 08:28 AM |
|

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.
|
| |
|
|
|
|
|
Posted: Feb 18, 2012 - 05:58 PM |
|

Joined: May 23, 2010
Posts: 2
|
|
|
|
|
|
|
Posted: Feb 20, 2012 - 10:31 AM |
|


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. |
_________________
|
| |
|
|
|
|
|
Posted: Aug 23, 2012 - 01:18 PM |
|

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...
|
| |
|
|
|
|
|
Posted: Aug 23, 2012 - 02:53 PM |
|


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
|
_________________
|
| |
|
|
|
|
|
Posted: Aug 27, 2012 - 02:03 PM |
|

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...
|
| |
|
|
|
|
|
Posted: Aug 27, 2012 - 02:24 PM |
|


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. |
_________________
|
| |
|
|
|
|
|
Posted: Aug 27, 2012 - 02:37 PM |
|


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