Added io debug target.

This commit is contained in:
James Goppert 2015-09-19 10:39:54 -04:00
parent cc053bffcd
commit 4830c7c9c1
3 changed files with 10 additions and 3 deletions

View File

@ -110,7 +110,7 @@ clean:
rm -rf build_*/ rm -rf build_*/
# targets handled by cmake # 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)))) $(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
.PHONY: clean .PHONY: clean

View File

@ -37,7 +37,7 @@ endif()
cmake_force_cxx_compiler(${CXX_COMPILER} GNU) cmake_force_cxx_compiler(${CXX_COMPILER} GNU)
# compiler tools # compiler tools
foreach(tool objcopy nm ld gdb) foreach(tool objcopy nm ld gdb gdbtui)
string(TOUPPER ${tool} TOOL) string(TOUPPER ${tool} TOOL)
find_program(${TOOL} arm-none-eabi-${tool}) find_program(${TOOL} arm-none-eabi-${tool})
if(NOT ${TOOL}) if(NOT ${TOOL})

View File

@ -56,7 +56,14 @@ if(NOT ${BOARD} STREQUAL "sim")
configure_file(gdbinit.in .gdbinit) configure_file(gdbinit.in .gdbinit)
add_custom_target(debug 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 DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit ${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
) )