diff --git a/components/esp_hw_support/esp_clk.c b/components/esp_hw_support/esp_clk.c index 2f5d1b7755..2ebd827631 100644 --- a/components/esp_hw_support/esp_clk.c +++ b/components/esp_hw_support/esp_clk.c @@ -21,34 +21,8 @@ #include "esp_private/esp_clk.h" #include "hal/clk_tree_ll.h" -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rom/rtc.h" -#include "esp32/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rom/rtc.h" -#include "esp32s2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rom/rtc.h" -#include "esp32s3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rom/rtc.h" -#include "esp32c3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rom/rtc.h" -#include "esp32c2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rom/rtc.h" -#include "esp32c6/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C61 //TODO: IDF-9526, refactor this -#include "esp32c61/rom/rtc.h" -#include "esp32c61/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rom/rtc.h" -#include "esp32h2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rom/rtc.h" -#include "esp32p4/rtc.h" -#endif +#include "rom/rtc.h" +#include "esp_rtc_time.h" #define MHZ (1000000) diff --git a/components/esp_hw_support/include/esp_rtc_time.h b/components/esp_hw_support/include/esp_rtc_time.h new file mode 100644 index 0000000000..a63cbbe84c --- /dev/null +++ b/components/esp_hw_support/include/esp_rtc_time.h @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Get current value of RTC counter in microseconds + * + * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute + * + * @return current value of RTC counter in microseconds + */ +uint64_t esp_rtc_get_time_us(void); + +#ifdef __cplusplus +} +#endif diff --git a/components/esp_hw_support/include/soc/esp32/rtc.h b/components/esp_hw_support/include/soc/esp32/rtc.h index 4149546fda..537f0c0fab 100644 --- a/components/esp_hw_support/include/soc/esp32/rtc.h +++ b/components/esp_hw_support/include/soc/esp32/rtc.h @@ -1,31 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32c2/rtc.h b/components/esp_hw_support/include/soc/esp32c2/rtc.h index 31ad001e89..537f0c0fab 100644 --- a/components/esp_hw_support/include/soc/esp32c2/rtc.h +++ b/components/esp_hw_support/include/soc/esp32c2/rtc.h @@ -1,32 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32c2/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32c3/rtc.h b/components/esp_hw_support/include/soc/esp32c3/rtc.h index 4d46831ded..537f0c0fab 100644 --- a/components/esp_hw_support/include/soc/esp32c3/rtc.h +++ b/components/esp_hw_support/include/soc/esp32c3/rtc.h @@ -1,32 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32c3/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32c5/rtc.h b/components/esp_hw_support/include/soc/esp32c5/rtc.h index 4892a1d179..fde725277d 100644 --- a/components/esp_hw_support/include/soc/esp32c5/rtc.h +++ b/components/esp_hw_support/include/soc/esp32c5/rtc.h @@ -6,27 +6,5 @@ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32c5/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32c6/rtc.h b/components/esp_hw_support/include/soc/esp32c6/rtc.h index dec61ee9cf..f769cb3d63 100644 --- a/components/esp_hw_support/include/soc/esp32c6/rtc.h +++ b/components/esp_hw_support/include/soc/esp32c6/rtc.h @@ -1,32 +1,10 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32c6/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32c61/rtc.h b/components/esp_hw_support/include/soc/esp32c61/rtc.h index dd09becc21..cfdae19342 100644 --- a/components/esp_hw_support/include/soc/esp32c61/rtc.h +++ b/components/esp_hw_support/include/soc/esp32c61/rtc.h @@ -6,27 +6,5 @@ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32c61/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32h2/rtc.h b/components/esp_hw_support/include/soc/esp32h2/rtc.h index ce958526e0..f769cb3d63 100644 --- a/components/esp_hw_support/include/soc/esp32h2/rtc.h +++ b/components/esp_hw_support/include/soc/esp32h2/rtc.h @@ -1,32 +1,10 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32h2/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32p4/rtc.h b/components/esp_hw_support/include/soc/esp32p4/rtc.h index 6001966332..f769cb3d63 100644 --- a/components/esp_hw_support/include/soc/esp32p4/rtc.h +++ b/components/esp_hw_support/include/soc/esp32p4/rtc.h @@ -1,32 +1,10 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32c6/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32s2/rtc.h b/components/esp_hw_support/include/soc/esp32s2/rtc.h index 3ab96b3787..537f0c0fab 100644 --- a/components/esp_hw_support/include/soc/esp32s2/rtc.h +++ b/components/esp_hw_support/include/soc/esp32s2/rtc.h @@ -1,31 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32s2/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/include/soc/esp32s3/rtc.h b/components/esp_hw_support/include/soc/esp32s3/rtc.h index 3ab96b3787..537f0c0fab 100644 --- a/components/esp_hw_support/include/soc/esp32s3/rtc.h +++ b/components/esp_hw_support/include/soc/esp32s3/rtc.h @@ -1,31 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file esp32s2/rtc.h - * - * This file contains declarations of rtc related functions. - */ - -/** - * @brief Get current value of RTC counter in microseconds - * - * Note: this function may take up to 1 RTC_SLOW_CLK cycle to execute - * - * @return current value of RTC counter in microseconds - */ -uint64_t esp_rtc_get_time_us(void); - -#ifdef __cplusplus -} -#endif +#include "esp_rtc_time.h" +#warning "Header file is deprecated, please include esp_rtc_time.h instead" diff --git a/components/esp_hw_support/test_apps/rtc_clk/main/test_rtc_clk.c b/components/esp_hw_support/test_apps/rtc_clk/main/test_rtc_clk.c index 49a7dc8dd3..e24eaf71c6 100644 --- a/components/esp_hw_support/test_apps/rtc_clk/main/test_rtc_clk.c +++ b/components/esp_hw_support/test_apps/rtc_clk/main/test_rtc_clk.c @@ -29,22 +29,9 @@ #include "esp_system.h" #include "esp_private/esp_clk.h" -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rtc.h" -#include "esp32/rom/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rtc.h" -#include "esp32s2/rom/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rtc.h" -#include "esp32s3/rom/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rtc.h" -#include "esp32c3/rom/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rtc.h" -#include "esp32c2/rom/rtc.h" -#endif +#include "esp_rtc_time.h" +#include "rom/rtc.h" + // ESP32C2 does not support SLOW_CLK_32K_XTAL, so no need to test related test cases // Please notice this when enabling the rtc_clk test for ESP32C2! diff --git a/components/esp_system/port/cpu_start.c b/components/esp_system/port/cpu_start.c index 7d78e485a2..c6dacb0db4 100644 --- a/components/esp_system/port/cpu_start.c +++ b/components/esp_system/port/cpu_start.c @@ -25,16 +25,13 @@ #if CONFIG_IDF_TARGET_ESP32 #include "soc/dport_reg.h" -#include "esp32/rtc.h" #include "esp32/rom/cache.h" #include "esp32/rom/secure_boot.h" #elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rtc.h" #include "esp32s2/rom/cache.h" #include "esp32s2/rom/secure_boot.h" #include "esp32s2/memprot.h" #elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rtc.h" #include "esp32s3/rom/cache.h" #include "esp32s3/rom/secure_boot.h" #include "esp_memprot.h" @@ -42,39 +39,32 @@ #include "soc/system_reg.h" #include "esp32s3/rom/opi_flash.h" #elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rtc.h" #include "esp32c3/rom/cache.h" #include "esp32c3/rom/secure_boot.h" #include "esp_memprot.h" #elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rtc.h" #include "esp32c6/rom/cache.h" #include "esp_memprot.h" #elif CONFIG_IDF_TARGET_ESP32C61 -#include "esp32c61/rtc.h" #include "esp_memprot.h" #elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rtc.h" #include "esp32c5/rom/cache.h" #include "esp_memprot.h" #elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rtc.h" #include "esp32h2/rom/cache.h" #include "esp_memprot.h" #elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rtc.h" #include "esp32c2/rom/cache.h" -#include "esp32c2/rom/rtc.h" #include "esp32c2/rom/secure_boot.h" #elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rtc.h" #include "soc/hp_sys_clkrst_reg.h" #elif CONFIG_IDF_TARGET_ESP32H21 -#include "esp32h21/rtc.h" #include "esp_memprot.h" #endif #include "esp_private/rtc_clk.h" +#include "esp_rtc_time.h" +#include "rom/rtc.h" #if SOC_INT_CLIC_SUPPORTED #include "hal/interrupt_clic_ll.h" diff --git a/components/esp_system/system_time.c b/components/esp_system/system_time.c index 2d5eb4d1b9..8a803e5042 100644 --- a/components/esp_system/system_time.c +++ b/components/esp_system/system_time.c @@ -13,30 +13,7 @@ #include "sdkconfig.h" -//TODO: IDF-9526, refactor this -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C61 -#include "esp32c61/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H21 -#include "esp32h21/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rtc.h" -#endif +#include "esp_rtc_time.h" #include "esp_private/startup_internal.h" diff --git a/components/esp_timer/src/ets_timer_legacy.c b/components/esp_timer/src/ets_timer_legacy.c index fc9a17e335..2e8a024473 100644 --- a/components/esp_timer/src/ets_timer_legacy.c +++ b/components/esp_timer/src/ets_timer_legacy.c @@ -22,31 +22,8 @@ #include "sdkconfig.h" #include "esp_timer.h" -//TODO: IDF-9526, refactor this // for ETSTimer type -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32C61 -#include "esp32c61/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32H21 -#include "esp32h21/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rom/ets_sys.h" -#endif +#include "rom/ets_sys.h" /* We abuse 'timer_arg' field of ETSTimer structure to hold a pointer to esp_timer */ #define ESP_TIMER(p_ets_timer) ((esp_timer_handle_t) (p_ets_timer)->timer_arg) diff --git a/components/esp_timer/src/system_time.c b/components/esp_timer/src/system_time.c index fba5fe4af1..e9f4c52dc0 100644 --- a/components/esp_timer/src/system_time.c +++ b/components/esp_timer/src/system_time.c @@ -16,31 +16,7 @@ #include "esp_log.h" #include "esp_private/startup_internal.h" - -//TODO: IDF-9526, refactor this -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C61 -#include "esp32c61/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H21 -#include "esp32h21/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rtc.h" -#endif +#include "esp_rtc_time.h" __attribute__((unused)) static const char* TAG = "system_time"; diff --git a/components/heap/port/memory_layout_utils.c b/components/heap/port/memory_layout_utils.c index 3de9f6db22..f24fdebf00 100644 --- a/components/heap/port/memory_layout_utils.c +++ b/components/heap/port/memory_layout_utils.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -11,23 +11,7 @@ #include "esp_rom_caps.h" #if ESP_ROM_HAS_LAYOUT_TABLE -#ifdef CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32C61 //TODO: IDF-9526, refactor this -#include "esp32c61/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rom/rom_layout.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rom/rom_layout.h" -#endif +#include "rom/rom_layout.h" #endif // ESP_ROM_HAS_LAYOUT_TABLE static const char *TAG = "memory_layout"; diff --git a/components/newlib/src/port/esp_time_impl.c b/components/newlib/src/port/esp_time_impl.c index 276b6aae76..2552240a22 100644 --- a/components/newlib/src/port/esp_time_impl.c +++ b/components/newlib/src/port/esp_time_impl.c @@ -20,38 +20,8 @@ #include "esp_time_impl.h" #include "sdkconfig.h" - -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rom/rtc.h" -#include "esp32/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rom/rtc.h" -#include "esp32s2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rom/rtc.h" -#include "esp32s3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rom/rtc.h" -#include "esp32c3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rom/rtc.h" -#include "esp32c2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rom/rtc.h" -#include "esp32c6/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C61 //TODO: IDF-9526, refactor this -#include "esp32c61/rom/rtc.h" -#include "esp32c61/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rom/rtc.h" -#include "esp32c5/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rom/rtc.h" -#include "esp32h2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rom/rtc.h" -#include "esp32p4/rtc.h" -#endif +#include "rom/rtc.h" +#include "esp_rtc_time.h" // Offset between High resolution timer and the RTC. // Initialized after reset or light sleep. diff --git a/components/newlib/test_apps/newlib/main/test_time.c b/components/newlib/test_apps/newlib/main/test_time.c index 3c8929a650..43a48600d7 100644 --- a/components/newlib/test_apps/newlib/main/test_time.c +++ b/components/newlib/test_apps/newlib/main/test_time.c @@ -27,27 +27,7 @@ #include "esp_private/system_internal.h" #include "esp_private/esp_clk.h" -#if CONFIG_IDF_TARGET_ESP32 -#include "esp32/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C61 -#include "esp32c61/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32C5 -#include "esp32c5/rtc.h" -#endif +#include "esp_rtc_time.h" #if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE #include "hal/cache_ll.h" diff --git a/components/spi_flash/cache_utils.c b/components/spi_flash/cache_utils.c index 23553030bd..36c9d90b25 100644 --- a/components/spi_flash/cache_utils.c +++ b/components/spi_flash/cache_utils.c @@ -9,43 +9,18 @@ #include #include -#include -#include -#include +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/semphr.h" +#include "rom/cache.h" + #if CONFIG_IDF_TARGET_ESP32 #include "soc/dport_reg.h" -#include -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "esp32s2/rom/cache.h" +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C6 #include "soc/extmem_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rom/cache.h" -#include "soc/extmem_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32C3 -#include "esp32c3/rom/cache.h" -#include "soc/extmem_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32C2 -#include "esp32c2/rom/cache.h" -#include "soc/extmem_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32C6 -#include "esp32c6/rom/cache.h" -#include "soc/extmem_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32C61 //TODO: IDF-9526, refactor this -#include "esp32c61/rom/cache.h" -#include "soc/cache_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32H2 -#include "esp32h2/rom/cache.h" -#include "soc/extmem_reg.h" -#include "soc/ext_mem_defs.h" -#elif CONFIG_IDF_TARGET_ESP32P4 -#include "esp32p4/rom/cache.h" #endif + +#include "soc/ext_mem_defs.h" #include "esp_rom_spiflash.h" #include "hal/cache_hal.h" #include "hal/cache_ll.h" diff --git a/docs/en/migration-guides/index.rst b/docs/en/migration-guides/index.rst index 56923d0feb..abf4d932c9 100644 --- a/docs/en/migration-guides/index.rst +++ b/docs/en/migration-guides/index.rst @@ -14,3 +14,4 @@ ESP-IDF 5.x Migration Guide release-5.x/5.2/index release-5.x/5.3/index release-5.x/5.4/index + release-5.x/5.5/index diff --git a/docs/en/migration-guides/release-5.x/5.5/index.rst b/docs/en/migration-guides/release-5.x/5.5/index.rst new file mode 100644 index 0000000000..82020ac192 --- /dev/null +++ b/docs/en/migration-guides/release-5.x/5.5/index.rst @@ -0,0 +1,9 @@ +Migration from 5.5 to 5.5 +------------------------- + +:link_to_translation:`zh_CN:[中文]` + +.. toctree:: + :maxdepth: 1 + + system diff --git a/docs/en/migration-guides/release-5.x/5.5/system.rst b/docs/en/migration-guides/release-5.x/5.5/system.rst new file mode 100644 index 0000000000..7f5bea0dc2 --- /dev/null +++ b/docs/en/migration-guides/release-5.x/5.5/system.rst @@ -0,0 +1,9 @@ +System +====== + +:link_to_translation:`en:[English]` + +Time +----------------------- + +* ``{IDF_TARGET_NAME}/rtc.h`` is deprecated, include the replacement ``esp_rtc_time.h`` instead. diff --git a/docs/zh_CN/migration-guides/index.rst b/docs/zh_CN/migration-guides/index.rst index d0cc1d0f12..4d522eeea1 100644 --- a/docs/zh_CN/migration-guides/index.rst +++ b/docs/zh_CN/migration-guides/index.rst @@ -14,3 +14,4 @@ release-5.x/5.2/index release-5.x/5.3/index release-5.x/5.4/index + release-5.x/5.5/index diff --git a/docs/zh_CN/migration-guides/release-5.x/5.5/index.rst b/docs/zh_CN/migration-guides/release-5.x/5.5/index.rst new file mode 100644 index 0000000000..23667d8d43 --- /dev/null +++ b/docs/zh_CN/migration-guides/release-5.x/5.5/index.rst @@ -0,0 +1,9 @@ +Migration from 5.5 to 5.5 +------------------------- + +:link_to_translation:`en:[English]` + +.. toctree:: + :maxdepth: 1 + + system diff --git a/docs/zh_CN/migration-guides/release-5.x/5.5/system.rst b/docs/zh_CN/migration-guides/release-5.x/5.5/system.rst new file mode 100644 index 0000000000..45d8744cb8 --- /dev/null +++ b/docs/zh_CN/migration-guides/release-5.x/5.5/system.rst @@ -0,0 +1,9 @@ +系统 +====== + +:link_to_translation:`zh_CN:[中文]` + +系统时间 +----------------------- + +* ``{IDF_TARGET_NAME}/rtc.h`` 已弃用,应使用 ``esp_rtc_time.h`` 替代。