Difference between revisions of "U23 2007/Evil Solutions/Makefile"

From C4 Wiki
Jump to: navigation, search
(New page: <pre> SERIALPORT=/dev/ttyUSB0 NAME=nightrider CC=avr-gcc CFLAGS=-Wall -mmcu=atmega644 OBJCPY=avr-objcopy OFLAGS=-O ihex BOOTL=launch-bootloader BFLAGS=$(SERIALPORT) 115200 AVRDUDE=a...)
 
m (Kategorie)
 
Line 37: Line 37:
 
rm -f *.hex *.elf
 
rm -f *.hex *.elf
 
</pre>
 
</pre>
 +
 +
[[Category:U23 2007]]

Latest revision as of 15:56, 7 June 2007

SERIALPORT=/dev/ttyUSB0
NAME=nightrider

CC=avr-gcc
CFLAGS=-Wall -mmcu=atmega644

OBJCPY=avr-objcopy
OFLAGS=-O ihex 

BOOTL=launch-bootloader 
BFLAGS=$(SERIALPORT) 115200 

AVRDUDE=avrdude 
AFLAGS=-p m644 -b 115200 -c avr109 -P $(SERIALPORT) -F -u -U flash:w:

all: object hex 

install: bootloader flash runit

object: 
	$(CC)  $(CFLAGS) -o $(NAME).elf $(NAME).c 

hex: 
	$(OBJCPY) $(OFLAGS) $(NAME).elf $(NAME).hex

bootloader: 
	$(BOOTL) $(BFLAGS) 

flash: 
	$(AVRDUDE) $(AFLAGS)$(NAME).hex

runit: 
	echo X > $(SERIALPORT)

clean: 
	rm -f *.hex *.elf