esp_flash: fix the coredump issue

During coredump, dangerous-area-checking should be disabled, and cache
disabling should be replaced by a safer version.

Dangerous-area-checking used to be in the HAL, but it seems to be more
fit to os functions. So it's moved to os functions. Interfaces are
provided to switch between os functions during coredump.
This commit is contained in:
Michael (XIAO Xufeng)
2019-09-12 02:41:00 +08:00
parent e4b44f3488
commit d3b54ec84a
10 changed files with 100 additions and 39 deletions

View File

@@ -22,6 +22,7 @@
#include "esp_heap_caps.h"
#include "hal/spi_types.h"
#include "driver/spi_common.h"
#include "esp_flash_internal.h"
__attribute__((unused)) static const char TAG[] = "spi_flash";
@@ -207,7 +208,7 @@ esp_err_t esp_flash_init_default_chip()
esp_err_t esp_flash_app_init()
{
return esp_flash_init_os_functions(&default_chip, 0);
return esp_flash_app_init_os_functions(&default_chip);
}
#endif