Skip to content

Commit

Permalink
cmake jlink add path hints for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Feb 10, 2020
1 parent c54a099 commit e6d7612
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions platforms/nuttx/cmake/jlink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
############################################################################

# jlink_upload (flash binary)
find_program(JLinkGDBServerCLExe_PATH JLinkGDBServerCLExe)
find_program(JLinkGDBServerCLExe_PATH JLinkGDBServerCLExe
HINTS /Applications/SEGGER/JLink
)
if(JLinkGDBServerCLExe_PATH)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/jlink_gdb_start.sh.in ${PX4_BINARY_DIR}/jlink_gdb_start.sh @ONLY)
add_custom_target(jlink_upload
Expand All @@ -48,7 +50,9 @@ if(JLinkGDBServerCLExe_PATH)
endif()

# jlink_debug_gdb (flash binary and run with gdb attached)
find_program(JLinkGDBServerExe_PATH JLinkGDBServerExe)
find_program(JLinkGDBServerExe_PATH JLinkGDBServerExe
HINTS /Applications/SEGGER/JLink
)
if(JLinkGDBServerExe_PATH AND CMAKE_GDB)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/jlink_debug_gdb.sh.in ${PX4_BINARY_DIR}/jlink_debug_gdb.sh @ONLY)
add_custom_target(jlink_debug_gdb
Expand All @@ -63,7 +67,9 @@ if(JLinkGDBServerExe_PATH AND CMAKE_GDB)
endif()

# jlink_debug_ozone (run Segger Ozone debugger with current target configuration)
find_program(Ozone_PATH Ozone)
find_program(Ozone_PATH Ozone
HINTS /Applications/Ozone.app/Contents/MacOS/
)
if(Ozone_PATH)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/jlink_debug_ozone.sh.in ${PX4_BINARY_DIR}/jlink_debug_ozone.sh @ONLY)
add_custom_target(jlink_debug_ozone
Expand Down

0 comments on commit e6d7612

Please sign in to comment.