Project

General

Profile

Revision beea48aa

IDbeea48aaab7b027978a3703b75fe90f29e6ddc2f
Parent 07aef5d2
Child 21bf5ee1

Added by Thomas Mullins about 12 years ago

Tested forklift code and fixed some things (a few weeks ago)

View differences:

forklift/code/Makefile
1
SRC = forklift.c analog.c twi.c motor.c
2
HDR = analog.h twi.h motor.h
3

  
1 4
forklift: forklift.hex
2 5
	@
3 6

  
4 7
%.hex: %.elf
5 8
	avr-objcopy -j .text -j .data -O ihex $< $@
6 9

  
7
forklift.elf: forklift.c analog.c analog.h twi.c twi.h
8
	avr-gcc -mmcu=atmega168 -DF_CPU=8000000L forklift.c analog.c twi.c -o forklift.elf -Os
10
forklift.elf: $(SRC) $(HDR)
11
	avr-gcc -mmcu=atmega168 -DF_CPU=8000000L $(SRC) -o forklift.elf -Os
9 12

  
10 13
download: forklift.hex
11
	avrdude -c avrispmkII -p m328p forklift.hex
14
	avrdude -c avrispmkII -p m128 -P usb -B 1 -U flash:w:forklift.hex
12 15

  
13 16
clean:
14 17
	rm -f forklift.elf forklift.hex

Also available in: Unified diff