Browse Source

esp_hw_support: Removed deprecated CPU util functions

The following files were deleted:
- components/esp_hw_support/include/soc/cpu.h
- components/soc/esp32s3/include/soc/cpu.h

The following functions are deprecated:
- get_sp()

The following functions declared in soc/cpu.h are now moved to esp_cpu.h:
- esp_cpu_configure_region_protection()

The following functions declared in soc/cpu.h are now moved to components/xtensa/include/esp_cpu_utils.h:
- esp_cpu_process_stack_pc()

All files with soc/cpu.h inclusion are updated to include esp_cpu.h instead.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
Sudeep Mohanty 4 năm trước cách đây
mục cha
commit
e22b4007d3
67 tập tin đã thay đổi với 128 bổ sung367 xóa
  1. 0 1
      components/app_trace/gcov/gcov_rtio.c
  2. 0 1
      components/app_trace/test/test_trace.c
  3. 1 1
      components/bootloader_support/src/bootloader_init.c
  4. 1 1
      components/bootloader_support/src/bootloader_mem.c
  5. 1 1
      components/bootloader_support/src/bootloader_utility.c
  6. 1 1
      components/bootloader_support/src/esp32/bootloader_esp32.c
  7. 1 1
      components/bootloader_support/src/esp32c3/bootloader_esp32c3.c
  8. 1 1
      components/bootloader_support/src/esp32h2/bootloader_esp32h2.c
  9. 1 1
      components/bootloader_support/src/esp32s2/bootloader_esp32s2.c
  10. 1 1
      components/bootloader_support/src/esp32s3/bootloader_esp32s3.c
  11. 1 1
      components/bootloader_support/src/esp8684/bootloader_esp8684.c
  12. 1 1
      components/bootloader_support/src/esp_image_format.c
  13. 5 14
      components/esp_gdbstub/riscv/gdbstub_riscv.c
  14. 6 14
      components/esp_gdbstub/xtensa/gdbstub_xtensa.c
  15. 4 4
      components/esp_hw_support/cpu_util.c
  16. 10 4
      components/esp_hw_support/include/esp_cpu.h
  17. 1 1
      components/esp_hw_support/include/soc/compare_set.h
  18. 0 58
      components/esp_hw_support/include/soc/cpu.h
  19. 0 1
      components/esp_hw_support/include/soc/spinlock.h
  20. 1 1
      components/esp_hw_support/port/esp32c3/cpu_util_esp32c3.c
  21. 1 1
      components/esp_hw_support/port/esp32h2/cpu_util_esp32h2.c
  22. 1 1
      components/esp_hw_support/port/esp32s2/memprot.c
  23. 1 1
      components/esp_hw_support/port/esp8684/cpu_util_esp8684.c
  24. 0 1
      components/esp_hw_support/sleep_modes.c
  25. 0 1
      components/esp_hw_support/test/test_dport.c
  26. 0 1
      components/esp_hw_support/test/test_fp.c
  27. 1 1
      components/esp_system/esp_system.c
  28. 1 1
      components/esp_system/panic.c
  29. 6 14
      components/esp_system/port/arch/xtensa/debug_helpers.c
  30. 0 1
      components/esp_system/port/arch/xtensa/esp_ipc_isr.c
  31. 1 1
      components/esp_system/port/brownout.c
  32. 1 1
      components/esp_system/port/cpu_start.c
  33. 1 1
      components/esp_system/port/panic_handler.c
  34. 1 1
      components/esp_system/port/soc/esp32/system_internal.c
  35. 1 1
      components/esp_system/port/soc/esp32c3/system_internal.c
  36. 1 1
      components/esp_system/port/soc/esp32h2/system_internal.c
  37. 6 14
      components/esp_system/port/soc/esp32s2/system_internal.c
  38. 6 14
      components/esp_system/port/soc/esp32s3/system_internal.c
  39. 1 1
      components/esp_system/port/soc/esp8684/system_internal.c
  40. 5 14
      components/espcoredump/include_core_dump/esp_core_dump_common.h
  41. 5 14
      components/espcoredump/include_core_dump/esp_core_dump_port.h
  42. 6 14
      components/espcoredump/src/core_dump_common.c
  43. 1 0
      components/espcoredump/src/port/xtensa/core_dump_port.c
  44. 0 1
      components/freertos/FreeRTOS-Kernel/portable/port_systick.c
  45. 0 1
      components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h
  46. 1 1
      components/freertos/FreeRTOS-Kernel/portable/riscv/port.c
  47. 0 1
      components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h
  48. 2 1
      components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c
  49. 0 1
      components/freertos/test/test_float_in_isr.c
  50. 0 1
      components/freertos/test/test_freertos_scheduling_time.c
  51. 0 1
      components/freertos/test/test_isr_latency.c
  52. 0 1
      components/freertos/test/test_preemption.c
  53. 0 1
      components/freertos/test/test_spinlocks.c
  54. 0 1
      components/freertos/test/test_suspend_scheduler.c
  55. 0 1
      components/freertos/test/test_task_suspend_resume.c
  56. 1 1
      components/freertos/test/test_tasks_snapshot.c
  57. 0 1
      components/mbedtls/port/aes/block/esp_aes.c
  58. 0 1
      components/mbedtls/test/test_aes_sha_rsa.c
  59. 0 1
      components/newlib/locks.c
  60. 0 131
      components/soc/esp32s3/include/soc/cpu.h
  61. 1 0
      components/spi_flash/cache_utils.c
  62. 0 1
      components/unity/unity_port_esp32.c
  63. 1 1
      components/vfs/vfs_semihost.c
  64. 0 1
      components/wear_levelling/test_apps/main/test_wl.c
  65. 34 0
      components/xtensa/include/esp_cpu_utils.h
  66. 4 0
      docs/en/migration-guides/system.rst
  67. 0 8
      tools/ci/check_copyright_ignore.txt

