Add experimental build for esp32-s31

This commit is contained in:
Oleg Kalachev
2026-08-25 22:31:46 +03:00
parent 03084a672a
commit 3f7e45fb1b
2 changed files with 26 additions and 0 deletions
+22
View File
@@ -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:
+4
View File
@@ -3,8 +3,10 @@
// Power management
#ifndef CONFIG_IDF_TARGET_ESP32S31
#include <soc/soc.h>
#include <soc/rtc_cntl_reg.h>
#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
}