refactor(gpio):add gpio linker.lf to control the placement of driver and hal

since the linker placement of the hal functions are controlled by the Kconfig in the driver component,
we should create the linker.lf in the driver component, not in the hal component.
This commit is contained in:
Chen Jichang 2023-07-07 10:34:59 +08:00 committed by chenjichang
parent 87f8a8e20c
commit cdd18fd232
4 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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: