Update build flags and add partition check

This commit is contained in:
Just Call Me Koko
2025-07-23 15:03:58 -04:00
parent 052d336c92
commit 899b854819
3 changed files with 14 additions and 1 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -19,6 +19,10 @@
#endif
#include <Update.h>
#include "esp_ota_ops.h"
#include "esp_partition.h"
#include "esp_err.h"
extern Buffer buffer_obj;
extern Settings settings_obj;
#ifdef HAS_SCREEN