From 3f7e9c8f8279c93a666ff8779cf5317086ce6bc8 Mon Sep 17 00:00:00 2001 From: gator96100 Date: Tue, 29 Dec 2020 21:10:16 +0100 Subject: [PATCH] Windows path check --- .vscode/setup.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/setup.sh b/.vscode/setup.sh index 3b652a6b8..cdfb77e8f 100755 --- a/.vscode/setup.sh +++ b/.vscode/setup.sh @@ -83,7 +83,8 @@ function setup_jlink_ps { if [ -z "$JLinkServerPath" ]; then export JLinkServerPath="c:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe" fi - if [ ! -x $(cygpath \"$JLinkServerPath\") ]; then + jlinkpath=$(cygpath "$JLinkServerPath") + if [ ! -x "$jlinkpath" ]; then echo >&2 "[!!] JLinkGDBServerCL.exe not found, please set JLinkServerPath manually" exit 1 fi @@ -107,10 +108,10 @@ function setup_linux { function setup_ps { setup_serial_port - setup_gdb_ps setup_jlink_ps + export DebuggerPath="Using ProxSpace gbd" print_config - envsubst '${SerialPort} ${DebuggerPath} ${JLinkServerPath} ${DeviceMem}' <"$VSCODEPATH/templates/launch_ps.json" > "$VSCODEPATH/launch.json" + envsubst '${SerialPort} ${JLinkServerPath} ${DeviceMem}' <"$VSCODEPATH/templates/launch_ps.json" > "$VSCODEPATH/launch.json" } if [ -f "$VSCODEPATH/launch.json" ]; then