From c25031212dba17e472adb347cfe66c8c3f40d360 Mon Sep 17 00:00:00 2001 From: morris Date: Wed, 26 Oct 2022 10:23:31 +0800 Subject: [PATCH] driver: test with non-isr freertos functions in the flash --- components/driver/deprecated/mcpwm_legacy.c | 4 ++-- .../driver/test_apps/dac_test_apps/dac/sdkconfig.ci.iram_safe | 2 ++ components/driver/test_apps/gpio/sdkconfig.ci.iram_safe | 2 ++ components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe | 2 ++ .../driver/test_apps/i2s_test_apps/i2s/sdkconfig.ci.iram_safe | 2 ++ components/driver/test_apps/mcpwm/sdkconfig.ci.iram_safe | 2 ++ components/driver/test_apps/pulse_cnt/sdkconfig.ci.iram_safe | 2 ++ components/driver/test_apps/rmt/sdkconfig.ci.iram_safe | 2 ++ components/driver/test_apps/sdm/sdkconfig.ci.iram_safe | 2 ++ components/esp_lcd/test_apps/rgb_lcd/sdkconfig.ci.iram_safe | 2 ++ 10 files changed, 20 insertions(+), 2 deletions(-) diff --git a/components/driver/deprecated/mcpwm_legacy.c b/components/driver/deprecated/mcpwm_legacy.c index c39e049a02..c56806f13c 100644 --- a/components/driver/deprecated/mcpwm_legacy.c +++ b/components/driver/deprecated/mcpwm_legacy.c @@ -865,7 +865,7 @@ esp_err_t mcpwm_capture_disable_channel(mcpwm_unit_t mcpwm_num, mcpwm_capture_ch uint32_t MCPWM_ISR_ATTR mcpwm_capture_signal_get_value(mcpwm_unit_t mcpwm_num, mcpwm_capture_signal_t cap_sig) { - if (mcpwm_num >= MCPWM_UNIT_MAX && cap_sig >= SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER) { + if (mcpwm_num >= MCPWM_UNIT_MAX || cap_sig >= SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER) { return 0; } mcpwm_hal_context_t *hal = &context[mcpwm_num].hal; @@ -887,7 +887,7 @@ uint32_t mcpwm_capture_get_resolution(mcpwm_unit_t mcpwm_num) uint32_t MCPWM_ISR_ATTR mcpwm_capture_signal_get_edge(mcpwm_unit_t mcpwm_num, mcpwm_capture_signal_t cap_sig) { - if (mcpwm_num >= MCPWM_UNIT_MAX && cap_sig >= SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER) { + if (mcpwm_num >= MCPWM_UNIT_MAX || cap_sig >= SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER) { return 0; } mcpwm_hal_context_t *hal = &context[mcpwm_num].hal; diff --git a/components/driver/test_apps/dac_test_apps/dac/sdkconfig.ci.iram_safe b/components/driver/test_apps/dac_test_apps/dac/sdkconfig.ci.iram_safe index 0c13dc0841..697272f955 100644 --- a/components/driver/test_apps/dac_test_apps/dac/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/dac_test_apps/dac/sdkconfig.ci.iram_safe @@ -2,3 +2,5 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y CONFIG_DAC_ISR_IRAM_SAFE=y CONFIG_DAC_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/components/driver/test_apps/gpio/sdkconfig.ci.iram_safe b/components/driver/test_apps/gpio/sdkconfig.ci.iram_safe index e82a766cd3..fd46a672d2 100644 --- a/components/driver/test_apps/gpio/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/gpio/sdkconfig.ci.iram_safe @@ -1,6 +1,8 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y # GPIO test uses IPC call, the default stack size of IPC task can satisfy the -O0 optimization diff --git a/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe b/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe index 499c09412c..b53844d9c0 100644 --- a/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe @@ -2,5 +2,7 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM=y CONFIG_GPTIMER_ISR_IRAM_SAFE=y CONFIG_COMPILER_OPTIMIZATION_NONE=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y diff --git a/components/driver/test_apps/i2s_test_apps/i2s/sdkconfig.ci.iram_safe b/components/driver/test_apps/i2s_test_apps/i2s/sdkconfig.ci.iram_safe index 81ee3a7538..c679a19a27 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/i2s_test_apps/i2s/sdkconfig.ci.iram_safe @@ -3,3 +3,5 @@ CONFIG_I2S_ISR_IRAM_SAFE=y CONFIG_COMPILER_OPTIMIZATION_NONE=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/components/driver/test_apps/mcpwm/sdkconfig.ci.iram_safe b/components/driver/test_apps/mcpwm/sdkconfig.ci.iram_safe index bf0d2b89c0..4d8a456b73 100644 --- a/components/driver/test_apps/mcpwm/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/mcpwm/sdkconfig.ci.iram_safe @@ -5,3 +5,5 @@ CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/components/driver/test_apps/pulse_cnt/sdkconfig.ci.iram_safe b/components/driver/test_apps/pulse_cnt/sdkconfig.ci.iram_safe index 875989040c..8725c6ff2e 100644 --- a/components/driver/test_apps/pulse_cnt/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/pulse_cnt/sdkconfig.ci.iram_safe @@ -5,3 +5,5 @@ CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/components/driver/test_apps/rmt/sdkconfig.ci.iram_safe b/components/driver/test_apps/rmt/sdkconfig.ci.iram_safe index 3e489aef4b..4d5f62954e 100644 --- a/components/driver/test_apps/rmt/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/rmt/sdkconfig.ci.iram_safe @@ -2,6 +2,8 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y CONFIG_RMT_ISR_IRAM_SAFE=y CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y diff --git a/components/driver/test_apps/sdm/sdkconfig.ci.iram_safe b/components/driver/test_apps/sdm/sdkconfig.ci.iram_safe index 3b48d167d1..35876c662b 100644 --- a/components/driver/test_apps/sdm/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/sdm/sdkconfig.ci.iram_safe @@ -1,5 +1,7 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y CONFIG_SDM_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y diff --git a/components/esp_lcd/test_apps/rgb_lcd/sdkconfig.ci.iram_safe b/components/esp_lcd/test_apps/rgb_lcd/sdkconfig.ci.iram_safe index d37073719a..6919722189 100644 --- a/components/esp_lcd/test_apps/rgb_lcd/sdkconfig.ci.iram_safe +++ b/components/esp_lcd/test_apps/rgb_lcd/sdkconfig.ci.iram_safe @@ -4,3 +4,5 @@ CONFIG_GDMA_CTRL_FUNC_IN_IRAM=y CONFIG_COMPILER_OPTIMIZATION_NONE=y # silent the error check, as the error string are stored in rodata, causing RTL check failure CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y +# place non-ISR FreeRTOS functions in Flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y