Merge branch 'feature/fpga_bootloader' into 'master'
Boot ESP32 & ESP32-S2 apps on FPGA See merge request espressif/esp-idf!8270
This commit is contained in:
@@ -67,6 +67,8 @@ esp_err_t bootloader_common_check_chip_validity(const esp_image_header_t* img_hd
|
||||
ESP_LOGE(TAG, "mismatch chip ID, expected %d, found %d", chip_id, img_hdr->chip_id);
|
||||
err = ESP_FAIL;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_IDF_ENV_FPGA
|
||||
uint8_t revision = bootloader_common_get_chip_revision();
|
||||
if (revision < img_hdr->min_chip_rev) {
|
||||
/* To fix this error, please update mininum supported chip revision from configuration,
|
||||
@@ -78,6 +80,8 @@ esp_err_t bootloader_common_check_chip_validity(const esp_image_header_t* img_hd
|
||||
ESP_LOGI(TAG, "chip revision: %d, min. %s chip revision: %d", revision, type == ESP_IMAGE_BOOTLOADER ? "bootloader" : "application", img_hdr->min_chip_rev);
|
||||
#endif
|
||||
}
|
||||
#endif // CONFIG_IDF_ENV_FPGA
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ uint8_t bootloader_common_get_chip_revision(void)
|
||||
case 3:
|
||||
chip_ver = 2;
|
||||
break;
|
||||
#if CONFIG_IDF_ENV_FPGA
|
||||
case 4: /* Empty efuses, but APB_CTRL_DATE_REG bit is set */
|
||||
chip_ver = 3;
|
||||
break;
|
||||
#endif
|
||||
case 7:
|
||||
chip_ver = 3;
|
||||
break;
|
||||
|
||||
@@ -46,4 +46,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CONFIG_IDF_ENV_FPGA
|
||||
|
||||
#else // CONFIG_IDF_ENV_FPGA
|
||||
#include "esp_log.h"
|
||||
|
||||
static void s_non_functional(const char *func)
|
||||
{
|
||||
ESP_EARLY_LOGW("rand", "%s non-functional for FPGA builds", func);
|
||||
}
|
||||
|
||||
void bootloader_random_enable()
|
||||
{
|
||||
s_non_functional(__func__);
|
||||
}
|
||||
|
||||
void bootloader_random_disable()
|
||||
{
|
||||
s_non_functional(__func__);
|
||||
}
|
||||
|
||||
#endif // CONFIG_IDF_ENV_FPGA
|
||||
|
||||
#endif // BOOTLOADER_BUILD
|
||||
|
||||
Reference in New Issue
Block a user