fix(ram_app): Fixed issue ram_app can't use the SPI Flash
1st bootloader won't help to initialize the MSPI & cache properly as it usually do when loading from flash. And the ram app doesn't have valid headers. Since there is no enough space in 2nd bootloader, we replace the `bootloader_init_spi_flash` in the ram_app (!pure_ram_app), with an customized alternative of it for the ram_app. This alternative helps to initialize the MSPI & cache properly, without the help of 1st bootloader or image headers.
This commit is contained in:
@@ -58,6 +58,7 @@ void bootloader_flash_clock_config(const esp_image_header_t* pfhdr);
|
||||
*/
|
||||
void bootloader_flash_gpio_config(const esp_image_header_t* pfhdr);
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
/**
|
||||
* @brief Configure SPI flash read dummy based on different mode and frequency.
|
||||
*
|
||||
@@ -66,6 +67,10 @@ void bootloader_flash_gpio_config(const esp_image_header_t* pfhdr);
|
||||
* @return None
|
||||
*/
|
||||
void bootloader_flash_dummy_config(const esp_image_header_t* pfhdr);
|
||||
#else
|
||||
// The meaning has changed on this chip. Deprecated, Call `bootloader_configure_spi_pins()` and `bootloader_flash_set_dummy_out()` directly.
|
||||
void bootloader_flash_dummy_config(const esp_image_header_t* pfhdr) __attribute__((deprecated));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
/**
|
||||
|
||||
+9
@@ -18,6 +18,15 @@ extern "C" {
|
||||
*/
|
||||
esp_err_t bootloader_init_spi_flash(void);
|
||||
|
||||
#if CONFIG_APP_BUILD_TYPE_RAM && !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
|
||||
/**
|
||||
* @brief Config all flash related stuff according to the header. The consistency of all flash configs is ensured.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void bootloader_flash_hardware_init(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user