# Copyright (c) 2025 Rodrigo Arias Mallo # SPDX-License-Identifier: GPL-3.0-or-later PORT=/dev/ttyUSB0 FQBN=arduino:avr:atmega328bb OPTS=--no-color --log-level=info #OPTS+=-v PROJ=barista BUILD=build/$(subst :,.,$(FQBN)) HEX=$(BUILD)/$(PROJ).ino.hex # For host test programs CPPFLAGS=-I. LIBS=-lm all: $(HEX) $(HEX): barista.ino ntc.c ntc.h pinout.h arduino-cli compile $(OPTS) -e --fqbn $(FQBN) upload: $(HEX) avrdude -vv -p atmega328p -c arduino -P $(PORT) -b 9600 -D -U flash:w:$(HEX):i serial: picocom -b 115200 --lower-rts --lower-dtr /dev/ttyUSB0 --imap lfcrlf test: test_ntc test_ntc: test/test_ntc.o ntc.o gcc $^ -o $@ $(LIBS) clean: rm -f test/test_ntc.o ntc.o .PHONY: test all clean