mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Added io debug target.
This commit is contained in:
2
Makefile
2
Makefile
@@ -110,7 +110,7 @@ clean:
|
||||
rm -rf build_*/
|
||||
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug check_weak
|
||||
cmake_targets = test upload package package_source debug debug_io check_weak
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -37,7 +37,7 @@ endif()
|
||||
cmake_force_cxx_compiler(${CXX_COMPILER} GNU)
|
||||
|
||||
# compiler tools
|
||||
foreach(tool objcopy nm ld gdb)
|
||||
foreach(tool objcopy nm ld gdb gdbtui)
|
||||
string(TOUPPER ${tool} TOOL)
|
||||
find_program(${TOOL} arm-none-eabi-${tool})
|
||||
if(NOT ${TOOL})
|
||||
|
||||
@@ -56,7 +56,14 @@ if(NOT ${BOARD} STREQUAL "sim")
|
||||
configure_file(gdbinit.in .gdbinit)
|
||||
|
||||
add_custom_target(debug
|
||||
COMMAND ${GDB} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
||||
COMMAND ${GDBTUI} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
||||
DEPENDS firmware_nuttx
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
)
|
||||
|
||||
add_custom_target(debug_io
|
||||
COMMAND ${GDBTUI}
|
||||
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}_${LABEL}
|
||||
DEPENDS firmware_nuttx
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user