Merge branch 'change/deprecate_legacy_xtensa_include_path' into 'master'

change(xtensa): Deprecate legacy include paths

Closes IDF-7230

See merge request espressif/esp-idf!26725
This commit is contained in:
Darian 2023-12-05 15:05:29 +08:00
commit e3191df37a
55 changed files with 60 additions and 99 deletions

View File

@ -16,8 +16,8 @@
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/semphr.h"
#include "freertos/xtensa_api.h"
#include "freertos/portmacro.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "xtensa/core-macros.h"
#include "esp_types.h"
#include "esp_mac.h"

View File

@ -8,7 +8,7 @@
#include <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "sdkconfig.h"
#include "soc/soc.h"

View File

@ -43,8 +43,6 @@
#include "riscv/interrupt.h"
#include "esp32c3/rom/rom_layout.h"
#else //CONFIG_IDF_TARGET_ESP32S3
#include "freertos/xtensa_api.h"
#include "xtensa/core-macros.h"
#include "esp32s3/rom/rom_layout.h"
#endif
#if CONFIG_BT_ENABLED

View File

@ -13,7 +13,6 @@
#include "soc/rtc.h"
#include "soc/periph_defs.h"
#include "freertos/FreeRTOS.h"
#include "freertos/xtensa_api.h"
#include "freertos/semphr.h"
#include "esp_timer.h"
#include "esp_intr_alloc.h"

View File

@ -11,7 +11,6 @@
#include "sys/lock.h"
#include "soc/soc_pins.h"
#include "freertos/FreeRTOS.h"
#include "freertos/xtensa_api.h"
#include "freertos/semphr.h"
#include "freertos/timers.h"
#include "esp_intr_alloc.h"

View File

@ -11,7 +11,6 @@
#include "sys/lock.h"
#include "soc/soc_pins.h"
#include "freertos/FreeRTOS.h"
#include "freertos/xtensa_api.h"
#include "freertos/semphr.h"
#include "freertos/timers.h"
#include "esp_intr_alloc.h"

View File

@ -6,7 +6,7 @@
#pragma once
#include <stdint.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32

View File

@ -7,7 +7,7 @@
#include <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
.section .iram1,"ax"
.global _xt_panic_gdbstub

View File

@ -12,7 +12,7 @@
#include <assert.h>
#include "soc/soc_caps.h"
#ifdef __XTENSA__
#include "xtensa/xtensa_api.h"
#include "xtensa_api.h"
#include "xt_utils.h"
#elif __riscv
#include "riscv/rv_utils.h"

View File

@ -17,7 +17,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/xtensa_timer.h"
#include "xtensa_timer.h"
#include "driver/uart.h"
#include "unity.h"
#include "test_utils.h"

View File

@ -9,7 +9,7 @@
#include <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "esp_private/panic_reason.h"
#include "soc/soc.h"
#include "soc/dport_reg.h"

View File

@ -29,7 +29,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#if CONFIG_FREERTOS_SYSTICK_USES_CCOUNT
#include "freertos/xtensa_timer.h"
#include "xtensa_timer.h"
#include "xtensa/core-macros.h"
#endif

View File

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

View File

@ -7,7 +7,7 @@
#include <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "esp_private/panic_reason.h"
#include "sdkconfig.h"
#include "soc/soc.h"

View File

@ -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 <freertos/xtensa_context.h>
#include <xtensa_context.h>
.extern xtensa_shared_stack
.extern xtensa_shared_stack_callback

View File

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

View File

@ -8,7 +8,7 @@
#include <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "freertos/xtensa_rtos.h"
#include "esp_private/panic_reason.h"
#include "sdkconfig.h"

View File

