diff --git a/components/driver/Kconfig b/components/driver/Kconfig index 9d132f9c00..f25bc53978 100644 --- a/components/driver/Kconfig +++ b/components/driver/Kconfig @@ -86,6 +86,7 @@ menu "Driver configurations" endmenu # SPI Configuration menu "TWAI configuration" + depends on SOC_TWAI_SUPPORTED config TWAI_ISR_IN_IRAM bool "Place TWAI ISR function into IRAM" diff --git a/components/hal/linker.lf b/components/hal/linker.lf index ad1f7e3034..2f6b35bd8b 100644 --- a/components/hal/linker.lf +++ b/components/hal/linker.lf @@ -14,11 +14,8 @@ entries: cpu_hal (noflash) soc_hal (noflash) wdt_hal_iram (noflash) - if IDF_TARGET_ESP32C3 = n && IDF_TARGET_ESP32H2 = n && IDF_TARGET_ESP32C2 = n: - if TWAI_ISR_IN_IRAM = y: - twai_hal_iram (noflash) - else: - twai_hal_iram (default) + if TWAI_ISR_IN_IRAM = y: + twai_hal_iram (noflash) if IDF_TARGET_ESP32 = n: spi_flash_hal_gpspi (noflash) systimer_hal (noflash)