ESP32: esp_rom_spiflash_wait_idle undefined reference if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH not set (IDFGH-14455) #15229
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.4-300-gc8bb53292d
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
Bootloader would build with CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n.
What is the actual behavior?
esp-idf/bootloader_support/libbootloader_support.a(bootloader_flash.c.obj):(.iram1.6.literal+0x14): undefined reference to
esp_rom_spiflash_wait_idle'esp-idf/bootloader_support/libbootloader_support.a(bootloader_flash.c.obj): in function
bootloader_flash_unlock': components/bootloader_support/bootloader_flash/src/bootloader_flash.c:513:(.iram1.6+0x9): undefined reference to
esp_rom_spiflash_wait_idle'components/bootloader_support/bootloader_flash/src/bootloader_flash.c:548:(.iram1.6+0xf7): undefined reference to
esp_rom_spiflash_wait_idle' ld: esp-idf/bootloader_support/libbootloader_support.a(bootloader_flash.c.obj): in function
bootloader_execute_flash_command':components/bootloader_support/bootloader_flash/src/bootloader_flash.c:630:(.iram1.6+0x128): undefined reference to
esp_rom_spiflash_wait_idle' ld: /home/levi/esp/esp-idf/components/bootloader_support/bootloader_flash/src/bootloader_flash.c:630:(.iram1.6+0x15c): undefined reference to
esp_rom_spiflash_wait_idle'ld: esp-idf/bootloader_support/libbootloader_support.a(bootloader_flash.c.obj): components/bootloader_support/bootloader_flash/src/bootloader_flash.c:630: more undefined references to
esp_rom_spiflash_wait_idle' follow
Steps to reproduce.
Build or installation Logs.
More Information.
2 things worked:
`
...
#define SPI_IDX 1
#if !CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
#if CONFIG_IDF_TARGET_ESP32
esp_rom_spiflash_result_t esp_rom_spiflash_wait_idle(esp_rom_spiflash_chip_t *spi)
{
uint32_t status;
//wait for spi control ready
while ((REG_READ(SPI_EXT2_REG(1)) & SPI_ST)) {
}
while ((REG_READ(SPI_EXT2_REG(0)) & SPI_ST)) {
}
//wait for flash status ready
if ( ESP_ROM_SPIFLASH_RESULT_OK != esp_rom_spiflash_read_status(spi, &status)) {
return ESP_ROM_SPIFLASH_RESULT_ERR;
}
return ESP_ROM_SPIFLASH_RESULT_OK;
}
#endif
#endif
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
...
`
The text was updated successfully, but these errors were encountered: