forked from Archive/PX4-Autopilot
Added io debug target.
This commit is contained in:
parent
cc053bffcd
commit
4830c7c9c1
2
Makefile
2
Makefile
|
@ -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
|
||||||
|
|
|
@ -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})
|
||||||
|
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue