Go Down

Topic: Cant compile/upload sketch (Read 464 times) previous topic - next topic

Ste_Trat

Oct 26, 2018, 11:12 am Last Edit: Oct 26, 2018, 02:48 pm by Ste_Trat
Hi,

i am wondering why i cant upload a simple blink sketch via the IDE to the vidor.

The error message is as follows:
----------------------------------------------------------------------------------------------
Arduino: 1.8.7 (Windows 10), Board: "Arduino MKR Vidor 4000"

In file included from c:\programdata\matlab\supportpackages\r2016b\3p.instrset\arduinoide.instrset\arduinosam-1.6.7\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\stdlib.h:36:0,

                 from C:\ProgramData\MATLAB\SupportPackages\R2016b\3P.instrset\arduinoide.instrset\arduinosam-1.6.7\packages\arduino\hardware\samd_beta\1.6.24\cores\arduino/Arduino.h:25,

                 from sketch\Blink.ino.cpp:1:

c:\programdata\matlab\supportpackages\r2016b\3p.instrset\arduinoide.instrset\arduinosam-1.6.7\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

 #include <bits/c++config.h>

          ^~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1
Fehler beim Kompilieren für das Board Arduino MKR Vidor 4000.
----------------------------------------------------------------------------------------------
- one more issue: even after the bootloader update via the IDE, uploading a sketch hangs.
Even performing the bootloader recovery didnt fix this.
Do i really need to press the reset button every time for 2x manually when i want to upload a new sketch ??


With the web editor everything works fine, but not with the offline version.
Does anyone have an idea ?

Update:
- Tested it on a different machine, and uploading works there fine. You need to remove the black foam, in order to get the Vidor detected.
- still trying troubleshooting the problem with the other PC, by doing a complete deinstall of the IDE, which requires a manual removal of the Arduino15 folder which is found here:

On Mac OS X:
/Users/(username)/Library/Arduino15

On Windows:
Arduino IDE 1.6.5r5 and previous:
C:\Users\(username)\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later:
C:\Users\(username)\AppData\Local\Arduino15

On Linux:
/home/(username)/.arduino15    (a.k.a. ~/.arduino15)

according to https://forum.arduino.cc/index.php?topic=362507.0

After trying the above things i have the following conclusion:
-on the pc  i can upload a simple blink sketch only once, before i need to manually hit the reset button 2x times to upload a new sketch
- on the laptop everything works fine everytime, even though the setup is both systems the same.
- from this i assume its a hardware thing.
for comparison: i have tested this with a UNO, and theres no problem with it, at all.

greets

foxrobotics

#1
Oct 26, 2018, 04:59 pm Last Edit: Oct 26, 2018, 05:01 pm by foxrobotics
If you look at the output message, you'll see a bit that says "from C:\ProgramData\MATLAB\SupportPackages\R2016b\3P.instrset\arduinoide.instrset\arduinosam-1.6.7\packages\arduino\hardware\samd_beta\1.6.24\cores\arduino/Arduino.h:25,"?

What that tells us is that when you are trying to build an Arduino sketch, code from within your Matlab install is getting called instead of your Arduino IDE install.

If you are comfortable with environmental variables, take a look at PATH and make sure that your Arduino install comes before your Matlab install to fix that. What this does is make it so your computer searches for the name of executables in the Arduino install before the Matlab install - once it finds what it is looking for in the former, it won't even look in the latter.  You will likely have to restart after doing this to make it go into effect.

If you aren't comfortable with messing with environmental variables, you can try to uninstall your Arduino IDE and reinstall it (it might fix the issue). Make sure to back up all of your "sketches" and any libraries you've made just in case.

Edit - missed your edit, heheh. If a full reinstall didn't work, try my environmental bit. Otherwise, see if you can remove the Arduino module from your Matlab install (or uninstall Matlab if you don't need/use it).

ballscrewbob

#2
Oct 26, 2018, 07:58 pm Last Edit: Oct 26, 2018, 07:58 pm by ballscrewbob
Just adding some possible info for a RE-INSTALL.

Most people just use the built in "uninstaller" for programs but that does not always remove all traces and sometimes a re-install will pick up those left overs and use them in a similar fashion to the PATH variables.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up