Skip to content
Snippets Groups Projects
Commit 55f963be authored by James Goppert's avatar James Goppert
Browse files

Added ddd support.

parent f1bc33ff
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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()
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment