diff --git a/src/platform/esp32/align-text.handler_execute-4.ld b/src/platform/esp32/align-text.handler_execute-4.ld index e747edcc4..fca4f27a2 100644 --- a/src/platform/esp32/align-text.handler_execute-4.ld +++ b/src/platform/esp32/align-text.handler_execute-4.ld @@ -1,7 +1,7 @@ /* Arduino fix: catch esp_event's orphaned .text.handler_execute section and align to 4 bytes */ SECTIONS { - .text.handler_execute : + .text.handler_execute ALIGN(4) : { KEEP(*(.text.handler_execute)) KEEP(*(.text.handler_execute.*)) diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index c57cc685e..6e61032b2 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -168,7 +168,7 @@ void esp32Setup() #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t)); wdt_config->timeout_ms = APP_WATCHDOG_SECS * 1000; - wdt_config->idle_core_mask = 1 << 1; + wdt_config->idle_core_mask = (1 << CONFIG_FREERTOS_NUMBER_OF_CORES) - 1; wdt_config->trigger_panic = true; res = esp_task_wdt_init(wdt_config); assert(res == ESP_OK);