mirror of
https://github.com/okalachev/flix.git
synced 2026-09-06 00:10:58 +00:00
Add experimental build for esp32-s31
This commit is contained in:
@@ -38,6 +38,28 @@ jobs:
|
|||||||
- name: Check c_cpp_properties.json
|
- name: Check c_cpp_properties.json
|
||||||
run: tools/check_c_cpp_properties.py
|
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:
|
build_macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
|
|
||||||
// Power management
|
// Power management
|
||||||
|
|
||||||
|
#ifndef CONFIG_IDF_TARGET_ESP32S31
|
||||||
#include <soc/soc.h>
|
#include <soc/soc.h>
|
||||||
#include <soc/rtc_cntl_reg.h>
|
#include <soc/rtc_cntl_reg.h>
|
||||||
|
#endif
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
@@ -14,7 +16,9 @@ int voltagePin = -1;
|
|||||||
float voltageScale = 2;
|
float voltageScale = 2;
|
||||||
|
|
||||||
void setupPower() {
|
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
|
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
|
if (digitalPinToAnalogChannel(voltagePin) == -1) voltagePin = -1; // test ADC pin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user