]> granicus.if.org Git - esp-idf/commit
esp_flash: fix coredump for legacy spi flash API
authorMichael (XIAO Xufeng) <xiaoxufeng@espressif.com>
Tue, 10 Sep 2019 06:34:06 +0000 (14:34 +0800)
committerMichael (XIAO Xufeng) <xiaoxufeng@espressif.com>
Sat, 14 Sep 2019 08:56:31 +0000 (16:56 +0800)
commit6139864a4c9b5cd4b8c2c0d7da12886516d06316
tree958555c1c9db77158a9c005ecba5eea5c1f8990b
parentc27fd32fbeb61dba06b4a6334362155d6c6187d3
esp_flash: fix coredump for legacy spi flash API

When legacy mode is used, the coredump still fails during linking
because "esp_flash_init_default_chip", "esp_flash_app_init" and
"esp_flash_default_chip " are not compiled and linked.

Instead of using ``if`` macros in callers, these functions are protected
by ``if`` macros in the header, and also not compiled in the sources.
"esp_flash_default_chip" variable is compiled with safe default value.
components/esp32/cpu_start.c
components/espcoredump/Kconfig
components/spi_flash/CMakeLists.txt
components/spi_flash/esp_flash_api.c
components/spi_flash/esp_flash_spi_init.c
components/spi_flash/include/esp_flash.h
components/spi_flash/include/esp_flash_internal.h [new file with mode: 0644]
components/spi_flash/partition.c