From a5d5ee744516d34a0cb58592bbc0909a7e98324e Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Fri, 27 Oct 2023 18:10:47 +0800 Subject: [PATCH] change(xtensa): Deprecate ".../xtensa_context.h" include path This commit deprecates the "freertos/xtensa_context.h" and "xtensa/xtensa_context.h" include paths. Users should use "xtensa_context.h" instead. - Replace legacy include paths - Removed some unnecessary includes of "xtensa_api.h" - Add warning to compatibility header --- components/bt/controller/esp32/hli_vectors.S | 2 +- .../port/xtensa/include/esp_gdbstub_arch.h | 2 +- .../src/port/xtensa/xt_debugexception.S | 2 +- .../main/test_dport_xt_highint5.S | 2 +- .../port/arch/xtensa/debug_helpers.c | 2 +- .../port/arch/xtensa/esp_ipc_isr_handler.S | 2 +- .../arch/xtensa/expression_with_stack_asm.S | 20 ++++++------------- .../esp_system/port/arch/xtensa/panic_arch.c | 2 +- .../esp_system/port/soc/esp32/highint_hdl.S | 2 +- .../esp_system/port/soc/esp32s2/highint_hdl.S | 20 ++++++------------- .../esp_system/port/soc/esp32s3/highint_hdl.S | 2 +- .../src/port/xtensa/core_dump_port.c | 2 +- .../portable/xtensa/port.c | 2 +- .../FreeRTOS-Kernel/portable/xtensa/port.c | 2 +- .../freertos/xtensa_context.h | 6 +++--- .../xtensa/xtensa_context.h | 4 ++-- components/xtensa/xtensa_intr_asm.S | 2 +- .../system/memprot/main/esp32s2/test_panic.c | 2 +- .../system/memprot/main/esp32s3/test_panic.c | 2 +- .../panic_utils/memprot_panic_utils_xtensa.c | 1 - 20 files changed, 32 insertions(+), 49 deletions(-) diff --git a/components/bt/controller/esp32/hli_vectors.S b/components/bt/controller/esp32/hli_vectors.S index 7e0cd528fe..2af6ffae7c 100644 --- a/components/bt/controller/esp32/hli_vectors.S +++ b/components/bt/controller/esp32/hli_vectors.S @@ -8,7 +8,7 @@ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "sdkconfig.h" #include "soc/soc.h" diff --git a/components/esp_gdbstub/src/port/xtensa/include/esp_gdbstub_arch.h b/components/esp_gdbstub/src/port/xtensa/include/esp_gdbstub_arch.h index 16a38db019..1efe761cef 100644 --- a/components/esp_gdbstub/src/port/xtensa/include/esp_gdbstub_arch.h +++ b/components/esp_gdbstub/src/port/xtensa/include/esp_gdbstub_arch.h @@ -6,7 +6,7 @@ #pragma once #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "sdkconfig.h" #if CONFIG_IDF_TARGET_ESP32 diff --git a/components/esp_gdbstub/src/port/xtensa/xt_debugexception.S b/components/esp_gdbstub/src/port/xtensa/xt_debugexception.S index 4d90e36e6d..da9b489077 100644 --- a/components/esp_gdbstub/src/port/xtensa/xt_debugexception.S +++ b/components/esp_gdbstub/src/port/xtensa/xt_debugexception.S @@ -7,7 +7,7 @@ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" .section .iram1,"ax" .global _xt_panic_gdbstub diff --git a/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/main/test_dport_xt_highint5.S b/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/main/test_dport_xt_highint5.S index 2e7b15fcea..40589b1192 100644 --- a/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/main/test_dport_xt_highint5.S +++ b/components/esp_hw_support/test_apps/esp_hw_support_unity_tests/main/test_dport_xt_highint5.S @@ -9,7 +9,7 @@ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_private/panic_reason.h" #include "soc/soc.h" #include "soc/dport_reg.h" diff --git a/components/esp_system/port/arch/xtensa/debug_helpers.c b/components/esp_system/port/arch/xtensa/debug_helpers.c index 9cb55d2eff..e6219b1d2e 100644 --- a/components/esp_system/port/arch/xtensa/debug_helpers.c +++ b/components/esp_system/port/arch/xtensa/debug_helpers.c @@ -15,7 +15,7 @@ #include "esp_cpu_utils.h" #include "esp_private/panic_internal.h" -#include "xtensa/xtensa_context.h" +#include "xtensa_context.h" #include "sdkconfig.h" diff --git a/components/esp_system/port/arch/xtensa/esp_ipc_isr_handler.S b/components/esp_system/port/arch/xtensa/esp_ipc_isr_handler.S index 20638a6895..2d6d6a5032 100644 --- a/components/esp_system/port/arch/xtensa/esp_ipc_isr_handler.S +++ b/components/esp_system/port/arch/xtensa/esp_ipc_isr_handler.S @@ -7,7 +7,7 @@ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_private/panic_reason.h" #include "sdkconfig.h" #include "soc/soc.h" diff --git a/components/esp_system/port/arch/xtensa/expression_with_stack_asm.S b/components/esp_system/port/arch/xtensa/expression_with_stack_asm.S index 38c0dd998c..b38e5acaed 100644 --- a/components/esp_system/port/arch/xtensa/expression_with_stack_asm.S +++ b/components/esp_system/port/arch/xtensa/expression_with_stack_asm.S @@ -1,18 +1,10 @@ -// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ -#include +#include .extern xtensa_shared_stack .extern xtensa_shared_stack_callback diff --git a/components/esp_system/port/arch/xtensa/panic_arch.c b/components/esp_system/port/arch/xtensa/panic_arch.c index 2d670f577a..a2f4addb96 100644 --- a/components/esp_system/port/arch/xtensa/panic_arch.c +++ b/components/esp_system/port/arch/xtensa/panic_arch.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" diff --git a/components/esp_system/port/soc/esp32/highint_hdl.S b/components/esp_system/port/soc/esp32/highint_hdl.S index a27f0e6bfd..2eb3a9b256 100644 --- a/components/esp_system/port/soc/esp32/highint_hdl.S +++ b/components/esp_system/port/soc/esp32/highint_hdl.S @@ -8,7 +8,7 @@ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "freertos/xtensa_rtos.h" #include "esp_private/panic_reason.h" #include "sdkconfig.h" diff --git a/components/esp_system/port/soc/esp32s2/highint_hdl.S b/components/esp_system/port/soc/esp32s2/highint_hdl.S index c3d7dc0d8f..7e16cd2407 100644 --- a/components/esp_system/port/soc/esp32s2/highint_hdl.S +++ b/components/esp_system/port/soc/esp32s2/highint_hdl.S @@ -1,22 +1,14 @@ -// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_private/panic_reason.h" #include "sdkconfig.h" #include "soc/soc.h" diff --git a/components/esp_system/port/soc/esp32s3/highint_hdl.S b/components/esp_system/port/soc/esp32s3/highint_hdl.S index 78a5c711a3..de5e290d9b 100644 --- a/components/esp_system/port/soc/esp32s3/highint_hdl.S +++ b/components/esp_system/port/soc/esp32s3/highint_hdl.S @@ -8,7 +8,7 @@ #include #include #include -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_private/panic_reason.h" #include "sdkconfig.h" #include "soc/soc.h" diff --git a/components/espcoredump/src/port/xtensa/core_dump_port.c b/components/espcoredump/src/port/xtensa/core_dump_port.c index 4e7a11d400..1644283391 100644 --- a/components/espcoredump/src/port/xtensa/core_dump_port.c +++ b/components/espcoredump/src/port/xtensa/core_dump_port.c @@ -14,7 +14,7 @@ #include "soc/soc_memory_layout.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_rom_sys.h" #include "esp_core_dump_common.h" #include "esp_core_dump_port.h" diff --git a/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/port.c b/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/port.c index cb84e80931..f238dbc6e6 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/port.c +++ b/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/port.c @@ -13,7 +13,7 @@ #include "portmacro.h" #include "spinlock.h" #include "xt_instr_macros.h" -#include "xtensa/xtensa_context.h" +#include "xtensa_context.h" #include "xtensa/corebits.h" #include "xtensa/config/core.h" #include "xtensa/config/core-isa.h" diff --git a/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c b/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c index 6e98187250..ea4ee90b1b 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c +++ b/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "soc/soc_caps.h" #include "esp_attr.h" #include "esp_private/crosscore_int.h" diff --git a/components/xtensa/deprecated_include/freertos/xtensa_context.h b/components/xtensa/deprecated_include/freertos/xtensa_context.h index 83c7a762b2..fda0bf23e3 100644 --- a/components/xtensa/deprecated_include/freertos/xtensa_context.h +++ b/components/xtensa/deprecated_include/freertos/xtensa_context.h @@ -6,6 +6,6 @@ #pragma once -/* This header file has been moved, thus `#include ` is deprecated. Please use `#include ` instead */ -/* Todo: IDF-7230 */ -#include +#warning "This header file has been moved, thus `#include ` is deprecated. Please use `#include ` instead" + +#include diff --git a/components/xtensa/deprecated_include/xtensa/xtensa_context.h b/components/xtensa/deprecated_include/xtensa/xtensa_context.h index e49c7e5df8..baef27983e 100644 --- a/components/xtensa/deprecated_include/xtensa/xtensa_context.h +++ b/components/xtensa/deprecated_include/xtensa/xtensa_context.h @@ -6,6 +6,6 @@ #pragma once -/* This header file has been moved, thus `#include ` is deprecated. Please use `#include ` instead */ -/* Todo: IDF-7230 */ +#warning "This header file has been moved, thus `#include ` is deprecated. Please use `#include ` instead" + #include diff --git a/components/xtensa/xtensa_intr_asm.S b/components/xtensa/xtensa_intr_asm.S index 79d9beafe9..27fe781bfd 100644 --- a/components/xtensa/xtensa_intr_asm.S +++ b/components/xtensa/xtensa_intr_asm.S @@ -36,7 +36,7 @@ #include #include -#include "xtensa/xtensa_context.h" +#include "xtensa_context.h" /* * When compiling for G0-only, we don't have FreeRTOS component. diff --git a/tools/test_apps/system/memprot/main/esp32s2/test_panic.c b/tools/test_apps/system/memprot/main/esp32s2/test_panic.c index 0cd853205b..4f26cc86a7 100644 --- a/tools/test_apps/system/memprot/main/esp32s2/test_panic.c +++ b/tools/test_apps/system/memprot/main/esp32s2/test_panic.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_private/panic_internal.h" extern void esp_panic_handler(panic_info_t *info); diff --git a/tools/test_apps/system/memprot/main/esp32s3/test_panic.c b/tools/test_apps/system/memprot/main/esp32s3/test_panic.c index b126e537d2..a1071aa00c 100644 --- a/tools/test_apps/system/memprot/main/esp32s3/test_panic.c +++ b/tools/test_apps/system/memprot/main/esp32s3/test_panic.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "freertos/xtensa_context.h" +#include "xtensa_context.h" #include "esp_private/panic_internal.h" #include "hal/wdt_hal.h" diff --git a/tools/test_apps/system/panic/main/panic_utils/memprot_panic_utils_xtensa.c b/tools/test_apps/system/panic/main/panic_utils/memprot_panic_utils_xtensa.c index f67e81aed7..13de733dc7 100644 --- a/tools/test_apps/system/panic/main/panic_utils/memprot_panic_utils_xtensa.c +++ b/tools/test_apps/system/panic/main/panic_utils/memprot_panic_utils_xtensa.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "freertos/xtensa_context.h" #include "esp_private/panic_internal.h" #include "esp_rom_sys.h"