Rose-Hulman Robotics Team

root/trunk/electronics/avr/mkcommon

Revision 405, 0.6 KB (checked in by auchtemm, 3 years ago)

update the mkfiles

Line 
1default:V: $TARG.hex
2
3%.c:: %.m4
4        m4 $prereq > $target
5
6%.o:: %.c
7        $CC $CFLAGS -c $prereq
8
9$TARG.a::$OFILES
10        $AR rcs $target $prereq
11
12$TARG.elf::$TARG.a
13        $CC $CFLAGS -o $target $prereq
14
15$TARG.hex::$TARG.elf
16        $OBJCOPY -O $FORMAT $prereq $target
17
18clean:QV:
19        rm -f *.o $TARG.hex $TARG.a $TARG.elf
20
21flash:V:$TARG.hex
22        sudo $AVRDUDE $AVRDUDE_FLAGS -U flash:w:$TARG.hex
23
24# This rule sets the fuses to use:
25#       External crystal oscillator
26#       Keep eeprom between flashes
27setfuses:V:
28        sudo $AVRDUDE $AVRDUDE_FLAGS -U efuse:w:0x00:m -U hfuse:w:0xd7:m -U lfuse:w:0xc7:m
29
30%.s:: %.c
31        $CC $CFLAGS -S -c $prereq
Note: See TracBrowser for help on using the browser.