ソースを参照

fix(adc): fix adc continuous hal func not in iram when gdma isr iram

Armando 2 年 前
コミット
8d54030890
2 ファイル変更20 行追加20 行削除
  1. 20 0
      components/esp_adc/linker.lf
  2. 0 20
      components/hal/linker.lf

+ 20 - 0
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)

+ 0 - 20
components/hal/linker.lf

@@ -30,25 +30,5 @@ entries:
         twai_hal_iram (noflash)
     if IDF_TARGET_ESP32 = n:
         spi_flash_hal_gpspi (noflash)
-    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:
-        adc_hal: adc_hal_get_reading_result (noflash)
-        adc_hal: adc_hal_digi_start (noflash)
-        if COMPILER_OPTIMIZATION_DEBUG = 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)
     if SOC_PMU_SUPPORTED = y:
         pmu_hal (noflash)