Skip to content

Commit 7d09be9

Browse files
authored
changed openocd executable for mac and linux (#478)
1 parent 507da4c commit 7d09be9

File tree

1 file changed

+2
-1
lines changed
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/util

1 file changed

+2
-1
lines changed

bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ public static String getEspIdfVersion()
426426
public static String getOpenocdVersion()
427427
{
428428
String openocdLocation = IDFUtil.getOpenOCDLocation();
429+
String openocdExecutable = Platform.getOS().equals(Platform.OS_WIN32) ? "openocd.exe" : "openocd"; //$NON-NLS-1$ //$NON-NLS-2$
429430
if (openocdLocation != null && !openocdLocation.isBlank())
430431
{
431432
List<String> commands = new ArrayList<>();
432-
commands.add(IDFUtil.getOpenOCDLocation() + File.separator + "openocd.exe"); //$NON-NLS-1$
433+
commands.add(IDFUtil.getOpenOCDLocation() + File.separator + openocdExecutable);
433434
commands.add("--version"); //$NON-NLS-1$
434435
Map<String, String> envMap = new IDFEnvironmentVariables().getEnvMap();
435436
return runCommand(commands, envMap);

0 commit comments

Comments
 (0)