diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index be80ecc4e7..ff86d327bc 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -216,7 +216,7 @@ else() INCLUDE_DIRS ${includes} PRIV_REQUIRES efuse esp_timer REQUIRES esp_pm esp_ringbuf freertos soc hal esp_hw_support - LDFRAGMENTS linker.lf gptimer/linker.lf) + LDFRAGMENTS linker.lf gptimer/linker.lf gpio/linker.lf) endif() # If system needs to monitor USJ connection status, then usb_serial_jtag_connection_monitor object file has to be linked diff --git a/components/driver/gpio/linker.lf b/components/driver/gpio/linker.lf new file mode 100644 index 0000000000..4ca65040df --- /dev/null +++ b/components/driver/gpio/linker.lf @@ -0,0 +1,12 @@ +[mapping:gpio_driver] +archive: libdriver.a +entries: + if GPIO_CTRL_FUNC_IN_IRAM = y: + gpio: gpio_set_level (noflash) + gpio: gpio_intr_disable (noflash) + +[mapping:gpio_hal] +archive: libhal.a +entries: + if GPIO_CTRL_FUNC_IN_IRAM = y: + gpio_hal: gpio_hal_intr_disable (noflash) diff --git a/components/driver/linker.lf b/components/driver/linker.lf index 578f167970..70d94adbd3 100644 --- a/components/driver/linker.lf +++ b/components/driver/linker.lf @@ -1,21 +1,11 @@ [mapping:driver] archive: libdriver.a entries: - if GPTIMER_CTRL_FUNC_IN_IRAM = y: - gptimer: gptimer_set_raw_count (noflash) - gptimer: gptimer_get_raw_count (noflash) - gptimer: gptimer_get_captured_count (noflash) - gptimer: gptimer_set_alarm_action (noflash) - gptimer: gptimer_start (noflash) - gptimer: gptimer_stop (noflash) if PCNT_CTRL_FUNC_IN_IRAM = y: pulse_cnt: pcnt_unit_start (noflash) pulse_cnt: pcnt_unit_stop (noflash) pulse_cnt: pcnt_unit_clear_count (noflash) pulse_cnt: pcnt_unit_get_count (noflash) - if GPIO_CTRL_FUNC_IN_IRAM = y: - gpio: gpio_set_level (noflash) - gpio: gpio_intr_disable (noflash) if SDM_CTRL_FUNC_IN_IRAM = y: sdm: sdm_channel_set_pulse_density (noflash) if ANA_CMPR_CTRL_FUNC_IN_IRAM = y: diff --git a/components/hal/linker.lf b/components/hal/linker.lf index 2603dd8884..8474d30d3a 100644 --- a/components/hal/linker.lf +++ b/components/hal/linker.lf @@ -30,8 +30,6 @@ entries: twai_hal_iram (noflash) if IDF_TARGET_ESP32 = n: spi_flash_hal_gpspi (noflash) - if GPIO_CTRL_FUNC_IN_IRAM = y: - gpio_hal: gpio_hal_intr_disable (noflash) if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y: adc_oneshot_hal (noflash) if COMPILER_OPTIMIZATION_DEBUG = y: