Commit b8366cf9 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

arch makefiles: consistently use $SERIAL_PORT

parent 6f39086d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
# vim:ft=make

MCU = atmega168
PORT = /dev/ttyUSB0
SERIAL_PORT ?= /dev/ttyUSB0
BAUD = 19200

cpu_freq ?= 16000000
@@ -90,17 +90,17 @@ build/system.hex: build/system.elf
	${QUIET}${OBJCOPY} -O ihex ${@:.hex=.elf} $@

program: build/system.hex
	${QUIET}avrdude -p ${MCU} -c arduino -P ${PORT} -b ${BAUD} -U flash:w:build/system.hex
	${QUIET}avrdude -p ${MCU} -c arduino -P ${SERIAL_PORT} -b ${BAUD} -U flash:w:build/system.hex

arch_clean:
	${QUIET}rm -f ${OBJECTS} build/system.hex

monitor:
	${QUIET}screen ${PORT} ${uart_baud}
	${QUIET}screen ${SERIAL_PORT} ${uart_baud}

arch_help:
	@echo "arduino-nano specific flags:"
	@echo "    PORT = ${PORT}"
	@echo " SERIAL_PORT = ${SERIAL_PORT}"
	@echo "        BAUD = ${BAUD} (only used for programming)"

arch_info:
@@ -108,6 +108,6 @@ arch_info:
	@echo "Timer Freq: ${timer_freq} Hz"
	@echo "I2C   Freq: ${i2c_freq} Hz"
	@echo "Counter Overflow: 65536/255"
	@echo "Monitor: ${PORT} ${uart_baud}"
	@echo "Monitor: ${SERIAL_PORT} ${uart_baud}"

.PHONY: arch_clean arch_help arch_info monitor program
+6 −6
Original line number Diff line number Diff line
# vim:ft=make

MCU = atmega328p
PORT = /dev/ttyUSB0
SERIAL_PORT ?= /dev/ttyUSB0
BAUD = 57600

cpu_freq ?= 16000000
@@ -90,17 +90,17 @@ build/system.hex: build/system.elf
	${QUIET}${OBJCOPY} -O ihex ${@:.hex=.elf} $@

program: build/system.hex
	${QUIET}avrdude -p ${MCU} -c arduino -P ${PORT} -b ${BAUD} -U flash:w:build/system.hex
	${QUIET}avrdude -p ${MCU} -c arduino -P ${SERIAL_PORT} -b ${BAUD} -U flash:w:build/system.hex

arch_clean:
	${QUIET}rm -f ${OBJECTS} build/system.hex

monitor:
	${QUIET}screen ${PORT} ${uart_baud}
	${QUIET}screen ${SERIAL_PORT} ${uart_baud}

arch_help:
	@echo "arduino-nano specific flags:"
	@echo "    PORT = ${PORT}"
	@echo " SERIAL_PORT = ${SERIAL_PORT}"
	@echo "        BAUD = ${BAUD} (only used for programming)"

arch_info:
@@ -108,6 +108,6 @@ arch_info:
	@echo "Timer Freq: ${timer_freq} Hz"
	@echo "I2C   Freq: ${i2c_freq} Hz"
	@echo "Counter Overflow: 65536/255"
	@echo "Monitor: ${PORT} ${uart_baud}"
	@echo "Monitor: ${SERIAL_PORT} ${uart_baud}"

.PHONY: arch_clean arch_help arch_info monitor program
+4 −4
Original line number Diff line number Diff line
# vim:ft=make

MCU = attiny88
PORT = /dev/ttyUSB0
SERIAL_PORT ?= /dev/ttyUSB0

COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=8000000UL -DMULTIPASS_ARCH_blinkenrocket
COMMON_FLAGS += -flto
@@ -51,17 +51,17 @@ arch_clean:
	rm -f ${OBJECTS} build/system.hex

monitor:
	screen ${PORT} 115200
	screen ${SERIAL_PORT} 115200

arch_help:
	@echo "blinkenrocket specific flags:"
	@echo "    PORT = ${PORT}"
	@echo "    SERIAL_PORT = ${SERIAL_PORT}"

arch_info:
	@echo "CPU   Freq: ${cpu_freq} Hz"
	@echo "Timer Freq: ${timer_freq} Hz"
	@echo "I2C   Freq: ${i2c_freq} Hz"
	@echo "Counter Overflow: ?/?"
	@echo "Monitor: ${PORT} 115200"
	@echo "Monitor: ${SERIAL_PORT} 115200"

.PHONY: arch_clean arch_help arch_info monitor program
+3 −3
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
TOOLCHAIN_BASE ?= /home/derf/var/projects/esp8266/toolchain/xtensa-lx106-elf/bin
SDK_BASE ?= /home/derf/var/projects/esp8266/toolchain/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr
ESPTOOL ?= esptool
PORT ?= /dev/ttyUSB0
SERIAL_PORT ?= /dev/ttyUSB0

CC = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-gcc
CXX = ${TOOLCHAIN_BASE}/xtensa-lx106-elf-g++
@@ -82,10 +82,10 @@ arch_help:
	@echo "    TOOLCHAIN_BASE = /home/derf/var/projects/esp8266/toolchain/xtensa-lx106-elf/bin"
	@echo "    SDK_BASE = /home/derf/var/projects/esp8266/toolchain/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr"
	@echo "    ESPTOOL = esptool"
	@echo "    PORT = /dev/ttyUSB0"
	@echo "    SERIAL_PORT = /dev/ttyUSB0"

arch_info:
	@echo "Counter Overflow: 4294967296/0"
	@echo "Monitor: /dev/ttyUSB0 115200"
	@echo "Monitor: ${SERIAL_PORT} 115200"

.PHONY: arch_clean arch_help arch_info monitor program