diff --git a/.vscode/setup.sh b/.vscode/setup.sh index 1dc3b5237..3b652a6b8 100755 --- a/.vscode/setup.sh +++ b/.vscode/setup.sh @@ -20,8 +20,7 @@ # Uncomment to override # ############################### #export SerialPort="COM5" -#export DebuggerPath="${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe" -#export JLinkServerPath="/c/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe" +#export JLinkServerPath="C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe" #Debugging on 256KB systems is not recommended #This option does not override PLATFORM_SIZE @@ -59,12 +58,6 @@ function setup_gdb_linux { fi } -function setup_gdb_ps { - if [ -z "$DebuggerPath" ]; then - export DebuggerPath="${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe" - fi -} - function setup_jlink_linux { if [ -z "$JLinkServerPath" ]; then export JLinkServerPath="/opt/SEGGER/JLink/JLinkGDBServerCLExe" @@ -88,9 +81,9 @@ function setup_jlink_wsl { function setup_jlink_ps { if [ -z "$JLinkServerPath" ]; then - export JLinkServerPath="/c/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe" + export JLinkServerPath="c:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe" fi - if [ ! -x "$JLinkServerPath" ]; then + if [ ! -x $(cygpath \"$JLinkServerPath\") ]; then echo >&2 "[!!] JLinkGDBServerCL.exe not found, please set JLinkServerPath manually" exit 1 fi diff --git a/.vscode/templates/launch_ps.json b/.vscode/templates/launch_ps.json index 28b724f7b..045b3d6c5 100644 --- a/.vscode/templates/launch_ps.json +++ b/.vscode/templates/launch_ps.json @@ -15,6 +15,7 @@ "name": "Client: (gdb) Build & Launch", "type": "cppdbg", "request": "launch", + "cwd": "${workspaceFolder}", "program": "${cwd}/client/proxmark3", "args": ["${SerialPort}"], "stopAtEntry": false, @@ -28,13 +29,13 @@ } ], "preLaunchTask": "client: Debug: clean & make", - "miDebuggerPath": "${DebuggerPath}" + "miDebuggerPath": "${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe" },{ "name": "Firmware: (J-Link) Build & Launch", "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}", - "preLaunchTask": "fullimage: clean & make", + "preLaunchTask": "fullimage: clean & make debug", "executable": "${workspaceRoot}/armsrc/obj/fullimage.elf", "serverpath": "${JLinkServerPath}", "servertype": "jlink", @@ -42,7 +43,7 @@ "interface": "jtag", "serialNumber": "", //If you have more than one J-Link probe, add the serial number here. "runToMain": false, - "armToolchainPath": "/usr/bin/" + "armToolchainPath": "${workspaceFolder}/../../msys2/mingw64/bin" } ] } \ No newline at end of file