Compare commits

...

11 Commits

Author SHA1 Message Date
vidplace7 54aa53aba4 trunk fmt 2026-06-07 14:23:39 -04:00
vidplace7 68f1c88cbf Set board_level to extra (for now)
CI builds will fail until additional esp32h2 plumbing is set up.
2026-06-07 14:19:11 -04:00
vidplace7 73af50a0f6 ESP32H2 doesn't support UDP_MULTICAST 2026-06-07 14:16:08 -04:00
vidplace7 a853053a72 Inherit from esp32_common 2026-06-07 14:08:52 -04:00
vidplace7 fea10ccecd Cleanup for pioarduino 2026-06-06 22:13:43 -04:00
copilot-swe-agent[bot] ca46ebe6bd Merge develop into esp32-h2 2026-06-07 01:55:28 +00:00
Jonathan Bennett 0f0e704f29 Merge branch 'develop' into esp32-h2 2025-12-10 11:11:57 -06:00
Jonathan Bennett 23aaee737a Merge branch 'develop' into esp32-h2 2025-12-09 20:57:47 -06:00
Jonathan Bennett 42c46cad41 Merge branch 'develop' into esp32-h2 2025-12-08 16:52:00 -06:00
Jonathan Bennett f0b72a4b4b Move the esp32-h2 .ini 2025-12-08 16:49:01 -06:00
Jonathan Bennett 24ca4602b1 roughed in support for esp32-h2 via Waveshare dev board 2025-12-06 12:42:05 -06:00
7 changed files with 61 additions and 7 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ extern AmbientLightingThread *ambientLightingThread;
#endif
#endif
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6)
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6) && \
!defined(CONFIG_IDF_TARGET_ESP32H2)
#include <NonBlockingRtttl.h>
#else
// Noop class for portduino.
+3 -4
View File
@@ -173,7 +173,7 @@ int32_t SerialModule::runOnce()
// Give it a chance to flush out 💩
delay(10);
}
#if defined(CONFIG_IDF_TARGET_ESP32C6)
#if defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
if (moduleConfig.serial.rxd && moduleConfig.serial.txd) {
Serial1.setRxBufferSize(RX_BUFFER);
Serial1.begin(baud, SERIAL_8N1, moduleConfig.serial.rxd, moduleConfig.serial.txd);
@@ -277,7 +277,7 @@ int32_t SerialModule::runOnce()
}
#endif
else {
#if defined(CONFIG_IDF_TARGET_ESP32C6)
#if defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
while (Serial1.available()) {
serialPayloadSize = Serial1.readBytes(serialBytes, meshtastic_Constants_DATA_PAYLOAD_LEN);
#else
@@ -540,8 +540,7 @@ ParsedLine parseLine(const char *line)
*/
void SerialModule::processWXSerial()
{
#if SERIAL_PRINT_PORT != 0 && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6)
#if SERIAL_PRINT_PORT != 0 && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2)
static unsigned int lastAveraged = 0;
static unsigned int averageIntervalMillis = 300000; // 5 minutes hard coded.
static double dir_sum_sin = 0;
+7 -2
View File
@@ -165,6 +165,8 @@ void esp32Setup()
// #define APP_WATCHDOG_SECS 45
#define APP_WATCHDOG_SECS 90
// esp_task_wdt_init returns an unknown error, so skip it on ESP32H2
#ifndef CONFIG_IDF_TARGET_ESP32H2
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
const esp_task_wdt_config_t wdt_config = {
.timeout_ms = APP_WATCHDOG_SECS * 1000,
@@ -190,7 +192,7 @@ void esp32Setup()
res = esp_task_wdt_add(NULL);
}
assert(res == ESP_OK);
#endif
#if HAS_32768HZ
enableSlowCLK();
#endif
@@ -199,7 +201,9 @@ void esp32Setup()
/// loop code specific to ESP32 targets
void esp32Loop()
{
#ifndef CONFIG_IDF_TARGET_ESP32H2
esp_task_wdt_reset(); // service our app level watchdog
#endif
// for debug printing
// radio.radioIf.canSleep();
@@ -232,9 +236,10 @@ void cpuDeepSleep(uint32_t msecToWake)
13,
#endif
34, 35, 37};
#ifndef CONFIG_IDF_TARGET_ESP32H2
for (int i = 0; i < sizeof(rtcGpios); i++)
rtc_gpio_isolate((gpio_num_t)rtcGpios[i]);
#endif
#endif
// FIXME, disable internal rtc pullups/pulldowns on the non isolated pins. for inputs that we aren't using
+2
View File
@@ -555,6 +555,8 @@ void enableModemSleep()
esp32_config.max_freq_mhz = CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32C6
esp32_config.max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32H2
esp32_config.max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32C3
esp32_config.max_freq_mhz = CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32P4
+26
View File
@@ -0,0 +1,26 @@
[esp32h2_base]
extends = esp32_common
custom_esp32_kind = esp32h2
build_flags =
${esp32_common.build_flags}
-DHAS_WIFI=0
-DMESHTASTIC_EXCLUDE_WIFI=1 ; TODO
-DMESHTASTIC_EXCLUDE_MQTT=1
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
build_unflags=
-DHAS_UDP_MULTICAST=1
build_src_filter =
${esp32_common.build_src_filter} -<mesh/http>
monitor_speed = 460800
monitor_filters = esp32_h2_exception_decoder
lib_ignore =
${esp32_common.lib_ignore}
libpax
esp32_idf5_https_server
esp_http_server
@@ -0,0 +1,12 @@
[env:waveshare-esp32h2]
extends = esp32h2_base
board = esp32-h2-devkitm-1
board_build.f_flash = 16000000L
; Set this back to 'pr' once the CI plumbing is in place.
; board_level = pr
board_level = extra
build_flags =
${esp32h2_base.build_flags}
-I variants/esp32h2/waveshare-esp32-h2
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
@@ -0,0 +1,9 @@
#define HAS_SCREEN 0
#define SERIAL_PRINT_PORT 1
#define LORA_SCK 4
#define LORA_MISO 3
#define LORA_MOSI 2
#define LORA_CS 1