Added ESP32-S2 build

This commit is contained in:
Gunnar Skjold
2022-03-24 08:38:29 +01:00
parent afe6190c46
commit a287d310ac
2 changed files with 22 additions and 2 deletions

View File

@@ -31,3 +31,18 @@ extra_scripts =
build_flags =
-D WEBSOCKET_DISABLED=1
board_build.f_cpu = 160000000L
[env:esp32s2]
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages = espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r1
board = esp32-s2-saola-1
board_build.mcu = esp32s2
board_build.variant = esp32s2
framework = arduino
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
extra_scripts =
pre:scripts/addversion.py
scripts/makeweb.py
build_flags =
-D WEBSOCKET_DISABLED=1

View File

@@ -1411,7 +1411,9 @@ void AmsWebServer::configGpioHtml() {
String html = String((const __FlashStringHelper*) GPIO_HTML);
#if defined(ESP32)
#if defined(CONFIG_IDF_TARGET_ESP32S2)
html.replace("${gpio.max}", "44");
#elif defined(ESP32)
html.replace("${gpio.max}", "39");
#else
html.replace("${gpio.max}", "16");
@@ -1479,7 +1481,10 @@ String AmsWebServer::getSerialSelectOptions(int selected) {
} else {
gpioOptions += "<option value=\"3\">UART0 (GPIO3)</option>";
}
#if defined(ESP32)
#if defined(CONFIG_IDF_TARGET_ESP32S2)
int numGpio = 31;
int gpios[] = {4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,25,32,33,34,35,36,39,40,41,42,43,44};
#elif defined(ESP32)
int numGpio = 24;
int gpios[] = {4,5,6,7,8,10,11,12,13,14,15,17,18,19,21,22,23,25,32,33,34,35,36,39};
if(selected == 9) {