Skip to content

Commit

Permalink
px4_io-v2 add to vscode variants and fix SVD file find
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and julianoes committed Feb 10, 2020
1 parent 8cdbc4c commit 0d36e50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .vscode/cmake-variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ CONFIG:
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_test
px4_io-v2_default:
short: px4_io-v2_default
buildType: MinSizeRel
settings:
CONFIG: px4_io-v2_default
px4_fmu-v2_default:
short: px4_fmu-v2_default
buildType: MinSizeRel
Expand Down
6 changes: 3 additions & 3 deletions platforms/nuttx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ add_custom_target(weak_symbols
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/gdbinit.in ${PX4_BINARY_DIR}/.gdbinit)

# vscode launch.json
# FIXME: hack to skip if px4_io-v2 because it's a built within another build (eg px4_fmu-v5)
if(NOT PX4_BOARD MATCHES "px4_io-v2")
# skip if built within another cmake project (eg px4_io-v2 with px4_fmu-v5)
if(NOT NUTTX_DIR MATCHES "external")
if(CONFIG_ARCH_CHIP_MIMXRT1062DVL6A)
set(DEBUG_DEVICE "MIMXRT1062XXX6A")
set(DEBUG_SVD_FILE "MIMXRT1052.svd")
Expand Down Expand Up @@ -232,7 +232,7 @@ if(NOT PX4_BOARD MATCHES "px4_io-v2")
LIST_DIRECTORIES false
${CMAKE_SOURCE_DIR}/../cmsis-svd/data/*/${DEBUG_SVD_FILE}
)
if(DEBUG_SVD_FILE)
if(NOT DEBUG_SVD_FILE MATCHES "unknown")
message(STATUS "Found SVD: ${DEBUG_SVD_FILE_PATH}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json @ONLY)
endif()
Expand Down

0 comments on commit 0d36e50

Please sign in to comment.