bootloader_support: refactor to better support multi target

This commit is contained in:
morris
2019-12-12 19:03:25 +08:00
committed by bot
parent ba7c67ece8
commit 888316fc64
10 changed files with 822 additions and 509 deletions

View File

@@ -16,6 +16,12 @@
#include "esp_flash_partitions.h"
#include "esp_image_format.h"
#include "esp_app_format.h"
// RESET_REASON is declared in rom/rtc.h
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S2BETA
#include "esp32s2beta/rom/rtc.h"
#endif
#ifdef __cplusplus
extern "C" {
@@ -161,6 +167,14 @@ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t
*/
uint8_t bootloader_common_get_chip_revision(void);
/**
* @brief Query reset reason
*
* @param cpu_no CPU number
* @return reset reason enumeration
*/
RESET_REASON bootloader_common_get_reset_reason(int cpu_no);
/**
* @brief Check if the image (bootloader and application) has valid chip ID and revision
*