ioc: avr: Add make rfu command to AVR Makefiles
This commit is contained in:
parent
0da970d40f
commit
7269db9e0a
@ -3,7 +3,7 @@ PDEV=/dev/ttyUSB1
|
||||
CFLAGS=-g -Wall -mcall-prologues -mmcu=$(MCU) -Os -DF_CPU=8000000
|
||||
LDFLAGS=-Wl,-gc-sections -Wl,-relax
|
||||
CC=avr-gcc
|
||||
TARGET=main
|
||||
TARGET=fw_keyboard
|
||||
OBJECT_FILES=main.o
|
||||
|
||||
all: $(TARGET).hex
|
||||
@ -17,6 +17,10 @@ clean:
|
||||
%.obj: $(OBJECT_FILES)
|
||||
$(CC) $(CFLAGS) $(OBJECT_FILES) $(LDFLAGS) -o $@
|
||||
|
||||
rfu: $(TARGET).hex
|
||||
scp $< markus@opi:/home/markus/projects/lw35/deploy/
|
||||
ssh root@opi 'lw35-tool set-mode rfu-kbd; avrdude -p atmega8 -P /dev/lw35 -c arduino -b 19200 -U flash:w:/home/markus/projects/lw35/deploy/$<'
|
||||
|
||||
program: $(TARGET).hex
|
||||
avrdude -p $(MCU) -P $(PDEV) -c arduino -b 19200 -U flash:w:$(TARGET).hex
|
||||
|
||||
|
@ -3,7 +3,7 @@ PDEV=/dev/ttyUSB0
|
||||
CFLAGS=-g -Wall -mcall-prologues -mmcu=$(MCU) -O2 -DF_CPU=16000000
|
||||
LDFLAGS=-Wl,-gc-sections -Wl,-relax
|
||||
CC=avr-gcc
|
||||
TARGET=main
|
||||
TARGET=fw_printer
|
||||
OBJECT_FILES=main.o
|
||||
|
||||
all: $(TARGET).hex
|
||||
@ -18,6 +18,10 @@ clean:
|
||||
$(CC) $(CFLAGS) $(OBJECT_FILES) $(LDFLAGS) -o $@
|
||||
avr-size -C --mcu=atmega8 main.obj
|
||||
|
||||
rfu: $(TARGET).hex
|
||||
scp $< markus@opi:/home/markus/projects/lw35/deploy/
|
||||
ssh root@opi 'lw35-tool set-mode rfu-pri; avrdude -p atmega8 -P /dev/lw35 -c arduino -b 19200 -U flash:w:/home/markus/projects/lw35/deploy/$<'
|
||||
|
||||
program: $(TARGET).obj
|
||||
avrdude -p $(MCU) -P $(PDEV) -c arduino -b 19200 -U flash:w:$(TARGET).hex
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user