cmake: for vscode launch fallback to gdb-multiarch

Newer toolchains don't ship with arm-none-eabi-gdb hence we should use gdb-multiarch instead
This commit is contained in:
Peter van der Perk
2025-01-27 10:43:20 +01:00
committed by Daniel Agar
parent 90a806f5f8
commit 64d8f9a3c6
+5
View File
@@ -506,6 +506,11 @@ if(NOT NUTTX_DIR MATCHES "external")
message(STATUS "Found SVD: ${DEBUG_SVD_FILE_PATH}")
endif()
if(NOT CMAKE_GDB)
find_program(CMAKE_GDB gdb-multiarch)
message(STATUS "Found GDB: ${CMAKE_GDB}")
endif()
if(DEBUG_DEVICE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json @ONLY)
endif()