From 310a0a145a807706e68200be6cf28f18f6886fd0 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 15 Jun 2024 15:32:37 +0200 Subject: add arduino code for simulated sensor --- arduino/makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 arduino/makefile (limited to 'arduino/makefile') diff --git a/arduino/makefile b/arduino/makefile new file mode 100644 index 0000000..e712b62 --- /dev/null +++ b/arduino/makefile @@ -0,0 +1,31 @@ +BUILD_DIR ?= build +TARGET = $(BUILD_DIR)/main.elf + +CMFLAGS += --fresh +CMFLAGS += --log-level WARNING +CMFLAGS += -Wno-deprecated + +export SERIAL_PORT ?= /dev/ttyACM0 +.PHONY: FORCE + +all: FORCE $(TARGET) + +flash: upload-main; +upload-main: $(TARGET) + +$(BUILD_DIR)/build.ninja: CMakeLists.txt + @mkdir -p $(BUILD_DIR) + @cmake -B $(BUILD_DIR) -G Ninja $(CMFLAGS) + +$(TARGET): $(BUILD_DIR)/build.ninja FORCE + @ninja -C $(BUILD_DIR) + +clean: FORCE + $(RM) -r $(BUILD_DIR) + +# Forward any unknown targets to Ninja +ifneq ($(MAKECMDGOALS),) +%:: + @ninja -C $(BUILD_DIR) $@ +endif + -- cgit v1.2.3