From d2fb10008ef26b7f9e07b6dc07e3743f4536e680 Mon Sep 17 00:00:00 2001 From: Armando Date: Thu, 13 Jul 2023 18:31:34 +0800 Subject: [PATCH] fix(adc): fix adc continuous hal func not in iram when gdma isr iram --- components/esp_adc/linker.lf | 20 ++++++++++++++++++++ components/hal/linker.lf | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/components/esp_adc/linker.lf b/components/esp_adc/linker.lf index b2e1851e28..755c83f1d6 100644 --- a/components/esp_adc/linker.lf +++ b/components/esp_adc/linker.lf @@ -3,3 +3,23 @@ archive: libesp_adc.a entries: if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y: adc_oneshot: adc_oneshot_read_isr (noflash) + +[mapping:adc_hal] +archive: libhal.a +entries: + if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y: + adc_oneshot_hal (noflash) + if COMPILER_OPTIMIZATION_DEBUG = y: + adc_hal_common: get_controller (noflash) + adc_hal_common: adc_hal_set_controller (noflash) + if SOC_ADC_ARBITER_SUPPORTED = y: + adc_hal_common: adc_hal_arbiter_config (noflash) + if SOC_ADC_CALIBRATION_V1_SUPPORTED = y: + adc_hal_common: adc_hal_set_calibration_param (noflash) + adc_hal_common: adc_hal_calibration_init (noflash) + if ADC_CONTINUOUS_ISR_IRAM_SAFE = y || GDMA_ISR_IRAM_SAFE = y: + adc_hal: adc_hal_get_reading_result (noflash) + if IDF_TARGET_ESP32 = y || IDF_TARGET_ESP32S2 = y: + adc_hal: adc_hal_check_event (noflash) + adc_hal: adc_hal_digi_clr_intr (noflash) + adc_hal: adc_hal_get_desc_addr (noflash) diff --git a/components/hal/linker.lf b/components/hal/linker.lf index 12261427d0..1865d0267f 100644 --- a/components/hal/linker.lf +++ b/components/hal/linker.lf @@ -30,23 +30,3 @@ entries: gpio_hal: gpio_hal_intr_disable (noflash) if LCD_RGB_ISR_IRAM_SAFE = y: lcd_hal: lcd_hal_cal_pclk_freq (noflash) - if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y: - adc_oneshot_hal (noflash) - if COMPILER_OPTIMIZATION_DEFAULT = y: - adc_hal_common: get_controller (noflash) - adc_hal_common: adc_hal_set_controller (noflash) - if SOC_ADC_ARBITER_SUPPORTED = y: - adc_hal_common: adc_hal_arbiter_config (noflash) - if SOC_ADC_CALIBRATION_V1_SUPPORTED = y: - adc_hal_common: adc_hal_set_calibration_param (noflash) - adc_hal_common: adc_hal_calibration_init (noflash) - if ADC_CONTINUOUS_ISR_IRAM_SAFE = y: - adc_hal: adc_hal_get_reading_result (noflash) - adc_hal: adc_hal_digi_start (noflash) - if COMPILER_OPTIMIZATION_DEFAULT = y: - adc_hal: adc_hal_digi_dma_link_descriptors (noflash) - adc_hal: adc_hal_digi_stop (noflash) - if IDF_TARGET_ESP32 = y || IDF_TARGET_ESP32S2 = y: - adc_hal: adc_hal_check_event (noflash) - adc_hal: adc_hal_digi_clr_intr (noflash) - adc_hal: adc_hal_get_desc_addr (noflash)