Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions cores/esp32/esp32-hal-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#include "esp_partition.h"
#include "esp_log.h"
#include "esp_timer.h"
#ifdef CONFIG_APP_ROLLBACK_ENABLE
#include "esp_ota_ops.h"
#endif //CONFIG_APP_ROLLBACK_ENABLE
#ifdef CONFIG_BT_ENABLED
#include "esp_bt.h"
#endif //CONFIG_BT_ENABLED
Expand Down Expand Up @@ -145,6 +148,9 @@ void initVariant() {}
void init() __attribute__((weak));
void init() {}

bool verifyOta() __attribute__((weak));
bool verifyOta() { return true; }

#ifdef CONFIG_BT_ENABLED
//overwritten in esp32-hal-bt.c
bool btInUse() __attribute__((weak));
Expand All @@ -153,6 +159,20 @@ bool btInUse(){ return false; }

void initArduino()
{
#ifdef CONFIG_APP_ROLLBACK_ENABLE
const esp_partition_t *running = esp_ota_get_running_partition();
esp_ota_img_states_t ota_state;
if (esp_ota_get_state_partition(running, &ota_state) == ESP_OK) {
if (ota_state == ESP_OTA_IMG_PENDING_VERIFY) {
if (verifyOta()) {
esp_ota_mark_app_valid_cancel_rollback();
} else {
log_e("OTA verification failed! Start rollback to the previous version ...");
esp_ota_mark_app_invalid_rollback_and_reboot();
}
}
}
#endif
//init proper ref tick value for PLL (uncomment if REF_TICK is different than 1MHz)
//ESP_REG(APB_CTRL_PLL_TICK_CONF_REG) = APB_CLK_FREQ / REF_CLK_FREQ - 1;
#ifdef F_CPU
Expand Down
2 changes: 1 addition & 1 deletion cores/esp32/esp32-hal-psram.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bool psramInit(){
}
uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
uint32_t pkg_ver = chip_ver & 0x7;
if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4) {
if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2) {
spiramFailed = true;
log_w("PSRAM not supported!");
return false;
Expand Down
44 changes: 22 additions & 22 deletions package/package_esp32_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"packager": "esp32",
"name": "esptool_py",
"version": "2.6.0"
"version": "2.6.1"
},
{
"packager": "esp32",
Expand Down Expand Up @@ -85,42 +85,42 @@
},
{
"name": "esptool_py",
"version": "2.6.0",
"version": "2.6.1",
"systems": [
{
"host": "i686-mingw32",
"url": "https://dl.espressif.com/dl/esptool-2.6.0-windows.zip",
"archiveFileName": "esptool-2.6.0-windows.zip",
"checksum": "SHA-256:a73f4cf68db240d7f1d250c5c7f2dfcb53c17a37483729f1bf71f8f43d79a799",
"size": "3421208"
"url": "https://dl.espressif.com/dl/esptool-2.6.1-windows.zip",
"archiveFileName": "esptool-2.6.1-windows.zip",
"checksum": "SHA-256:84cf0b369a7707fe566434faba148852fc464992111d5baa95b658b374802f96",
"size": "3422445"
},
{
"host": "x86_64-apple-darwin",
"url": "https://dl.espressif.com/dl/esptool-2.6.0-macos.tar.gz",
"archiveFileName": "esptool-2.6.0-macos.tar.gz",
"checksum": "SHA-256:0a881b91547c840fab8c72ae3d031069384278b8c2e5241647e8c8292c5e4a4b",
"size": "3835660"
"url": "https://dl.espressif.com/dl/esptool-2.6.1-macos.tar.gz",
"archiveFileName": "esptool-2.6.1-macos.tar.gz",
"checksum": "SHA-256:f4eb758a301d6902cc9dfcd49d36345d2f075ad123da7cf8132d15cfb7533457",
"size": "3837085"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
"size": "43535"
"url": "https://dl.espressif.com/dl/esptool-2.6.1-linux.tar.gz",
"archiveFileName": "esptool-2.6.1-linux.tar.gz",
"checksum": "SHA-256:eaf82ff4070d9792f6a42ae1e485375de5a87bec59ef01dfb95de901519ec7fb",
"size": "44762"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
"size": "43535"
"url": "https://dl.espressif.com/dl/esptool-2.6.1-linux.tar.gz",
"archiveFileName": "esptool-2.6.1-linux.tar.gz",
"checksum": "SHA-256:eaf82ff4070d9792f6a42ae1e485375de5a87bec59ef01dfb95de901519ec7fb",
"size": "44762"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
"size": "43535"
"url": "https://dl.espressif.com/dl/esptool-2.6.1-linux.tar.gz",
"archiveFileName": "esptool-2.6.1-linux.tar.gz",
"checksum": "SHA-256:eaf82ff4070d9792f6a42ae1e485375de5a87bec59ef01dfb95de901519ec7fb",
"size": "44762"
}
]
},
Expand Down
Loading