tweaks and bugfixes

This commit is contained in:
Simen Svale Skogsrud
2009-01-29 09:58:29 +01:00
parent ac2e26fda9
commit a9d41c6c64
9 changed files with 75 additions and 62 deletions

View File

@ -39,7 +39,7 @@ AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) -B 10
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I.
# symbolic targets:
all: main.hex
all: grbl.hex
.c.o:
$(COMPILE) -c $< -o $@
@ -55,7 +55,7 @@ all: main.hex
$(COMPILE) -S $< -o $@
flash: all
$(AVRDUDE) -U flash:w:main.hex:i
$(AVRDUDE) -U flash:w:grbl.hex:i
fuse:
$(AVRDUDE) $(FUSES)
@ -65,19 +65,19 @@ install: flash fuse
# if you use a bootloader, change the command below appropriately:
load: all
bootloadHID main.hex
bootloadHID grbl.hex
clean:
rm -f main.hex main.elf $(OBJECTS)
rm -f grbl.hex main.elf $(OBJECTS)
# file targets:
main.elf: $(OBJECTS)
$(COMPILE) -o main.elf $(OBJECTS) -lm
main.hex: main.elf
rm -f main.hex
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex *.o
grbl.hex: main.elf
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
avr-size grbl.hex *.o
# If you have an EEPROM section, you must also create a hex file for the
# EEPROM and add it to the "flash" target.