@@ -150,20 +150,26 @@ private void createAndUpload(){
150
150
editor .statusError ("Not Supported on " +PreferencesData .get ("target_platform" ));
151
151
return ;
152
152
}
153
+
153
154
String tc = "esp108" ;
154
155
if (PreferencesData .get ("target_platform" ).contentEquals ("esp8266" )){
155
156
tc = "lx106" ;
156
157
}
157
-
158
+
158
159
TargetPlatform platform = BaseNoGui .getTargetPlatform ();
159
-
160
+
161
+ String gccPath = PreferencesData .get ("runtime.tools.xtensa-" +tc +"-elf-gcc.path" );
162
+ if (gccPath == null ){
163
+ gccPath = platform .getFolder () + "/tools/xtensa-" +tc +"-elf" ;
164
+ }
165
+
160
166
String addr2line ;
161
167
if (PreferencesData .get ("runtime.os" ).contentEquals ("windows" ))
162
168
addr2line = "xtensa-" +tc +"-elf-addr2line.exe" ;
163
169
else
164
170
addr2line = "xtensa-" +tc +"-elf-addr2line" ;
165
171
166
- tool = new File (platform . getFolder () + "/tools/xtensa-" + tc + "-elf /bin" , addr2line );
172
+ tool = new File (gccPath + "/bin" , addr2line );
167
173
if (!tool .exists () || !tool .isFile ()) {
168
174
System .err .println ();
169
175
editor .statusError ("ERROR: " +addr2line +" not found!" );
@@ -172,8 +178,8 @@ private void createAndUpload(){
172
178
173
179
elf = new File (getBuildFolderPath (editor .getSketch ()), editor .getSketch ().getName () + ".ino.elf" );
174
180
if (!elf .exists () || !elf .isFile ()) {
175
- System .err .println ();
176
181
editor .statusError ("ERROR: " +editor .getSketch ().getName () + ".ino.elf not found!" );
182
+ System .err .println ("Did you forget to compile the sketch?" );
177
183
return ;
178
184
}
179
185
@@ -190,7 +196,6 @@ private void createAndUpload(){
190
196
frame .getContentPane ().add (new JScrollPane (inputArea ), BorderLayout .PAGE_START );
191
197
192
198
outputArea = new JTextArea (16 , 60 );
193
- //outputArea.setFont(new Font("Verdana", Font.BOLD, 12));
194
199
outputArea .setLineWrap (true );
195
200
outputArea .setWrapStyleWord (true );
196
201
outputArea .setEditable (false );
0 commit comments