1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-08-23 11:47:08 +03:00
ben-blinkenlights/nxuart/fw/Makefile
Werner Almesberger fc324599df nxuart/fw/: renamed "uart" to "nxuart" as well
- uart.c: renamed to nxuart.c
- Makefile: abstracted project name through $(NAME)
2011-03-07 14:55:20 -03:00

28 lines
531 B
Makefile

CFLAGS = -g -Wall -Wshadow -Werror \
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
NAME=nxuart
CHIP=atmega48
AVR_PREFIX = $(BIN_PATH) avr-
CC = $(AVR_PREFIX)gcc
OBJCOPY = $(AVR_PREFIX)objcopy
#OBJDUMP = $(AVR_PREFIX)objdump
.PHONY: all upload prog
all: $(NAME).bin
%.elf: %.c
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@
upload: $(NAME).bin
scp $(NAME).bin jlime:
prog:
ssh jlime avrdude -p atmega48 -c nanonote_$(NAME) \
-e -U flash:w:$(NAME).bin:r