Files
waveshare-esp32-s3-zero-key…/Makefile
T
2026-10-25 14:38:55 +01:00

23 lines
585 B
Makefile

.DEFAULT_GOAL := compile
ARDUINO_CLI ?= arduino-cli
ESPTOOL ?= esptool
FQBN ?= esp32:esp32:esp32s3:USBMode=default,CDCOnBoot=cdc,FlashSize=4M,PartitionScheme=default
BUILD_DIR ?= build
PORT ?= /dev/ttyACM0
BAUD ?= 460800
.PHONY: compile flash erase clean
compile:
$(ARDUINO_CLI) compile --fqbn "$(FQBN)" --output-dir "$(BUILD_DIR)" .
flash: compile
$(ESPTOOL) --chip esp32s3 --port "$(PORT)" --baud "$(BAUD)" write-flash 0x0 "$(BUILD_DIR)/keyboard.ino.merged.bin"
erase:
$(ESPTOOL) --chip esp32s3 --port "$(PORT)" --baud "$(BAUD)" erase-flash
clean:
rm -rf -- "$(BUILD_DIR)"