Arduino Forum

Products => MKR Boards => MKRVIDOR4000 => Topic started by: Ste_Trat on Oct 26, 2018, 11:12 am

Title: Cant compile/upload sketch
Post by: Ste_Trat on Oct 26, 2018, 11:12 am

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 ?

- 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:

On Windows:
Arduino IDE 1.6.5r5 and previous:
Arduino IDE 1.6.6 and later:

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

according to

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.

Title: Re: Cant compile/upload sketch
Post by: foxrobotics on Oct 26, 2018, 04:59 pm
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).
Title: Re: Cant compile/upload sketch
Post by: ballscrewbob on Oct 26, 2018, 07:58 pm
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.