Skip to content

Commit efccdd0

Browse files
committed
Merge pull request energia#68 from energia/mspdebug_for_windows
mspdebug support for windows
2 parents 8105683 + bed194d commit efccdd0

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

app/src/processing/app/debug/MSP430Uploader.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public boolean uploadUsingPreferences(String buildPath, String className, boolea
5252
throws RunnerException, SerialException {
5353
this.verbose = verbose;
5454
Map<String, String> boardPreferences = Base.getBoardPreferences();
55-
//No serial programming support (yet). Upload using programmer (MSP430Flasher for windows and mspdebug for Mac OS X and Linux).
55+
//No serial programming support (yet).
56+
//Upload using programmer (MSP430Flasher for windows and mspdebug for Mac OS X and Linux).
57+
//added support for mspdebug for windows
5658

5759
Target target = Base.getTarget();
5860
Collection params = new ArrayList();
@@ -66,11 +68,11 @@ public boolean uploadUsingPreferences(String buildPath, String className, boolea
6668
params.add("prog " + buildPath + File.separator + className + ".hex");
6769
}
6870
else {
69-
params.add("\"prog " + buildPath + File.separator + className + ".hex\"");
71+
params.add("prog " + buildPath + File.separator + className + ".hex");
7072
}
7173
return mspdebug(params);
7274
} else {
73-
75+
/* // code to access via MSP430_Flasher
7476
params.add("-n " + boardPreferences.get("build.mcu"));
7577
params.add("-w");
7678
params.add(buildPath + File.separator + className + ".hex");
@@ -80,6 +82,16 @@ public boolean uploadUsingPreferences(String buildPath, String className, boolea
8082
8183
params.add("-z[VCC]");
8284
return MSP430Flasher(params);
85+
*/
86+
// params.add(boardPreferences.get("upload.protocol"));
87+
params.add("tilib"); // always use the TI Lib on Windows, best integrate on this OS
88+
params.add("-d");
89+
params.add("USB");
90+
if(!Preferences.getBoolean("upload.verbose"))
91+
params.add("-q");
92+
params.add("--force-reset");
93+
params.add("\"prog " + buildPath + File.separator + className + ".hex\"");
94+
return mspdebug(params);
8395
}
8496
}
8597

@@ -93,9 +105,13 @@ public boolean mspdebug(Collection params) throws RunnerException {
93105

94106
if ( Base.isLinux()) {
95107
commandDownloader.add("mspdebug"); // use the one in the PATH
96-
} else {
108+
}
109+
else if (Base.isMacOS()) {
97110
commandDownloader.add(Base.getHardwarePath() + "/tools/msp430/mspdebug/mspdebug");
98111
}
112+
else {
113+
commandDownloader.add(Base.getHardwarePath() + "\\tools\\msp430\\mspdebug\\mspdebug");
114+
}
99115
commandDownloader.addAll(params);
100116

101117
return executeUploadCommand(commandDownloader);

build/windows/msp430_tools.zip

904 KB
Binary file not shown.

0 commit comments

Comments
 (0)