Move project to repo root and add Makefile

The Makefile wraps the build, USB and WiFi flashing, the serial monitor
and font generation, with toolchain paths that can be overridden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-05 12:45:11 +13:00
1 parent 3b4154d8bf
commit 9f84330b91
17 files changed
+53 -9

No files matched your search

File renamed without changes.
+44
View File
@@ -0,0 +1,44 @@
# Build and flash the firmware. Override any of these on the command line,
# e.g. make ota BOARD=192.168.1.50
IDF_PATH ?= $(HOME)/esp/esp-idf
TOOLCHAIN ?= $(HOME)/.arduino15/packages/esp32/tools/esp-x32/2507/bin
PYENV ?= $(HOME)/.espressif/python_env/idf5.4_py3.12_env
PORT ?= /dev/ttyACM0
BOARD ?= 10.1.1.167
# IDF_MAINTAINER skips IDF's tool version check, as the toolchain above is
# the Arduino core's rather than the one IDF installs
export IDF_PATH
export IDF_MAINTAINER := 1
export PATH := $(TOOLCHAIN):$(PYENV)/bin:$(PATH)
PYTHON := $(PYENV)/bin/python
BIN := build/vga_test.bin
.PHONY: all build flash ota monitor font clean
all: build
build/build.ninja:
cmake -S . -B build -G Ninja -DPYTHON=$(PYTHON) -DPYTHON_DEPS_CHECKED=1 -DIDF_TARGET=esp32s3
build: build/build.ninja
ninja -C build
# Over USB
flash: build
cd build && $(PYTHON) -m esptool --chip esp32s3 -p $(PORT) -b 460800 --before default_reset --after hard_reset write_flash @flash_args
# Over WiFi
ota: build
curl -X POST --data-binary @$(BIN) http://$(BOARD)/api/ota
monitor:
$(PYTHON) $(IDF_PATH)/tools/idf_monitor.py -p $(PORT) build/vga_test.elf
# Needs Pillow and the DejaVu fonts
font:
python3 tools/gen_font.py main/font_data.h
clean:
rm -rf build
+9 -9
View File
@@ -29,12 +29,16 @@ Ground goes to VGA pin 5 and pins 6–8, and VGA pin 9
## Build and flash
You need ESP-IDF 5.4 or later.
You need ESP-IDF 5.4 or later. The paths at the top of the `Makefile` point
at the toolchain to use; override them if yours are elsewhere.
```
cd vga_test
idf.py set-target esp32s3
idf.py build flash
make # build
make flash # flash over USB (PORT=/dev/ttyACM0)
make ota # flash over WiFi (BOARD=<board-ip>)
make monitor # serial console
make font # regenerate main/font_data.h
make clean
```
The serial console is on the USB-Serial-JTAG port, because GPIO 43/44 carry
@@ -46,8 +50,4 @@ The board starts its own access point, `ESP32-VGA` (password `esp32vga`).
You can also give it your home WiFi details in Settings. Open its IP address
in a browser.
To update the firmware over WiFi, use the page's Settings section, or run:
```
curl -X POST --data-binary @build/vga_test.bin http://<board-ip>/api/ota
```
To update the firmware over WiFi, use the page's Settings section or `make ota`.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
Internal Server Error - Technical Kiwi Git Server
500 Internal Server Error

An error occurred:

An error occurred

Gitea Version: 28.2.0