From e1d2635a834c783bcffcb2184c1c43b5c889a9c2 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Mon, 29 Aug 2022 11:42:36 +0800 Subject: [PATCH] adc: skip linking static functions when not COMPILER_OPTIMIZATION_DEFAULT --- components/hal/linker.lf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/hal/linker.lf b/components/hal/linker.lf index 9b23d5a562..c8178e04eb 100644 --- a/components/hal/linker.lf +++ b/components/hal/linker.lf @@ -30,7 +30,8 @@ entries: lcd_hal: lcd_hal_cal_pclk_freq (noflash) if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y: adc_oneshot_hal (noflash) - adc_hal_common: get_controller (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) @@ -40,7 +41,8 @@ entries: if ADC_CONTINUOUS_ISR_IRAM_SAFE = y: adc_hal: adc_hal_get_reading_result (noflash) adc_hal: adc_hal_digi_start (noflash) - adc_hal: adc_hal_digi_dma_link_descriptors (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)