@@ -150,20 +150,26 @@ private void createAndUpload(){
150150 editor .statusError ("Not Supported on " +PreferencesData .get ("target_platform" ));
151151 return ;
152152 }
153+
153154 String tc = "esp108" ;
154155 if (PreferencesData .get ("target_platform" ).contentEquals ("esp8266" )){
155156 tc = "lx106" ;
156157 }
157-
158+
158159 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+
160166 String addr2line ;
161167 if (PreferencesData .get ("runtime.os" ).contentEquals ("windows" ))
162168 addr2line = "xtensa-" +tc +"-elf-addr2line.exe" ;
163169 else
164170 addr2line = "xtensa-" +tc +"-elf-addr2line" ;
165171
166- tool = new File (platform . getFolder () + "/tools/xtensa-" + tc + "-elf /bin" , addr2line );
172+ tool = new File (gccPath + "/bin" , addr2line );
167173 if (!tool .exists () || !tool .isFile ()) {
168174 System .err .println ();
169175 editor .statusError ("ERROR: " +addr2line +" not found!" );
@@ -172,8 +178,8 @@ private void createAndUpload(){
172178
173179 elf = new File (getBuildFolderPath (editor .getSketch ()), editor .getSketch ().getName () + ".ino.elf" );
174180 if (!elf .exists () || !elf .isFile ()) {
175- System .err .println ();
176181 editor .statusError ("ERROR: " +editor .getSketch ().getName () + ".ino.elf not found!" );
182+ System .err .println ("Did you forget to compile the sketch?" );
177183 return ;
178184 }
179185
@@ -190,7 +196,6 @@ private void createAndUpload(){
190196 frame .getContentPane ().add (new JScrollPane (inputArea ), BorderLayout .PAGE_START );
191197
192198 outputArea = new JTextArea (16 , 60 );
193- //outputArea.setFont(new Font("Verdana", Font.BOLD, 12));
194199 outputArea .setLineWrap (true );
195200 outputArea .setWrapStyleWord (true );
196201 outputArea .setEditable (false );
0 commit comments