aboutsummaryrefslogtreecommitdiff
path: root/robot/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'robot/makefile')
-rw-r--r--robot/makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/robot/makefile b/robot/makefile
index d01ad30..8ddcb28 100644
--- a/robot/makefile
+++ b/robot/makefile
@@ -8,7 +8,7 @@ AVRDUDE_DEVICE ?= m168
CFLAGS=-g -Wall -mcall-prologues -mmcu=$(MCU) $(DEVICE_SPECIFIC_CFLAGS) -Os
LDFLAGS=-Wl,-gc-sections -lpololu_$(DEVICE) -Wl,-relax
-PORT ?= /dev/ttyACM1
+PORT ?= /dev/ttyACM0
SOURCES := $(wildcard *.c)
HEADERS := $(wildcard *.h)
@@ -18,6 +18,9 @@ AVRDUDE=avrdude
CC=avr-gcc
OBJ2HEX=avr-objcopy
+BUILD_STR=$(shell git update-index -q --refresh; git describe --tags --dirty='*' --broken='x' | cut -c1-20)
+CFLAGS += -DBUILD_STR="$(BUILD_STR)"
+
all: out.hex
clean:
@@ -31,6 +34,7 @@ a.out: $(OBJECTS)
out.hex: a.out
$(OBJ2HEX) -R .eeprom -O ihex $< $@
+ $(info build $(BUILD_STR) complete)
flash: out.hex
$(AVRDUDE) -p $(AVRDUDE_DEVICE) -c avrisp2 -P $(PORT) -U flash:w:out.hex