+ 0 - 1
components/app_trace/gcov/gcov_rtio.c

@@ -11,7 +11,6 @@
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/semphr.h"
-#include "soc/cpu.h"
 #include "soc/timer_periph.h"
 #include "esp_app_trace.h"
 #include "esp_freertos_hooks.h"

+ 0 - 1
components/app_trace/test/test_trace.c

@@ -11,7 +11,6 @@
 #include "unity.h"
 #include "driver/timer.h"
 #include "esp_rom_sys.h"
-#include "soc/cpu.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/semphr.h"
 #include "freertos/task.h"

+ 1 - 1
components/bootloader_support/src/bootloader_init.c

@@ -15,7 +15,7 @@
 #include "bootloader_clock.h"
 #include "bootloader_common.h"
 #include "esp_flash_encrypt.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "hal/wdt_hal.h"
 

+ 1 - 1
components/bootloader_support/src/bootloader_mem.c

@@ -11,7 +11,7 @@
 #include "hal/mpu_types.h"
 #include "soc/soc_caps.h"
 #include "bootloader_mem.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 
 void bootloader_init_mem(void)
 {

+ 1 - 1
components/bootloader_support/src/bootloader_utility.c

@@ -70,7 +70,7 @@
 #endif
 
 #include "soc/soc.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/gpio_periph.h"
 #include "soc/efuse_periph.h"

+ 1 - 1
components/bootloader_support/src/esp32/bootloader_esp32.c

@@ -18,7 +18,7 @@
 #include "bootloader_console.h"
 #include "bootloader_flash_priv.h"
 
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/dport_reg.h"
 #include "soc/efuse_reg.h"
 #include "soc/gpio_periph.h"

+ 1 - 1
components/bootloader_support/src/esp32c3/bootloader_esp32c3.c

@@ -17,7 +17,7 @@
 #include "soc/gpio_sig_map.h"
 #include "soc/io_mux_reg.h"
 #include "soc/assist_debug_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/spi_periph.h"
 #include "soc/extmem_reg.h"

+ 1 - 1
components/bootloader_support/src/esp32h2/bootloader_esp32h2.c

@@ -17,7 +17,7 @@
 #include "soc/gpio_sig_map.h"
 #include "soc/io_mux_reg.h"
 #include "soc/assist_debug_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/spi_periph.h"
 #include "soc/extmem_reg.h"

+ 1 - 1
components/bootloader_support/src/esp32s2/bootloader_esp32s2.c

@@ -30,7 +30,7 @@
 #include "esp_image_format.h"
 #include "flash_qio_mode.h"
 #include "soc/assist_debug_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/dport_reg.h"
 #include "soc/extmem_reg.h"
 #include "soc/rtc.h"

+ 1 - 1
components/bootloader_support/src/esp32s3/bootloader_esp32s3.c

@@ -13,7 +13,7 @@
 #include "soc/gpio_sig_map.h"
 #include "soc/io_mux_reg.h"
 #include "soc/assist_debug_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/dport_reg.h"
 #include "soc/rtc.h"
 #include "soc/rtc_cntl_reg.h"

+ 1 - 1
components/bootloader_support/src/esp8684/bootloader_esp8684.c

@@ -17,7 +17,7 @@
 #include "soc/gpio_sig_map.h"
 #include "soc/io_mux_reg.h"
 #include "soc/assist_debug_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/spi_periph.h"
 #include "soc/extmem_reg.h"

+ 1 - 1
components/bootloader_support/src/esp_image_format.c

@@ -5,7 +5,7 @@
  */
 #include <string.h>
 #include <sys/param.h>
-#include <soc/cpu.h>
+#include <esp_cpu.h>
 #include <bootloader_utility.h>
 #include <esp_secure_boot.h>
 #include <esp_fault.h>

+ 5 - 14
components/esp_gdbstub/riscv/gdbstub_riscv.c

@@ -1,21 +1,12 @@
-// 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-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 #include <string.h>
 #include "esp_gdbstub.h"
 #include "esp_gdbstub_common.h"
-#include "soc/cpu.h"
 #include "sdkconfig.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"

+ 6 - 14
components/esp_gdbstub/xtensa/gdbstub_xtensa.c

@@ -1,20 +1,12 @@
-// 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-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 #include <string.h>
 #include "esp_gdbstub_common.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/soc_memory_layout.h"
 #include "xtensa/config/specreg.h"
 #include "sdkconfig.h"

+ 4 - 4
components/esp_hw_support/cpu_util.c

@@ -5,7 +5,7 @@
  */
 
 #include "esp_attr.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/soc.h"
 #include "soc/rtc_periph.h"
 #include "sdkconfig.h"
@@ -46,13 +46,13 @@ esp_err_t IRAM_ATTR esp_cpu_set_watchpoint(int no, void *adr, int size, int flag
 
     switch (flags)
     {
-    case ESP_WATCHPOINT_LOAD:
+    case ESP_CPU_WATCHPOINT_LOAD:
         trigger = WATCHPOINT_TRIGGER_ON_RO;
         break;
-    case ESP_WATCHPOINT_STORE:
+    case ESP_CPU_WATCHPOINT_STORE:
         trigger = WATCHPOINT_TRIGGER_ON_WO;
         break;
-    case ESP_WATCHPOINT_ACCESS:
+    case ESP_CPU_WATCHPOINT_ACCESS:
         trigger = WATCHPOINT_TRIGGER_ON_RW;
         break;
     default:

+ 10 - 4
components/esp_hw_support/include/esp_cpu.h

@@ -17,9 +17,9 @@
 extern "C" {
 #endif
 
-#define ESP_WATCHPOINT_LOAD 0x40000000
-#define ESP_WATCHPOINT_STORE 0x80000000
-#define ESP_WATCHPOINT_ACCESS 0xC0000000
+#define ESP_CPU_WATCHPOINT_LOAD 0x40000000
+#define ESP_CPU_WATCHPOINT_STORE 0x80000000
+#define ESP_CPU_WATCHPOINT_ACCESS 0xC0000000
 
 typedef uint32_t esp_cpu_ccount_t;
 
@@ -68,6 +68,12 @@ static inline void esp_cpu_set_ccount(esp_cpu_ccount_t val)
     cpu_hal_set_cycle_count(val);
 }
 
+/**
+ * @brief Configure CPU to disable access to invalid memory regions
+ *
+ */
+void esp_cpu_configure_region_protection(void);
+
 /**
  * @brief Set a watchpoint to break/panic when a certain memory range is accessed.
  *
@@ -75,7 +81,7 @@ static inline void esp_cpu_set_ccount(esp_cpu_ccount_t val)
  * @param adr Base address to watch
  * @param size Size of the region, starting at the base address, to watch. Must
  *             be one of 2^n, with n in [0..6].
- * @param flags One of ESP_WATCHPOINT_* flags
+ * @param flags One of ESP_CPU_WATCHPOINT_* flags
  *
  * @return ESP_ERR_INVALID_ARG on invalid arg, ESP_OK otherwise
  *

+ 1 - 1
components/esp_hw_support/include/soc/compare_set.h

@@ -8,7 +8,7 @@
 
 #include <stdint.h>
 #include <stdbool.h>
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/soc_memory_types.h"
 
 #if __XTENSA__

+ 0 - 58
components/esp_hw_support/include/soc/cpu.h

@@ -1,58 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2010-2021 Espressif Systems (Shanghai) CO LTD
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-
-#ifndef _SOC_CPU_H
-#define _SOC_CPU_H
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <stddef.h>
-
-#include "esp_cpu.h"
-
-#if __XTENSA__
-#include "xt_instr_macros.h"
-// [refactor-todo] not actually needed in this header now,
-// but kept for compatibility
-#include "xtensa/corebits.h"
-#include "xtensa/config/core.h"
-
-#include "xtensa/config/specreg.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @brief Read current stack pointer address.
- * Superseded by esp_cpu_get_sp in esp_cpu.h.
- */
-static inline __attribute__((deprecated)) void *get_sp(void)
-{
-    return esp_cpu_get_sp();
-}
-
-static inline uint32_t esp_cpu_process_stack_pc(uint32_t pc)
-{
-    if (pc & 0x80000000) {
-        //Top two bits of a0 (return address) specify window increment. Overwrite to map to address space.
-        pc = (pc & 0x3fffffff) | 0x40000000;
-    }
-    //Minus 3 to get PC of previous instruction (i.e. instruction executed before return address)
-    return pc - 3;
-}
-
-/**
- * @brief Configure CPU to disable access to invalid memory regions
- *
- */
-void esp_cpu_configure_region_protection(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif

+ 0 - 1
components/esp_hw_support/include/soc/spinlock.h

@@ -8,7 +8,6 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include "sdkconfig.h"
-#include "soc/cpu.h"
 #include "hal/cpu_hal.h"
 #include "soc/compare_set.h"
 

+ 1 - 1
components/esp_hw_support/port/esp32c3/cpu_util_esp32c3.c

@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 #include <assert.h>
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 
 void esp_cpu_configure_region_protection(void)
 {

+ 1 - 1
components/esp_hw_support/port/esp32h2/cpu_util_esp32h2.c

@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 #include <assert.h>
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 
 void esp_cpu_configure_region_protection(void)
 {

+ 1 - 1
components/esp_hw_support/port/esp32s2/memprot.c

@@ -18,7 +18,7 @@
 #include "hal/memprot_peri_ll.h"
 #include "esp32s2/memprot.h"
 #include "esp_fault.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "esp32s2/rom/ets_sys.h"
 
 extern int _iram_text_end;

+ 1 - 1
components/esp_hw_support/port/esp8684/cpu_util_esp8684.c

@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 #include <assert.h>
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 
 void esp_cpu_configure_region_protection(void)
 {

+ 0 - 1
components/esp_hw_support/sleep_modes.c

@@ -25,7 +25,6 @@
 
 #include "driver/uart.h"
 
-#include "soc/cpu.h"
 #include "soc/rtc.h"
 #include "soc/soc_caps.h"
 

+ 0 - 1
components/esp_hw_support/test/test_dport.c

@@ -17,7 +17,6 @@
 #include "freertos/task.h"
 #include "freertos/semphr.h"
 #include "freertos/xtensa_timer.h"
-#include "soc/cpu.h"
 #include "unity.h"
 #include "test_utils.h"
 #include "esp_rom_uart.h"

+ 0 - 1
components/esp_hw_support/test/test_fp.c

@@ -9,7 +9,6 @@
 
 #include <math.h>
 #include <stdio.h>
-#include "soc/cpu.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/semphr.h"

+ 1 - 1
components/esp_system/esp_system.c

@@ -9,7 +9,7 @@
 #include "esp_heap_caps.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/rtc_cntl_reg.h"
 #include "esp_private/panic_internal.h"

+ 1 - 1
components/esp_system/panic.c

@@ -13,7 +13,7 @@
 #include "esp_private/usb_console.h"
 #include "esp_ota_ops.h"
 
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "hal/timer_hal.h"
 #include "hal/cpu_hal.h"

+ 6 - 14
components/esp_system/port/arch/xtensa/debug_helpers.c

@@ -1,16 +1,8 @@
-// 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-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 #include <string.h>
 
@@ -20,7 +12,7 @@
 #include "esp_err.h"
 #include "esp_debug_helpers.h"
 #include "soc/soc_memory_layout.h"
-#include "soc/cpu.h"
+#include "esp_cpu_utils.h"
 #include "esp_private/panic_internal.h"
 
 #include "xtensa/xtensa_context.h"

+ 0 - 1
components/esp_system/port/arch/xtensa/esp_ipc_isr.c

@@ -10,7 +10,6 @@
 #include <assert.h>
 #include "esp_err.h"
 #include "esp_attr.h"
-#include "soc/cpu.h"
 #include "soc/soc.h"
 #include "soc/dport_access.h"
 #ifdef CONFIG_IDF_TARGET_ESP32

+ 1 - 1
components/esp_system/port/brownout.c

@@ -15,7 +15,7 @@
 #include "esp_rom_sys.h"
 
 #include "soc/soc.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc_periph.h"
 #include "hal/cpu_hal.h"
 

+ 1 - 1
components/esp_system/port/cpu_start.c

@@ -74,7 +74,7 @@
 #include "soc/rtc.h"
 #include "soc/efuse_reg.h"
 #include "soc/periph_defs.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/spinlock.h"
 

+ 1 - 1
components/esp_system/port/panic_handler.c

@@ -11,7 +11,7 @@
 #include "esp_private/system_internal.h"
 
 #include "soc/soc_memory_layout.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/soc_caps.h"
 #include "soc/rtc.h"
 

+ 1 - 1
components/esp_system/port/soc/esp32/system_internal.c

@@ -18,7 +18,7 @@
 #include "soc/efuse_periph.h"
 #include "soc/rtc_periph.h"
 #include "soc/timer_periph.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "hal/wdt_hal.h"
 #include "hal/cpu_hal.h"

+ 1 - 1
components/esp_system/port/soc/esp32c3/system_internal.c

@@ -17,7 +17,7 @@
 #include "soc/gpio_reg.h"
 #include "soc/rtc_cntl_reg.h"
 #include "soc/timer_group_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/rtc_periph.h"
 #include "soc/syscon_reg.h"

+ 1 - 1
components/esp_system/port/soc/esp32h2/system_internal.c

@@ -17,7 +17,7 @@
 #include "soc/gpio_reg.h"
 #include "soc/rtc_cntl_reg.h"
 #include "soc/timer_group_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/rtc_periph.h"
 #include "soc/syscon_reg.h"

+ 6 - 14
components/esp_system/port/soc/esp32s2/system_internal.c

@@ -1,16 +1,8 @@
-// Copyright 2018 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: 2018-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 #include <string.h>
 #include "sdkconfig.h"
@@ -25,7 +17,7 @@
 #include "soc/gpio_reg.h"
 #include "soc/rtc_cntl_reg.h"
 #include "soc/timer_group_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/syscon_reg.h"
 #include "soc/rtc_periph.h"

+ 6 - 14
components/esp_system/port/soc/esp32s3/system_internal.c

@@ -1,17 +1,9 @@
 
-// Copyright 2018 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: 2018-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 #include <string.h>
 #include "sdkconfig.h"
@@ -24,7 +16,7 @@
 #include "soc/gpio_reg.h"
 #include "soc/rtc_cntl_reg.h"
 #include "soc/timer_group_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/syscon_reg.h"
 #include "soc/rtc_periph.h"

+ 1 - 1
components/esp_system/port/soc/esp8684/system_internal.c

@@ -17,7 +17,7 @@
 #include "soc/gpio_reg.h"
 #include "soc/rtc_cntl_reg.h"
 #include "soc/timer_group_reg.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "soc/rtc.h"
 #include "soc/rtc_periph.h"
 #include "soc/syscon_reg.h"

+ 5 - 14
components/espcoredump/include_core_dump/esp_core_dump_common.h

@@ -1,21 +1,12 @@
-// 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-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 #ifndef ESP_CORE_DUMP_COMMON_H_
 #define ESP_CORE_DUMP_COMMON_H_
 
 #include "freertos/FreeRTOS.h"
-#include "soc/cpu.h"
 #include "esp_debug_helpers.h"
 #include "esp_app_format.h"
 #include "esp_core_dump_types.h"

+ 5 - 14
components/espcoredump/include_core_dump/esp_core_dump_port.h

@@ -1,16 +1,8 @@
-// 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-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 #ifndef ESP_CORE_DUMP_PORT_H_
 #define ESP_CORE_DUMP_PORT_H_
 
@@ -26,7 +18,6 @@
 
 #include "sdkconfig.h"
 #include "freertos/FreeRTOS.h"
-#include "soc/cpu.h"
 #include "esp_debug_helpers.h"
 #include "esp_app_format.h"
 #include "esp_core_dump_types.h"

+ 6 - 14
components/espcoredump/src/core_dump_common.c

@@ -1,16 +1,8 @@
-// Copyright 2015-2020 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-2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 #include <string.h>
 #include <stdbool.h>
 #include "sdkconfig.h"
@@ -128,7 +120,7 @@ FORCE_INLINE_ATTR void esp_core_dump_setup_stack(void)
     if (esp_core_dump_in_isr_context()) {
         uint8_t* topStack = esp_core_dump_get_isr_stack_top();
         esp_cpu_clear_watchpoint(1);
-        esp_cpu_set_watchpoint(1, topStack+xPortGetCoreID()*configISR_STACK_SIZE, 1, ESP_WATCHPOINT_STORE);
+        esp_cpu_set_watchpoint(1, topStack+xPortGetCoreID()*configISR_STACK_SIZE, 1, ESP_CPU_WATCHPOINT_STORE);
     } else {
         /* for tasks user should enable stack overflow detection in menuconfig
         TODO: if not enabled in menuconfig enable it ourselves */

+ 1 - 0
components/espcoredump/src/port/xtensa/core_dump_port.c

@@ -19,6 +19,7 @@
 #include "esp_core_dump_common.h"
 #include "esp_core_dump_port.h"
 #include "esp_debug_helpers.h"
+#include "esp_cpu_utils.h"
 
 const static DRAM_ATTR char TAG[] __attribute__((unused)) = "esp_core_dump_port";
 

+ 0 - 1
components/freertos/FreeRTOS-Kernel/portable/port_systick.c

@@ -6,7 +6,6 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include "soc/cpu.h"
 #include "FreeRTOS.h"
 #include "task.h"
 #include "esp_intr_alloc.h"

+ 0 - 1
components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h

@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include "soc/spinlock.h"
 #include "soc/interrupt_core0_reg.h"
-#include "soc/cpu.h"
 #include "esp_attr.h"
 #include "esp_rom_sys.h"
 #include "esp_timer.h"              /* required for FreeRTOS run time stats */

+ 1 - 1
components/freertos/FreeRTOS-Kernel/portable/riscv/port.c

@@ -394,7 +394,7 @@ void vPortSetStackWatchpoint(void *pxStackStart)
 {
     uint32_t addr = (uint32_t)pxStackStart;
     addr = (addr + (STACK_WATCH_AREA_SIZE - 1)) & (~(STACK_WATCH_AREA_SIZE - 1));
-    esp_cpu_set_watchpoint(STACK_WATCH_POINT_NUMBER, (char *)addr, STACK_WATCH_AREA_SIZE, ESP_WATCHPOINT_STORE);
+    esp_cpu_set_watchpoint(STACK_WATCH_POINT_NUMBER, (char *)addr, STACK_WATCH_AREA_SIZE, ESP_CPU_WATCHPOINT_STORE);
 }
 
 

+ 0 - 1
components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h

@@ -54,7 +54,6 @@
 #include <limits.h>
 #include <xtensa/config/system.h>
 #include <xtensa/xtensa_api.h>
-#include "soc/cpu.h"
 #ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
 #include "soc/soc_memory_layout.h"
 #endif

+ 2 - 1
components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c

@@ -67,6 +67,7 @@
 #include "FreeRTOS.h"        /* This pulls in portmacro.h */
 #include "task.h"            /* Required for TaskHandle_t, tskNO_AFFINITY, and vTaskStartScheduler */
 #include "port_systick.h"
+#include "esp_cpu.h"
 
 _Static_assert(tskNO_AFFINITY == CONFIG_FREERTOS_NO_AFFINITY, "incorrect tskNO_AFFINITY value");
 
@@ -417,7 +418,7 @@ void vPortSetStackWatchpoint( void *pxStackStart )
     //This way, we make sure we trigger before/when the stack canary is corrupted, not after.
     int addr = (int)pxStackStart;
     addr = (addr + 31) & (~31);
-    esp_cpu_set_watchpoint(STACK_WATCH_POINT_NUMBER, (char *)addr, 32, ESP_WATCHPOINT_STORE);
+    esp_cpu_set_watchpoint(STACK_WATCH_POINT_NUMBER, (char *)addr, 32, ESP_CPU_WATCHPOINT_STORE);
 }
 
 /* ---------------------------------------------- Misc Implementations -------------------------------------------------

+ 0 - 1
components/freertos/test/test_float_in_isr.c

@@ -7,7 +7,6 @@
 #include "freertos/queue.h"
 #include "esp_intr_alloc.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "test_utils.h"
 #include "math.h"
 

+ 0 - 1
components/freertos/test/test_freertos_scheduling_time.c

@@ -6,7 +6,6 @@
 #include "freertos/queue.h"
 #include "esp_intr_alloc.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "test_utils.h"
 
 #define NUMBER_OF_ITERATIONS 10

+ 0 - 1
components/freertos/test/test_isr_latency.c

@@ -7,7 +7,6 @@
 #include "freertos/queue.h"
 #include "esp_intr_alloc.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "test_utils.h"
 #if CONFIG_IDF_TARGET_ARCH_XTENSA
 #include "xtensa/hal.h"

+ 0 - 1
components/freertos/test/test_preemption.c

@@ -10,7 +10,6 @@
 #include "freertos/semphr.h"
 #include "freertos/queue.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "hal/cpu_hal.h"
 #include "test_utils.h"
 #include "sdkconfig.h"

+ 0 - 1
components/freertos/test/test_spinlocks.c

@@ -10,7 +10,6 @@
 #include "freertos/semphr.h"
 #include "freertos/queue.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "hal/cpu_hal.h"
 
 #include "test_utils.h"

+ 0 - 1
components/freertos/test/test_suspend_scheduler.c

@@ -6,7 +6,6 @@
 #include "freertos/semphr.h"
 #include "freertos/queue.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "test_utils.h"
 
 #include "driver/timer.h"

+ 0 - 1
components/freertos/test/test_task_suspend_resume.c

@@ -8,7 +8,6 @@
 #include "freertos/timers.h"
 #include "freertos/queue.h"
 #include "unity.h"
-#include "soc/cpu.h"
 #include "test_utils.h"
 
 #include "driver/timer.h"

+ 1 - 1
components/freertos/test/test_tasks_snapshot.c

@@ -3,7 +3,7 @@
 */
 
 #include <stdio.h>
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task_snapshot.h"
 #include "unity.h"

+ 0 - 1
components/mbedtls/port/aes/block/esp_aes.c

@@ -36,7 +36,6 @@
 
 #include <freertos/FreeRTOS.h>
 
-#include "soc/cpu.h"
 #include <stdio.h>
 #include "esp_private/periph_ctrl.h"
 

+ 0 - 1
components/mbedtls/test/test_aes_sha_rsa.c

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

+ 0 - 1
components/newlib/locks.c

@@ -8,7 +8,6 @@
 #include <stdlib.h>
 #include <sys/reent.h>
 #include "esp_attr.h"
-#include "soc/cpu.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/semphr.h"
 #include "freertos/task.h"

+ 0 - 131
components/soc/esp32s3/include/soc/cpu.h

@@ -1,131 +0,0 @@
-// Copyright 2010-2020 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.
-
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include "xtensa/corebits.h"
-
-/* C macros for xtensa special register read/write/exchange */
-
-#define RSR(reg, curval)  asm volatile ("rsr %0, " #reg : "=r" (curval));
-#define WSR(reg, newval)  asm volatile ("wsr %0, " #reg : : "r" (newval));
-#define XSR(reg, swapval) asm volatile ("xsr %0, " #reg : "+r" (swapval));
-
-/** @brief Read current stack pointer address
- *
- */
-static inline void *get_sp(void)
-{
-    void *sp;
-    asm volatile ("mov %0, sp;" : "=r" (sp));
-    return sp;
-}
-
-/* Functions to set page attributes for Region Protection option in the CPU.
- * See Xtensa ISA Reference manual for explanation of arguments (section 4.6.3.2).
- */
-
-static inline void cpu_write_dtlb(uint32_t vpn, unsigned attr)
-{
-    asm volatile ("wdtlb  %1, %0; dsync\n" :: "r" (vpn), "r" (attr));
-}
-
-
-static inline void cpu_write_itlb(unsigned vpn, unsigned attr)
-{
-    asm volatile ("witlb  %1, %0; isync\n" :: "r" (vpn), "r" (attr));
-}
-
-/**
- * @brief Configure memory region protection
- *
- * Make page 0 access raise an exception.
- * Also protect some other unused pages so we can catch weirdness.
- * Useful attribute values:
- * 0 — cached, RW
- * 2 — bypass cache, RWX (default value after CPU reset)
- * 15 — no access, raise exception
- */
-
-static inline void cpu_configure_region_protection(void)
-{
-    const uint32_t pages_to_protect[] = {0x00000000, 0x80000000, 0xa0000000, 0xc0000000, 0xe0000000};
-    for (int i = 0; i < sizeof(pages_to_protect) / sizeof(pages_to_protect[0]); ++i) {
-        cpu_write_dtlb(pages_to_protect[i], 0xf);
-        cpu_write_itlb(pages_to_protect[i], 0xf);
-    }
-    cpu_write_dtlb(0x20000000, 0);
-    cpu_write_itlb(0x20000000, 0);
-}
-
-/**
- * @brief Stall CPU using RTC controller
- * @param cpu_id ID of the CPU to stall (0 = PRO, 1 = APP)
- */
-void esp_cpu_stall(int cpu_id);
-
-/**
- * @brief Un-stall CPU using RTC controller
- * @param cpu_id ID of the CPU to un-stall (0 = PRO, 1 = APP)
- */
-void esp_cpu_unstall(int cpu_id);
-
-/**
- * @brief Reset CPU using RTC controller
- * @param cpu_id ID of the CPU to reset (0 = PRO, 1 = APP)
- */
-void esp_cpu_reset(int cpu_id);
-
-
-/**
- * @brief Returns true if a JTAG debugger is attached to CPU
- * OCD (on chip debug) port.
- *
- * @note If "Make exception and panic handlers JTAG/OCD aware"
- * is disabled, this function always returns false.
- */
-bool esp_cpu_in_ocd_debug_mode(void);
-
-/**
- * @brief Convert the PC register value to its true address
- *
- * The address of the current instruction is not stored as an exact uint32_t
- * representation in PC register. This function will convert the value stored in
- * the PC register to a uint32_t address.
- *
- * @param pc_raw The PC as stored in register format.
- *
- * @return Address in uint32_t format
- */
-static inline uint32_t esp_cpu_process_stack_pc(uint32_t pc)
-{
-    if (pc & 0x80000000) {
-        //Top two bits of a0 (return address) specify window increment. Overwrite to map to address space.
-        pc = (pc & 0x3fffffff) | 0x40000000;
-    }
-    //Minus 3 to get PC of previous instruction (i.e. instruction executed before return address)
-    return pc - 3;
-}
-
-typedef uint32_t esp_cpu_ccount_t;
-
-static inline esp_cpu_ccount_t esp_cpu_get_ccount(void)
-{
-    uint32_t result;
-    RSR(CCOUNT, result);
-    return result;
-}

+ 1 - 0
components/spi_flash/cache_utils.c

@@ -51,6 +51,7 @@
 #include "esp_intr_alloc.h"
 #include "esp_spi_flash.h"
 #include "esp_log.h"
+#include "esp_cpu.h"
 
 static __attribute__((unused)) const char *TAG = "cache";
 

+ 0 - 1
components/unity/unity_port_esp32.c

@@ -6,7 +6,6 @@
 #include <string.h>
 #include "unity.h"
 #include "sdkconfig.h"
-#include "soc/cpu.h"
 #include "hal/cpu_hal.h"
 #include "esp_rom_uart.h"
 #include "esp_private/esp_clk.h"

+ 1 - 1
components/vfs/vfs_semihost.c

@@ -7,7 +7,7 @@
 #include "esp_vfs.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
-#include "soc/cpu.h"
+#include "esp_cpu.h"
 #include <stdarg.h>
 #include <stdbool.h>
 #include <string.h>

+ 0 - 1
components/wear_levelling/test_apps/main/test_wl.c

@@ -11,7 +11,6 @@
 #include "freertos/task.h"
 #include "freertos/semphr.h"
 #include "esp_private/esp_clk.h"
-#include "soc/cpu.h"
 #include "sdkconfig.h"
 
 

+ 34 - 0
components/xtensa/include/esp_cpu_utils.h

@@ -0,0 +1,34 @@
+/*
+ * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifndef _ESP_CPU_UTILS_H
+#define _ESP_CPU_UTILS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Fetch the PC value of the previous instruction
+ *
+ * @param pc PC value of the current backtrace frame
+ *
+ */
+static inline uint32_t esp_cpu_process_stack_pc(uint32_t pc)
+{
+    if (pc & 0x80000000) {
+        //Top two bits of a0 (return address) specify window increment. Overwrite to map to address space.
+        pc = (pc & 0x3fffffff) | 0x40000000;
+    }
+    //Minus 3 to get PC of previous instruction (i.e. instruction executed before return address)
+    return pc - 3;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ESP_CPU_UTILS_H

+ 4 - 0
docs/en/migration-guides/system.rst

@@ -38,3 +38,7 @@ Tasks snapshot
 --------------
 
 The header ``task_snapshot.h`` has been removed from ``freertos/task.h``. ESP-IDF developers should include ``"freertos/task_snapshot.h``` in case they need tasks snapshot API.
+
+ESP HW Support
+--------------
+The header files ``soc/cpu.h`` have been deleted and deprecated CPU util functions have been removed. ESP-IDF developers should include ``esp_cpu.h`` instead for equivalent functions.

+ 0 - 8
tools/ci/check_copyright_ignore.txt

@@ -489,10 +489,8 @@ components/esp_gdbstub/esp_common/gdbstub_common.c
 components/esp_gdbstub/include/esp_gdbstub.h
 components/esp_gdbstub/private_include/esp_gdbstub_common.h
 components/esp_gdbstub/riscv/esp_gdbstub_arch.h
-components/esp_gdbstub/riscv/gdbstub_riscv.c
 components/esp_gdbstub/src/packet.c
 components/esp_gdbstub/xtensa/esp_gdbstub_arch.h
-components/esp_gdbstub/xtensa/gdbstub_xtensa.c
 components/esp_hid/include/esp_hid_common.h
 components/esp_hid/include/esp_hidd.h
 components/esp_hid/include/esp_hidd_gatts.h
@@ -776,7 +774,6 @@ components/esp_system/include/esp_private/usb_console.h
 components/esp_system/include/esp_task.h
 components/esp_system/include/esp_task_wdt.h
 components/esp_system/port/arch/riscv/expression_with_stack.c
-components/esp_system/port/arch/xtensa/debug_helpers.c
 components/esp_system/port/arch/xtensa/expression_with_stack.c
 components/esp_system/port/public_compat/brownout.h
 components/esp_system/port/public_compat/cache_err_int.h
@@ -796,11 +793,9 @@ components/esp_system/port/soc/esp32h2/reset_reason.c
 components/esp_system/port/soc/esp32s2/cache_err_int.c
 components/esp_system/port/soc/esp32s2/cache_err_int.h
 components/esp_system/port/soc/esp32s2/reset_reason.c
-components/esp_system/port/soc/esp32s2/system_internal.c
 components/esp_system/port/soc/esp32s2/usb_console.c
 components/esp_system/port/soc/esp32s3/cache_err_int.h
 components/esp_system/port/soc/esp32s3/reset_reason.c
-components/esp_system/port/soc/esp32s3/system_internal.c
 components/esp_system/port/soc/esp32s3/usb_console.c
 components/esp_system/stack_check.c
 components/esp_system/test/test_delay.c
@@ -851,14 +846,11 @@ components/espcoredump/include_core_dump/core_dump_binary.h
 components/espcoredump/include_core_dump/core_dump_checksum.h
 components/espcoredump/include_core_dump/core_dump_elf.h
 components/espcoredump/include_core_dump/elf.h
-components/espcoredump/include_core_dump/esp_core_dump_common.h
-components/espcoredump/include_core_dump/esp_core_dump_port.h
 components/espcoredump/include_core_dump/esp_core_dump_types.h
 components/espcoredump/include_core_dump/port/riscv/esp_core_dump_port_impl.h
 components/espcoredump/include_core_dump/port/xtensa/esp_core_dump_port_impl.h
 components/espcoredump/src/core_dump_binary.c
 components/espcoredump/src/core_dump_checksum.c
-components/espcoredump/src/core_dump_common.c
 components/espcoredump/src/core_dump_elf.c
 components/espcoredump/src/core_dump_flash.c
 components/espcoredump/src/core_dump_uart.c