Skip to content

Commit

Permalink
Merge branch 'feature/refactor_gdbstub' into 'master'
Browse files Browse the repository at this point in the history
esp_gdbstub: refactor code

Closes IDF-6461

See merge request espressif/esp-idf!22929
  • Loading branch information
Lapshin committed Apr 10, 2023
2 parents 93da40d + fc9c2d7 commit b973b15
Show file tree
Hide file tree
Showing 27 changed files with 276 additions and 903 deletions.
34 changes: 18 additions & 16 deletions components/esp_gdbstub/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
idf_build_get_property(target IDF_TARGET)
set(srcs "src/gdbstub.c"
"src/gdbstub_transport.c"
"src/packet.c")

idf_component_register(SRCS "src/gdbstub.c" "src/packet.c"
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "private_include"
LDFRAGMENTS "linker.lf"
REQUIRES "freertos"
PRIV_REQUIRES "soc" "esp_rom" "esp_system")
set(includes "include")
set(priv_includes "private_include")

if(CONFIG_IDF_TARGET_ARCH_XTENSA)
target_include_directories(${COMPONENT_LIB} PUBLIC "xtensa" "${target}")
target_sources(${COMPONENT_LIB} PRIVATE "xtensa/gdbstub_xtensa.c"
"xtensa/gdbstub-entry.S"
"xtensa/xt_debugexception.S"
"esp_common/gdbstub_common.c")

list(APPEND srcs "src/port/xtensa/gdbstub_xtensa.c"
"src/port/xtensa/gdbstub-entry.S"
"src/port/xtensa/xt_debugexception.S")
list(APPEND priv_includes "src/port/xtensa/include")
elseif(CONFIG_IDF_TARGET_ARCH_RISCV)
target_include_directories(${COMPONENT_LIB} PUBLIC "riscv" "${target}")
target_sources(${COMPONENT_LIB} PRIVATE "riscv/gdbstub_riscv.c"
"${target}/gdbstub_${target}.c")
list(APPEND srcs "src/port/riscv/gdbstub_riscv.c")
list(APPEND priv_includes "src/port/riscv/include")
endif()

idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
PRIV_INCLUDE_DIRS ${priv_includes}
LDFRAGMENTS "linker.lf"
REQUIRES "freertos"
PRIV_REQUIRES "soc" "esp_rom" "esp_system")
10 changes: 0 additions & 10 deletions components/esp_gdbstub/esp32/gdbstub_target_config.h

This file was deleted.

104 changes: 0 additions & 104 deletions components/esp_gdbstub/esp32c2/gdbstub_esp32c2.c

This file was deleted.

7 changes: 0 additions & 7 deletions components/esp_gdbstub/esp32c2/gdbstub_target_config.h

This file was deleted.

140 changes: 0 additions & 140 deletions components/esp_gdbstub/esp32c3/gdbstub_esp32c3.c

This file was deleted.

7 changes: 0 additions & 7 deletions components/esp_gdbstub/esp32c3/gdbstub_target_config.h

This file was deleted.

Loading

0 comments on commit b973b15

Please sign in to comment.