Skip to content

Commit

Permalink
bugfix: esp32s3: allows QIO flash mode
Browse files Browse the repository at this point in the history
Allows QIO flash mode on esp32s3

Fixes #73677

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
  • Loading branch information
wmrsouza committed Sep 27, 2024
1 parent 1082a69 commit f4d2503
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ esp_err_t bootloader_common_check_chip_validity(const esp_image_header_t* img_hd
esp_err_t err = ESP_OK;
esp_chip_id_t chip_id = CONFIG_IDF_FIRMWARE_CHIP_ID;
if (chip_id != img_hdr->chip_id) {
ESP_LOGE(TAG, "mismatch chip ID, expected %d, found %d", chip_id, img_hdr->chip_id);
ESP_EARLY_LOGE(TAG, "mismatch chip ID, expected %d, found %d", chip_id, img_hdr->chip_id);
err = ESP_FAIL;
} else {
#ifndef CONFIG_IDF_ENV_FPGA
Expand Down
4 changes: 4 additions & 0 deletions components/bootloader_support/src/bootloader_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ void bootloader_clear_bss_section(void)
memset(&_bss_start, 0, ((unsigned*)&_bss_end - (unsigned*)&_bss_start) * sizeof(&_bss_start));
}

#include "hexdump.h"
esp_err_t bootloader_read_bootloader_header(void)
{
/* load bootloader image header */
if (bootloader_flash_read(ESP_BOOTLOADER_OFFSET, &bootloader_image_hdr, sizeof(esp_image_header_t), true) != ESP_OK) {
ESP_EARLY_LOGE(TAG, "failed to load bootloader image header!");
return ESP_FAIL;
}

hexdump("bootloader_image_hdr", &bootloader_image_hdr, sizeof(esp_image_header_t));

return ESP_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion zephyr/esp32s3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if(CONFIG_SOC_SERIES_ESP32S3)
../../components/spi_flash/spi_flash_hpm_enable.c
../../components/spi_flash/spi_flash_os_func_noos.c
../../components/spi_flash/spi_flash_os_func_app.c
# todo: ../../components/spi_flash/spi_flash_wrap.c
../../components/spi_flash/spi_flash_wrap.c
)
endif()

Expand Down

0 comments on commit f4d2503

Please sign in to comment.