mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-24 02:35:54 +02:00
nxuart/fw/: renamed "uart" to "nxuart" as well
- uart.c: renamed to nxuart.c - Makefile: abstracted project name through $(NAME)
This commit is contained in:
parent
de826dd734
commit
fc324599df
@ -1,6 +1,7 @@
|
|||||||
CFLAGS = -g -Wall -Wshadow -Werror \
|
CFLAGS = -g -Wall -Wshadow -Werror \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
|
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
|
||||||
|
|
||||||
|
NAME=nxuart
|
||||||
CHIP=atmega48
|
CHIP=atmega48
|
||||||
|
|
||||||
AVR_PREFIX = $(BIN_PATH) avr-
|
AVR_PREFIX = $(BIN_PATH) avr-
|
||||||
@ -10,7 +11,7 @@ OBJCOPY = $(AVR_PREFIX)objcopy
|
|||||||
|
|
||||||
.PHONY: all upload prog
|
.PHONY: all upload prog
|
||||||
|
|
||||||
all: uart.bin
|
all: $(NAME).bin
|
||||||
|
|
||||||
%.elf: %.c
|
%.elf: %.c
|
||||||
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
|
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
|
||||||
@ -18,8 +19,9 @@ all: uart.bin
|
|||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(OBJCOPY) -j .text -j .data -O binary $< $@
|
$(OBJCOPY) -j .text -j .data -O binary $< $@
|
||||||
|
|
||||||
upload: uart.bin
|
upload: $(NAME).bin
|
||||||
scp uart.bin jlime:
|
scp $(NAME).bin jlime:
|
||||||
|
|
||||||
prog:
|
prog:
|
||||||
ssh jlime avrdude -p atmega48 -c nanonote_uart -e -U flash:w:uart.bin:r
|
ssh jlime avrdude -p atmega48 -c nanonote_$(NAME) \
|
||||||
|
-e -U flash:w:$(NAME).bin:r
|
||||||
|
Loading…
Reference in New Issue
Block a user