From 6da5f113e94f4266afbbcf494a354e8714ed1f2f Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Wed, 22 Jun 2022 16:28:18 +0200 Subject: [PATCH 1/3] freertos-smp: fix nvs_rw_value and nvs_rw_value_cxx tests TBD --- examples/storage/nvs_rw_value/main/nvs_value_example_main.c | 4 ++++ .../storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/storage/nvs_rw_value/main/nvs_value_example_main.c b/examples/storage/nvs_rw_value/main/nvs_value_example_main.c index 47abd43a6e..66205cb770 100644 --- a/examples/storage/nvs_rw_value/main/nvs_value_example_main.c +++ b/examples/storage/nvs_rw_value/main/nvs_value_example_main.c @@ -18,6 +18,10 @@ void app_main(void) { +#ifdef CONFIG_FREERTOS_SMP + printf("Running with SMP FreeRTOS configured.\r\n"); +#endif + // Initialize NVS esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp b/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp index 7fa0891c26..18fe25e60a 100644 --- a/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp +++ b/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp @@ -19,6 +19,10 @@ extern "C" void app_main(void) { +#ifdef CONFIG_FREERTOS_SMP + printf("Running with SMP FreeRTOS configured.\r\n"); +#endif + // Initialize NVS esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { From 1d482a32dfa4495109bfe5e7a41661efddb3e6f0 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Wed, 29 Jun 2022 12:27:00 +0200 Subject: [PATCH 2/3] Revert "freertos-smp: fix nvs_rw_value and nvs_rw_value_cxx tests" This reverts commit 0d9b130cb6f7e4c88d526be3c86941108329f442. --- examples/storage/nvs_rw_value/main/nvs_value_example_main.c | 4 ---- .../storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/examples/storage/nvs_rw_value/main/nvs_value_example_main.c b/examples/storage/nvs_rw_value/main/nvs_value_example_main.c index 66205cb770..47abd43a6e 100644 --- a/examples/storage/nvs_rw_value/main/nvs_value_example_main.c +++ b/examples/storage/nvs_rw_value/main/nvs_value_example_main.c @@ -18,10 +18,6 @@ void app_main(void) { -#ifdef CONFIG_FREERTOS_SMP - printf("Running with SMP FreeRTOS configured.\r\n"); -#endif - // Initialize NVS esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp b/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp index 18fe25e60a..7fa0891c26 100644 --- a/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp +++ b/examples/storage/nvs_rw_value_cxx/main/nvs_value_example_main.cpp @@ -19,10 +19,6 @@ extern "C" void app_main(void) { -#ifdef CONFIG_FREERTOS_SMP - printf("Running with SMP FreeRTOS configured.\r\n"); -#endif - // Initialize NVS esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { From 3cd2b67f841f0452db1066181347bb18c2ec9fb0 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Wed, 29 Jun 2022 12:27:57 +0200 Subject: [PATCH 3/3] Revert "hal: Fix incorrect spi_hal log usage" This reverts commit a65165dd52dfdc26ed17e0c78a12c4a44a805524. --- components/spi_flash/esp_flash_api.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/spi_flash/esp_flash_api.c b/components/spi_flash/esp_flash_api.c index 7511c2e4ee..8787d20dad 100644 --- a/components/spi_flash/esp_flash_api.c +++ b/components/spi_flash/esp_flash_api.c @@ -292,21 +292,21 @@ esp_err_t IRAM_ATTR esp_flash_init_main(esp_flash_t *chip) uint32_t size; err = esp_flash_get_size(chip, &size); if (err != ESP_OK) { - ESP_EARLY_LOGE(TAG, "failed to get chip size"); + ESP_LOGE(TAG, "failed to get chip size"); return err; } if (chip->chip_drv->get_chip_caps == NULL) { // chip caps get failed, pass the flash capability check. - ESP_EARLY_LOGW(TAG, "get_chip_caps function pointer hasn't been initialized"); + ESP_LOGW(TAG, "get_chip_caps function pointer hasn't been initialized"); } else { if (((chip->chip_drv->get_chip_caps(chip) & SPI_FLASH_CHIP_CAP_32MB_SUPPORT) == 0) && (size > (16 *1024 * 1024))) { - ESP_EARLY_LOGW(TAG, "Detected flash size > 16 MB, but access beyond 16 MB is not supported for this flash model yet."); + ESP_LOGW(TAG, "Detected flash size > 16 MB, but access beyond 16 MB is not supported for this flash model yet."); size = (16 * 1024 * 1024); } } - ESP_EARLY_LOGI(TAG, "flash io: %s", io_mode_str[chip->read_mode]); + ESP_LOGI(TAG, "flash io: %s", io_mode_str[chip->read_mode]); err = rom_spiflash_api_funcs->start(chip); if (err != ESP_OK) { return err; @@ -423,7 +423,7 @@ static esp_err_t IRAM_ATTR detect_spi_flash_chip(esp_flash_t *chip) chip->chip_drv = *drivers; // start/end SPI operation each time, for multitasking // and also so esp_flash_registered_flash_drivers can live in flash - ESP_EARLY_LOGD(TAG, "trying chip: %s", chip->chip_drv->name); + ESP_LOGD(TAG, "trying chip: %s", chip->chip_drv->name); err = rom_spiflash_api_funcs->start(chip); if (err != ESP_OK) { @@ -444,7 +444,7 @@ static esp_err_t IRAM_ATTR detect_spi_flash_chip(esp_flash_t *chip) if (!esp_flash_chip_driver_initialized(chip)) { return ESP_ERR_NOT_FOUND; } - ESP_EARLY_LOGI(TAG, "detected chip: %s", chip->chip_drv->name); + ESP_LOGI(TAG, "detected chip: %s", chip->chip_drv->name); return ESP_OK; }