1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-27 17:05:20 +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:
Werner Almesberger 2011-03-07 14:55:20 -03:00
parent de826dd734
commit fc324599df
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,7 @@
CFLAGS = -g -Wall -Wshadow -Werror \
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
NAME=nxuart
CHIP=atmega48
AVR_PREFIX = $(BIN_PATH) avr-
@ -10,7 +11,7 @@ OBJCOPY = $(AVR_PREFIX)objcopy
.PHONY: all upload prog
all: uart.bin
all: $(NAME).bin
%.elf: %.c
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
@ -18,8 +19,9 @@ all: uart.bin
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@
upload: uart.bin
scp uart.bin jlime:
upload: $(NAME).bin
scp $(NAME).bin jlime:
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