From 6c55ab362560b5dc5db5c2224e7dc3ddb96f21de Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 11 Aug 2026 05:15:40 +0300 Subject: [PATCH] Refactor building Switch to plain esp32 fqbn - it works on d1 as well. Move debug level setting from fqbn to arduino-cli command to simplify things. Add C3 and S3 builds to commit artifacts. --- .github/workflows/build.yml | 14 +++++++------- Makefile | 4 ++-- docs/usage.md | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53b8a00..303e73c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,23 +10,23 @@ on: jobs: build_linux: runs-on: ubuntu-latest + env: + ARDUINO_SKETCH_ALWAYS_EXPORT_BINARIES: 1 steps: - uses: actions/checkout@v4 - name: Install Arduino CLI run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh - - name: Build firmware - env: - ARDUINO_SKETCH_ALWAYS_EXPORT_BINARIES: 1 + - name: Build firmware for ESP32 run: make + - name: Build firmware for ESP32-C3 + run: make BOARD=esp32:esp32:esp32c3 + - name: Build firmware for ESP32-S3 + run: make BOARD=esp32:esp32:esp32s3:CDCOnBoot=cdc - name: Upload binaries uses: actions/upload-artifact@v4 with: name: firmware-binary path: flix/build - - name: Build firmware for ESP32-C3 - run: make BOARD=esp32:esp32:esp32c3 - - name: Build firmware for ESP32-S3 - run: make BOARD=esp32:esp32:esp32s3 - name: Check c_cpp_properties.json run: tools/check_c_cpp_properties.py diff --git a/Makefile b/Makefile index b2b38b4..105d2f1 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -BOARD = esp32:esp32:d1_mini32:DebugLevel=error +BOARD = esp32:esp32:esp32 PORT := $(strip $(wildcard /dev/serial/by-id/usb-Silicon_Labs_CP21* /dev/serial/by-id/usb-1a86_USB_Single_Serial_* /dev/cu.usbserial-* /dev/cu.usbmodem*)) export ARDUINO_NETWORK_CONNECTION_TIMEOUT := 1h build: .core .libs - arduino-cli compile --fqbn $(BOARD) flix + arduino-cli compile --fqbn $(BOARD) --build-property "build.core_debug_level=1" flix upload: build arduino-cli upload --fqbn $(BOARD) -p "$(PORT)" flix diff --git a/docs/usage.md b/docs/usage.md index 7186fe8..5e7a0a8 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -61,7 +61,7 @@ You can build and upload the firmware using either **Arduino IDE** (easier for b For ESP32-S3/ESP32-C3 boards, set the appropriate [FQBN](https://docs.arduino.cc/arduino-cli/FAQ/#whats-the-fqbn-string) using `BOARD` parameter: ```bash - make BOARD=esp32:esp32:esp32s3:DebugLevel=error,FlashSize=4M,CDCOnBoot=cdc upload + make BOARD=esp32:esp32:esp32s3:FlashSize=4M,CDCOnBoot=cdc upload ``` See other available Make commands in [Makefile](../Makefile).