Added ddd support.

This commit is contained in:
James Goppert 2015-10-06 12:10:23 -04:00
parent f1bc33ff73
commit 55f963be07
3 changed files with 40 additions and 2 deletions

View File

@ -153,7 +153,7 @@ distclean: clean
@cd ../../..
# targets handled by cmake
cmake_targets = test upload package package_source debug debug_io check_weak libuavcan
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak libuavcan
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
.PHONY: clean

View File

@ -49,6 +49,9 @@ endforeach()
foreach(tool gdb gdbtui)
string(TOUPPER ${tool} TOOL)
find_program(${TOOL} arm-none-eabi-${tool})
if(NOT ${TOOL})
message(STATUS "could not find ${tool}")
endif()
endforeach()
# os tools
@ -56,7 +59,16 @@ foreach(tool echo patch grep rm mkdir nm genromfs cp touch make unzip)
string(TOUPPER ${tool} TOOL)
find_program(${TOOL} ${tool})
if(NOT ${TOOL})
message(FATAL_ERROR "could not find ${TOOL}")
message(FATAL_ERROR "could not find ${tool}")
endif()
endforeach()
# optional os tools
foreach(tool ddd)
string(TOUPPER ${tool} TOOL)
find_program(${TOOL} ${tool})
if(NOT ${TOOL})
message(STATUS "could not find ${tool}")
endif()
endforeach()

View File

@ -63,18 +63,44 @@ if(NOT ${BOARD} STREQUAL "sim")
configure_file(gdbinit.in .gdbinit)
add_custom_target(debug
COMMAND ${GDB} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
)
add_custom_target(debug_tui
COMMAND ${GDBTUI} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
)
add_custom_target(debug_ddd
COMMAND ${DDD} --debugger ${GDB} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
)
add_custom_target(debug_io
COMMAND ${GDB}
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}_${LABEL}
DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
)
add_custom_target(debug_io_tui
COMMAND ${GDBTUI}
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}_${LABEL}
DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
)
add_custom_target(debug_io_ddd
COMMAND ${DDD} --debugger ${GDB}
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}_${LABEL}
DEPENDS firmware_nuttx
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
)
px4_add_upload(OUT upload OS ${OS} BOARD ${BOARD}
BUNDLE ${fw_file})
endif()