@ -22,7 +22,6 @@
#include "soc/rtc.h"
#include "esp_private/rtc_clk.h"
#include "hal/wdt_hal.h"
#include "freertos/xtensa_api.h"
#include "soc/soc_memory_layout.h"
#include "esp_private/cache_err_int.h"
@ -61,7 +60,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
void IRAM_ATTR esp_restart_noos(void)
{
// Disable interrupts
xt_ints_off(0xFFFFFFFF);
esp_cpu_intr_disable(0xFFFFFFFF);
// Enable RTC watchdog for 1 second
wdt_hal_context_t rtc_wdt_ctx;

View File

@ -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 <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "esp_private/panic_reason.h"
#include "sdkconfig.h"
#include "soc/soc.h"

View File

@ -22,7 +22,6 @@
#include "soc/syscon_reg.h"
#include "soc/rtc_periph.h"
#include "hal/wdt_hal.h"
#include "freertos/xtensa_api.h"
#include "soc/soc_memory_layout.h"
#include "esp32s2/rom/rtc.h"
@ -61,7 +60,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
void IRAM_ATTR esp_restart_noos(void)
{
// Disable interrupts
xt_ints_off(0xFFFFFFFF);
esp_cpu_intr_disable(0xFFFFFFFF);
// Enable RTC watchdog for 1 second
wdt_hal_context_t rtc_wdt_ctx;

View File

@ -8,7 +8,7 @@
#include <xtensa/coreasm.h>
#include <xtensa/corebits.h>
#include <xtensa/config/system.h>
#include "freertos/xtensa_context.h"
#include "xtensa_context.h"
#include "esp_private/panic_reason.h"
#include "sdkconfig.h"
#include "soc/soc.h"

View File

@ -21,7 +21,6 @@
#include "soc/syscon_reg.h"
#include "soc/rtc_periph.h"
#include "hal/wdt_hal.h"
#include "freertos/xtensa_api.h"
#include "soc/soc_memory_layout.h"
#include "esp32s3/rom/cache.h"
@ -68,7 +67,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
void IRAM_ATTR esp_restart_noos(void)
{
// Disable interrupts
xt_ints_off(0xFFFFFFFF);
esp_cpu_intr_disable(0xFFFFFFFF);
// Enable RTC watchdog for 1 second
wdt_hal_context_t rtc_wdt_ctx;

View File

@ -15,7 +15,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "esp_intr_alloc.h"
#include "esp_rom_sys.h"
#include "esp_rom_uart.h"

View File

@ -17,7 +17,7 @@
#include "freertos/semphr.h"
#include "freertos/event_groups.h"
#include "freertos/portmacro.h"
#include "freertos/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "esp_types.h"
#include "esp_random.h"
#include "esp_mac.h"

View File

@ -17,7 +17,7 @@
#include "freertos/semphr.h"
#include "freertos/event_groups.h"
#include "freertos/portmacro.h"
#include "freertos/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "esp_types.h"
#include "esp_random.h"
#include "esp_mac.h"

View File

@ -17,7 +17,7 @@
#include "freertos/semphr.h"
#include "freertos/event_groups.h"
#include "freertos/portmacro.h"
#include "freertos/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "esp_types.h"
#include "esp_random.h"
#include "esp_mac.h"

View File

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

View File

@ -424,7 +424,7 @@ portmacro.h. Therefore, we need to keep these headers around for now to allow th
#include "portbenchmark.h"
#include <limits.h>
#include <xtensa/config/system.h>
#include <xtensa/xtensa_api.h>
#include <xtensa_api.h>
/* [refactor-todo] introduce a port wrapper function to avoid including esp_timer.h into the public header */
#if CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER

View File

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

View File

@ -61,7 +61,7 @@
/* [refactor-todo] These includes are not directly used in this file. They are kept into to prevent a breaking change. Remove these. */
#include <limits.h>
#include <xtensa/config/system.h>
#include <xtensa/xtensa_api.h>
#include <xtensa_api.h>
/* [refactor-todo] introduce a port wrapper function to avoid including esp_timer.h into the public header */
#if CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER

View File

@ -37,7 +37,7 @@
#include <stdlib.h>
#include <string.h>
#include <xtensa/config/core.h>
#include <xtensa/xtensa_context.h>
#include <xtensa_context.h>
#include "soc/soc_caps.h"
#include "esp_attr.h"
#include "esp_private/crosscore_int.h"

View File

@ -18,7 +18,7 @@
#include "test_utils.h"
#if CONFIG_IDF_TARGET_ARCH_XTENSA
#include "xtensa/hal.h"
#include "freertos/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#define TEST_SET_INT_MASK(mask) xt_set_intset(mask)
#define TEST_CLR_INT_MASK(mask) xt_set_intclear(mask)
#elif CONFIG_IDF_TARGET_ARCH_RISCV

View File

@ -16,7 +16,7 @@
#if SOC_CPU_HAS_FPU && CONFIG_FREERTOS_FPU_IN_ISR
// We can use xtensa API here as currently, non of the RISC-V targets have an FPU
#include "xtensa/xtensa_api.h"
#include "xtensa_api.h" // Replace with interrupt allocator API (IDF-3891)
#include "esp_intr_alloc.h"
#define SW_ISR_LEVEL_1 7

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -15,10 +15,7 @@
#include "esp_random.h"
#include "unity.h"
#if CONFIG_IDF_TARGET_ARCH_XTENSA
#include "freertos/xtensa_api.h"
#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
#if CONFIG_IDF_TARGET_ARCH_XTENSA && CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
TEST_CASE("LoadStore Exception handler", "[freertos]")
{
int32_t val0 = 0xDEADBEEF;
@ -128,5 +125,4 @@ TEST_CASE("LoadStore Exception handler", "[freertos]")
TEST_ASSERT_TRUE(heap_caps_check_integrity_all(true));
heap_caps_free(arr);
}
#endif // CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
#endif // CONFIG_IDF_TARGET_ARCH_XTENSA
#endif // CONFIG_IDF_TARGET_ARCH_XTENSA && CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY

View File

@ -14,7 +14,6 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/xtensa_timer.h"
#include "unity.h"
#include "test_utils.h"
#include "esp32/rom/sha.h"

View File

@ -6,6 +6,6 @@
#pragma once
/* This header file has been moved, thus `#include <freertos/xtensa_api.h>` is deprecated. Please use `#include <xtensa_api.h>` instead */
/* Todo: IDF-7230 */
#include <xtensa/xtensa_api.h>
#warning "This header file has been moved, thus `#include <freertos/xtensa_api.h>` is deprecated. Please use `#include <xtensa_api.h>` instead"
#include <xtensa_api.h>

View File

@ -6,6 +6,6 @@
#pragma once
/* This header file has been moved, thus `#include <freertos/xtensa_context.h>` is deprecated. Please use `#include <xtensa_context.h>` instead */
/* Todo: IDF-7230 */
#include <xtensa/xtensa_context.h>
#warning "This header file has been moved, thus `#include <freertos/xtensa_context.h>` is deprecated. Please use `#include <xtensa_context.h>` instead"
#include <xtensa_context.h>

View File

@ -6,6 +6,6 @@
#pragma once
/* This header file has been moved, thus `#include <freertos/xtensa_timer.h>` is deprecated. Please use `#include <xtensa_timer.h>` instead */
/* Todo: IDF-7230 */
#warning "This header file has been moved, thus `#include <freertos/xtensa_timer.h>` is deprecated. Please use `#include <xtensa_timer.h>` instead"
#include <xtensa_timer.h>

View File

@ -6,6 +6,6 @@
#pragma once
/* This header file has been moved, thus `#include <xtensa/xtensa_api.h>` is deprecated. Please use `#include <xtensa_api.h>` instead */
/* Todo: IDF-7230 */
#warning "This header file has been moved, thus `#include <xtensa/xtensa_api.h>` is deprecated. Please use `#include <xtensa_api.h>` instead"
#include <xtensa_api.h>

View File

@ -6,6 +6,6 @@
#pragma once
/* This header file has been moved, thus `#include <xtensa/xtensa_context.h>` is deprecated. Please use `#include <xtensa_context.h>` instead */
/* Todo: IDF-7230 */
#warning "This header file has been moved, thus `#include <xtensa/xtensa_context.h>` is deprecated. Please use `#include <xtensa_context.h>` instead"
#include <xtensa_context.h>

View File

@ -6,6 +6,6 @@
#pragma once
/* This header file has been moved, thus `#include <xtensa/xtensa_timer.h>` is deprecated. Please use `#include <xtensa_timer.h>` instead */
/* Todo: IDF-7230 */
#warning "This header file has been moved, thus `#include <xtensa/xtensa_timer.h>` is deprecated. Please use `#include <xtensa_timer.h>` instead"
#include <xtensa_timer.h>

View File

@ -31,7 +31,7 @@
#include <xtensa/config/core.h>
#include "esp_attr.h"
#include "xtensa/xtensa_api.h"
#include "xtensa_api.h"
#include "sdkconfig.h"
#include "esp_rom_sys.h"

View File

@ -36,7 +36,7 @@
#include <xtensa/hal.h>
#include <xtensa/config/core.h>
#include "xtensa/xtensa_context.h"
#include "xtensa_context.h"
/*
* When compiling for G0-only, we don't have FreeRTOS component.

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -5,7 +5,6 @@
*/
#include "driver/uart.h"
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "freertos/xtensa_api.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"

View File

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

View File

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

View File

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