Add chip revision into image header

Check chip id and chip revision before boot app image

Closes https://github.com/espressif/esp-idf/issues/4000
This commit is contained in:
suda-morris
2019-09-16 11:47:23 +08:00
parent a70c3367e8
commit dd248ffc32
11 changed files with 77 additions and 15 deletions

View File

@@ -401,15 +401,6 @@ void start_cpu0_default(void)
assert(flash_ret == ESP_OK);
#endif
uint8_t revision = esp_efuse_get_chip_ver();
ESP_LOGI(TAG, "Chip Revision: %d", revision);
if (revision > CONFIG_ESP32_REV_MIN) {
ESP_LOGW(TAG, "Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.");
} else if(revision != CONFIG_ESP32_REV_MIN) {
ESP_LOGE(TAG, "ESP-IDF can't support this chip revision. Modify minimum supported revision in menuconfig");
abort();
}
#ifdef CONFIG_PM_ENABLE
esp_pm_impl_init();
#ifdef CONFIG_PM_DFS_INIT_AUTO