hmc472/firmware/Makefile
Ryan Malloy a425b4c324 Add OLED display support, standardize Serial0 for UART output
- Add SSD1306 128x64 OLED display with attenuation bar, dB readout,
  step counter, sweep indicator, and WiFi RSSI
- Switch all debug output to Serial0 (UART0 via CH343) for consistent
  serial comms when USB CDC is not used
- Remove unused USB.h includes from all source files
- Add development notes to CLAUDE.md (no stty, serial config docs)
2026-02-08 14:10:44 -07:00

46 lines
994 B
Makefile

.PHONY: build buildfs upload uploadfs monitor clean ota flash erase
# Serial port — override with: make upload PORT=/dev/ttyACM1
PORT ?= /dev/ttyACM0
BAUD ?= 921600
BUILD_DIR = .pio/build/esp32-s3-devkitc-1
# ESP32-S3 bootloader lives at 0x0
BOOTLOADER_OFFSET = 0x0
# LittleFS partition offset (from partition table)
FS_OFFSET = 0x290000
ESPTOOL = ~/.platformio/penv/bin/esptool
build:
pio run
buildfs:
pio run -t buildfs
upload: build
$(ESPTOOL) --chip esp32s3 --port $(PORT) --baud $(BAUD) \
write_flash \
$(BOOTLOADER_OFFSET) $(BUILD_DIR)/bootloader.bin \
0x8000 $(BUILD_DIR)/partitions.bin \
0x10000 $(BUILD_DIR)/firmware.bin
uploadfs: buildfs
$(ESPTOOL) --chip esp32s3 --port $(PORT) --baud $(BAUD) \
write_flash $(FS_OFFSET) $(BUILD_DIR)/littlefs.bin
flash: upload uploadfs
monitor:
pio device monitor --port $(PORT)
erase:
$(ESPTOOL) --chip esp32s3 --port $(PORT) erase_flash
clean:
pio run -t clean
ota:
pio run -t upload --upload-port attenuator.local