Skip to content

Commit

Permalink
Merge branch 'bugfix/move_arch_files_system_cmake' into 'master'
Browse files Browse the repository at this point in the history
feat(esp-system): moved common arch files out to common cmakelist

See merge request espressif/esp-idf!25625
  • Loading branch information
ESP-Marius committed Aug 30, 2023
2 parents 91d7099 + 73954ab commit 4f71937
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 68 deletions.
23 changes: 23 additions & 0 deletions components/esp_system/port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ if(CONFIG_ESP_CONSOLE_USB_CDC)
list(APPEND srcs "usb_console.c")
endif()

if(CONFIG_ESP_IPC_ISR_ENABLE)
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND srcs "arch/xtensa/esp_ipc_isr.c"
"arch/xtensa/esp_ipc_isr_handler.S"
"arch/xtensa/esp_ipc_isr_routines.S")
endif()
endif()

if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND srcs "arch/xtensa/panic_arch.c"
"arch/xtensa/panic_handler_asm.S"
"arch/xtensa/expression_with_stack.c"
"arch/xtensa/expression_with_stack_asm.S"
"arch/xtensa/debug_helpers.c"
"arch/xtensa/debug_helpers_asm.S"
"arch/xtensa/debug_stubs.c"
"arch/xtensa/trax.c")
elseif(CONFIG_IDF_TARGET_ARCH_RISCV)
list(APPEND srcs "arch/riscv/expression_with_stack.c"
"arch/riscv/panic_arch.c"
"arch/riscv/debug_stubs.c")
endif()

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

target_sources(${COMPONENT_LIB} PRIVATE ${srcs})
Expand Down
17 changes: 1 addition & 16 deletions components/esp_system/port/soc/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,7 @@ set(srcs "highint_hdl.S"
"clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"../../arch/xtensa/panic_arch.c"
"../../arch/xtensa/panic_handler_asm.S"
"../../arch/xtensa/expression_with_stack.c"
"../../arch/xtensa/expression_with_stack_asm.S"
"../../arch/xtensa/debug_helpers.c"
"../../arch/xtensa/debug_helpers_asm.S"
"../../arch/xtensa/debug_stubs.c"
"../../arch/xtensa/trax.c"
)

if(CONFIG_ESP_IPC_ISR_ENABLE)
list(APPEND srcs "../../arch/xtensa/esp_ipc_isr.c"
"../../arch/xtensa/esp_ipc_isr_handler.S"
"../../arch/xtensa/esp_ipc_isr_routines.S")
endif()
"cache_err_int.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
5 changes: 1 addition & 4 deletions components/esp_system/port/soc/esp32c2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
set(srcs "clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"../../arch/riscv/expression_with_stack.c"
"../../arch/riscv/panic_arch.c"
"../../arch/riscv/debug_stubs.c")
"cache_err_int.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
5 changes: 1 addition & 4 deletions components/esp_system/port/soc/esp32c3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ set(srcs "clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"apb_backup_dma.c"
"../../arch/riscv/expression_with_stack.c"
"../../arch/riscv/panic_arch.c"
"../../arch/riscv/debug_stubs.c")
"apb_backup_dma.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
5 changes: 1 addition & 4 deletions components/esp_system/port/soc/esp32c6/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
set(srcs "clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"../../arch/riscv/expression_with_stack.c"
"../../arch/riscv/panic_arch.c"
"../../arch/riscv/debug_stubs.c")
"cache_err_int.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
5 changes: 1 addition & 4 deletions components/esp_system/port/soc/esp32h2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ set(srcs
"clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"../../arch/riscv/expression_with_stack.c"
"../../arch/riscv/panic_arch.c"
"../../arch/riscv/debug_stubs.c")
"cache_err_int.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
5 changes: 1 addition & 4 deletions components/esp_system/port/soc/esp32p4/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
set(srcs "clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"../../arch/riscv/expression_with_stack.c"
"../../arch/riscv/panic_arch.c"
"../../arch/riscv/debug_stubs.c")
"cache_err_int.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
17 changes: 1 addition & 16 deletions components/esp_system/port/soc/esp32s2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,7 @@ set(srcs "highint_hdl.S"
"clk.c"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"../../arch/xtensa/panic_arch.c"
"../../arch/xtensa/panic_handler_asm.S"
"../../arch/xtensa/expression_with_stack.c"
"../../arch/xtensa/expression_with_stack_asm.S"
"../../arch/xtensa/debug_helpers.c"
"../../arch/xtensa/debug_helpers_asm.S"
"../../arch/xtensa/debug_stubs.c"
"../../arch/xtensa/trax.c"
)

if(CONFIG_ESP_IPC_ISR_ENABLE)
list(APPEND srcs "../../arch/xtensa/esp_ipc_isr.c"
"../../arch/xtensa/esp_ipc_isr_handler.S"
"../../arch/xtensa/esp_ipc_isr_routines.S")
endif()
"cache_err_int.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down
17 changes: 1 addition & 16 deletions components/esp_system/port/soc/esp32s3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,7 @@ set(srcs "highint_hdl.S"
"reset_reason.c"
"system_internal.c"
"cache_err_int.c"
"apb_backup_dma.c"
"../../arch/xtensa/panic_arch.c"
"../../arch/xtensa/panic_handler_asm.S"
"../../arch/xtensa/expression_with_stack.c"
"../../arch/xtensa/expression_with_stack_asm.S"
"../../arch/xtensa/debug_helpers.c"
"../../arch/xtensa/debug_helpers_asm.S"
"../../arch/xtensa/debug_stubs.c"
"../../arch/xtensa/trax.c"
)

if(CONFIG_ESP_IPC_ISR_ENABLE)
list(APPEND srcs "../../arch/xtensa/esp_ipc_isr.c"
"../../arch/xtensa/esp_ipc_isr_handler.S"
"../../arch/xtensa/esp_ipc_isr_routines.S")
endif()
"apb_backup_dma.c")

add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs})

Expand Down

0 comments on commit 4f71937

Please sign in to comment.