diff --git a/components/driver/dac_common.c b/components/driver/dac_common.c index 791926b0fc..9ccf89ada2 100644 --- a/components/driver/dac_common.c +++ b/components/driver/dac_common.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -19,7 +19,7 @@ extern portMUX_TYPE rtc_spinlock; //TODO: Will be placed in the appropriate position after the rtc module is finished. -static const char *TAG = "DAC"; +static __attribute__((unused)) const char *TAG = "DAC"; /*--------------------------------------------------------------- DAC diff --git a/components/driver/esp32/touch_sensor.c b/components/driver/esp32/touch_sensor.c index b7781a4780..3b0a8f95a9 100644 --- a/components/driver/esp32/touch_sensor.c +++ b/components/driver/esp32/touch_sensor.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -49,7 +49,7 @@ static SemaphoreHandle_t rtc_touch_mux = NULL; #define TOUCH_PAD_SHIFT_DEFAULT (4) // Increase computing accuracy. #define TOUCH_PAD_SHIFT_ROUND_DEFAULT (8) // ROUND = 2^(n-1); rounding off for fractional. -static const char *TOUCH_TAG = "TOUCH_SENSOR"; +static __attribute__((unused)) const char *TOUCH_TAG = "TOUCH_SENSOR"; #define TOUCH_CHANNEL_CHECK(channel) ESP_RETURN_ON_FALSE(channel < SOC_TOUCH_SENSOR_NUM, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch channel error"); #define TOUCH_NULL_POINTER_CHECK(p, name) ESP_RETURN_ON_FALSE((p), ESP_ERR_INVALID_ARG, TOUCH_TAG, "input param '"name"' is NULL") diff --git a/components/driver/esp32s2/dac.c b/components/driver/esp32s2/dac.c index 16f8742a90..a6815dfd79 100644 --- a/components/driver/esp32s2/dac.c +++ b/components/driver/esp32s2/dac.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -18,7 +18,7 @@ #include "soc/dac_periph.h" #include "hal/dac_hal.h" -static const char *TAG = "DAC"; +static __attribute__((unused)) const char *TAG = "DAC"; extern portMUX_TYPE rtc_spinlock; //TODO: Will be placed in the appropriate position after the rtc module is finished. #define DAC_ENTER_CRITICAL() portENTER_CRITICAL(&rtc_spinlock) diff --git a/components/driver/esp32s2/touch_sensor.c b/components/driver/esp32s2/touch_sensor.c index 5b6203c9e4..4cf4f639d6 100644 --- a/components/driver/esp32s2/touch_sensor.c +++ b/components/driver/esp32s2/touch_sensor.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -36,7 +36,7 @@ #define TOUCH_PAD_SHIFT_ROUND_DEFAULT (8) // ROUND = 2^(n-1); rounding off for fractional. #define TOUCH_PAD_MEASURE_WAIT_DEFAULT (0xFF) // The timer frequency is 8Mhz, the max value is 0xff -static const char *TOUCH_TAG = "TOUCH_SENSOR"; +static __attribute__((unused)) const char *TOUCH_TAG = "TOUCH_SENSOR"; #define TOUCH_CHANNEL_CHECK(channel) do { \ ESP_RETURN_ON_FALSE(channel < SOC_TOUCH_SENSOR_NUM && channel >= 0, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch channel error"); \ diff --git a/components/driver/esp32s3/touch_sensor.c b/components/driver/esp32s3/touch_sensor.c index c120a1c580..3b1aebaac7 100644 --- a/components/driver/esp32s3/touch_sensor.c +++ b/components/driver/esp32s3/touch_sensor.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -36,7 +36,7 @@ #define TOUCH_PAD_SHIFT_ROUND_DEFAULT (8) // ROUND = 2^(n-1); rounding off for fractional. #define TOUCH_PAD_MEASURE_WAIT_DEFAULT (0xFF) // The timer frequency is 8Mhz, the max value is 0xff -static const char *TOUCH_TAG = "TOUCH_SENSOR"; +static __attribute__((unused)) const char *TOUCH_TAG = "TOUCH_SENSOR"; #define TOUCH_CHANNEL_CHECK(channel) do { \ ESP_RETURN_ON_FALSE(channel < SOC_TOUCH_SENSOR_NUM && channel >= 0, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch channel error"); \ diff --git a/components/driver/ledc.c b/components/driver/ledc.c index 91f57ec05a..5c69bddb58 100644 --- a/components/driver/ledc.c +++ b/components/driver/ledc.c @@ -21,7 +21,7 @@ #include "soc/clk_ctrl_os.h" #include "esp_private/periph_ctrl.h" -static const char *LEDC_TAG = "ledc"; +static __attribute__((unused)) const char *LEDC_TAG = "ledc"; #define LEDC_CHECK(a, str, ret_val) ESP_RETURN_ON_FALSE(a, ret_val, LEDC_TAG, "%s", str) #define LEDC_ARG_CHECK(a, param) ESP_RETURN_ON_FALSE(a, ESP_ERR_INVALID_ARG, LEDC_TAG, param " argument is invalid") @@ -66,9 +66,9 @@ static portMUX_TYPE ledc_spinlock = portMUX_INITIALIZER_UNLOCKED; #define DIM(array) (sizeof(array)/sizeof(*array)) #define LEDC_IS_DIV_INVALID(div) ((div) <= LEDC_LL_FRACTIONAL_MAX || (div) > LEDC_TIMER_DIV_NUM_MAX) -static const char *LEDC_NOT_INIT = "LEDC is not initialized"; -static const char *LEDC_FADE_SERVICE_ERR_STR = "LEDC fade service not installed"; -static const char *LEDC_FADE_INIT_ERROR_STR = "LEDC fade channel init error, not enough memory or service not installed"; +static __attribute__((unused)) const char *LEDC_NOT_INIT = "LEDC is not initialized"; +static __attribute__((unused)) const char *LEDC_FADE_SERVICE_ERR_STR = "LEDC fade service not installed"; +static __attribute__((unused)) const char *LEDC_FADE_INIT_ERROR_STR = "LEDC fade channel init error, not enough memory or service not installed"; //This value will be calibrated when in use. static uint32_t s_ledc_slow_clk_8M = 0; diff --git a/components/driver/test_apps/gptimer/CMakeLists.txt b/components/driver/test_apps/gptimer/CMakeLists.txt index 897e67221c..9b8072e4cc 100644 --- a/components/driver/test_apps/gptimer/CMakeLists.txt +++ b/components/driver/test_apps/gptimer/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(gptimer_test) -if(CONFIG_GPTIMER_ISR_IRAM_SAFE) +if(CONFIG_COMPILER_DUMP_RTL_FILES) add_custom_target(check_test_app_sections ALL COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py --rtl-dir ${CMAKE_BINARY_DIR}/esp-idf/driver/ diff --git a/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe b/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe index 3979b28af4..5dbcade839 100644 --- a/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe +++ b/components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe @@ -1,5 +1,5 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM=y CONFIG_GPTIMER_ISR_IRAM_SAFE=y -# disable log as most of log access rodata string on error, causing RTL check failure -CONFIG_LOG_DEFAULT_LEVEL_NONE=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_adc_cal/esp_adc_cal_common.c b/components/esp_adc_cal/esp_adc_cal_common.c index 809c001625..0835656ca1 100644 --- a/components/esp_adc_cal/esp_adc_cal_common.c +++ b/components/esp_adc_cal/esp_adc_cal_common.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -14,7 +14,7 @@ #include "hal/adc_types.h" #include "esp_adc_cal.h" -const static char *TAG = "ADC_CALI"; +const __attribute__((unused)) static char *TAG = "ADC_CALI"; esp_err_t esp_adc_cal_get_voltage(adc_channel_t channel, const esp_adc_cal_characteristics_t *chars, diff --git a/components/esp_hw_support/esp_async_memcpy.c b/components/esp_hw_support/esp_async_memcpy.c index dda8c6cca9..6b245f2d7e 100644 --- a/components/esp_hw_support/esp_async_memcpy.c +++ b/components/esp_hw_support/esp_async_memcpy.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -88,6 +88,8 @@ esp_err_t esp_async_memcpy_install(const async_memcpy_config_t *config, async_me ret = async_memcpy_impl_init(&mcp_hdl->mcp_impl); ESP_GOTO_ON_ERROR(ret, err, TAG, "DMA M2M init failed"); + ESP_LOGD(TAG, "installed memory to memory copy channel at %p", mcp_hdl); + *asmcp = mcp_hdl; async_memcpy_impl_start(&mcp_hdl->mcp_impl, (intptr_t)&mcp_hdl->out_streams[0].desc, (intptr_t)&mcp_hdl->in_streams[0].desc); diff --git a/components/esp_lcd/src/esp_lcd_panel_io.c b/components/esp_lcd/src/esp_lcd_panel_io.c index 1c45c65a0a..aabbd5f950 100644 --- a/components/esp_lcd/src/esp_lcd_panel_io.c +++ b/components/esp_lcd/src/esp_lcd_panel_io.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -8,7 +8,7 @@ #include "esp_lcd_panel_io.h" #include "esp_lcd_panel_io_interface.h" -static const char *TAG = "lcd_panel.io"; +static __attribute__((unused)) const char *TAG = "lcd_panel.io"; esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, const void *param, size_t param_size) { diff --git a/components/esp_lcd/src/esp_lcd_panel_ops.c b/components/esp_lcd/src/esp_lcd_panel_ops.c index aae00a82b3..d077fdeae8 100644 --- a/components/esp_lcd/src/esp_lcd_panel_ops.c +++ b/components/esp_lcd/src/esp_lcd_panel_ops.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -8,7 +8,7 @@ #include "esp_lcd_panel_ops.h" #include "esp_lcd_panel_interface.h" -static const char *TAG = "lcd_panel"; +static __attribute__((unused)) const char *TAG = "lcd_panel"; esp_err_t esp_lcd_panel_reset(esp_lcd_panel_handle_t panel) {