diff --git a/.github/workflows/build_parallel.yml b/.github/workflows/build_parallel.yml index 35d4ff8..042bbc4 100644 --- a/.github/workflows/build_parallel.yml +++ b/.github/workflows/build_parallel.yml @@ -230,7 +230,7 @@ jobs: with: sketch-names: esp32_marauder.ino arduino-board-fqbn: ${{ matrix.board.fbqn }} - extra-arduino-cli-args: "--warnings none --build-property compiler.cpp.extra_flags='-D${{ matrix.board.flag }}'" + extra-arduino-cli-args: "--warnings none --build-property compiler.cpp.extra_flags='-D${{ matrix.board.flag }} -DCONFIG_ESP_COREDUMP_ENABLE=0'" arduino-platform: esp32:esp32@${{ matrix.board.idf_ver }} platform-url: https://github.com/espressif/arduino-esp32/releases/download/${{ matrix.board.idf_ver }}/package_esp32_dev_index.json diff --git a/esp32_marauder/SDInterface.cpp b/esp32_marauder/SDInterface.cpp index 585459e..ea6f319 100644 --- a/esp32_marauder/SDInterface.cpp +++ b/esp32_marauder/SDInterface.cpp @@ -217,6 +217,15 @@ void SDInterface::runUpdate() { #ifdef HAS_SCREEN display_obj.tft.println(F(text_table2[3])); #endif + const esp_partition_t *running = esp_ota_get_running_partition(); + Serial.printf("Currently running: %s at 0x%X\n", running->label, running->address); + + const esp_partition_t *next = esp_ota_get_next_update_partition(NULL); + Serial.printf("Next OTA partition: %s at 0x%X\n", next->label, next->address); + + esp_err_t result = esp_ota_set_boot_partition(next); + Serial.printf("esp_ota_set_boot_partition result: %s\n", esp_err_to_name(result)); + Serial.println(F("rebooting...")); //SD.remove("/update.bin"); delay(1000); diff --git a/esp32_marauder/SDInterface.h b/esp32_marauder/SDInterface.h index 9220d9e..af07f93 100644 --- a/esp32_marauder/SDInterface.h +++ b/esp32_marauder/SDInterface.h @@ -19,6 +19,10 @@ #endif #include +#include "esp_ota_ops.h" +#include "esp_partition.h" +#include "esp_err.h" + extern Buffer buffer_obj; extern Settings settings_obj; #ifdef HAS_SCREEN