-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Currently the code does not check whether or not nrfjprog
is actually included in PATH. One way to check if to see if nrfjprog.exe
is found using find_program()
There's also no gurantee that if a user defines a path for NRF5_NRFJPROG
that it is a valid path.
if(NOT NRF5_NRFJPROG)
# Check if nrfjprog command is recognised
find_program(NRFJPROG "nrfjprog")
if(NRFJPROG)
set(NRF5_NRFJPROG "nrfjprog" CACHE FILEPATH "" FORCE)
message(STATUS "Using nrfjprog utility available from PATH: ${NRF5_NRFJPROG}")
else()
message(FATAL_ERROR "Could no find nrfjprog utlity from PATH")
endif()
else()
message(STATUS "Using nrfjprog utility: ${NRF5_NRFJPROG}")
endif()
Metadata
Metadata
Assignees
Labels
No labels