mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Added ddd support.
This commit is contained in:
2
Makefile
2
Makefile
@@ -153,7 +153,7 @@ distclean: clean
|
|||||||
@cd ../../..
|
@cd ../../..
|
||||||
|
|
||||||
# targets handled by cmake
|
# 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))))
|
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ endforeach()
|
|||||||
foreach(tool gdb gdbtui)
|
foreach(tool 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})
|
||||||
|
message(STATUS "could not find ${tool}")
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# os tools
|
# os tools
|
||||||
@@ -56,7 +59,16 @@ foreach(tool echo patch grep rm mkdir nm genromfs cp touch make unzip)
|
|||||||
string(TOUPPER ${tool} TOOL)
|
string(TOUPPER ${tool} TOOL)
|
||||||
find_program(${TOOL} ${tool})
|
find_program(${TOOL} ${tool})
|
||||||
if(NOT ${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()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|||||||
@@ -63,18 +63,44 @@ 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
|
||||||
|
DEPENDS firmware_nuttx
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(debug_tui
|
||||||
COMMAND ${GDBTUI} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
COMMAND ${GDBTUI} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
||||||
DEPENDS firmware_nuttx
|
DEPENDS firmware_nuttx
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
${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
|
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}
|
COMMAND ${GDBTUI}
|
||||||
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}_${LABEL}
|
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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}
|
px4_add_upload(OUT upload OS ${OS} BOARD ${BOARD}
|
||||||
BUNDLE ${fw_file})
|
BUNDLE ${fw_file})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user