From 3f7e45fb1bd79409a5718b269b497eaea1b361f5 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 25 Aug 2026 22:31:46 +0300 Subject: [PATCH] Add experimental build for esp32-s31 --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ flix/power.ino | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 743662c..056a5e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,28 @@ jobs: - name: Check c_cpp_properties.json run: tools/check_c_cpp_properties.py + build_linux_s31: + runs-on: ubuntu-latest + env: + ARDUINO_SKETCH_ALWAYS_EXPORT_BINARIES: 1 + steps: + - uses: actions/checkout@v7 + - name: Install Arduino CLI + run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh + - name: Install Arduino ESP32 core from idf-release/v6.1 + run: | + mkdir -p ~/Arduino/hardware/espressif + git clone --depth 1 --branch idf-release/v6.1 --recursive https://github.com/espressif/arduino-esp32.git ~/Arduino/hardware/espressif/esp32 + python3 ~/Arduino/hardware/espressif/esp32/tools/get.py + touch .core + - name: Build firmware for ESP32-S31 + run: make BOARD=espressif:esp32:esp32s31 + - name: Upload binaries + uses: actions/upload-artifact@v7 + with: + name: firmware-binary-s31 + path: flix/build + build_macos: runs-on: macos-latest steps: diff --git a/flix/power.ino b/flix/power.ino index 0dcc17e..906bc09 100644 --- a/flix/power.ino +++ b/flix/power.ino @@ -3,8 +3,10 @@ // Power management +#ifndef CONFIG_IDF_TARGET_ESP32S31 #include #include +#endif #include "filter.h" #include "util.h" @@ -14,7 +16,9 @@ int voltagePin = -1; float voltageScale = 2; void setupPower() { +#ifndef CONFIG_IDF_TARGET_ESP32S31 REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ENA); // disable reset on low voltage +#endif if (digitalPinToAnalogChannel(voltagePin) == -1) voltagePin = -1; // test ADC pin }