How can i resolve the ESP8266 compilation error caused by the Arduino Support Package?

I am unable to build any of my ESP8266 boards after i installed the Arduino Support Package on my machine.
Error Debug message:
In file included from c:\programdata\matlab\supportpackages\r2018a\3p.instrset\arduinoide.instrset\idepkgs\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:60:0,
from C:\ProgramData\MATLAB\SupportPackages\R2018a\3P.instrset\arduinoide.instrset\idepkgs\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Arduino.h:255,
from sketch\ESP8266.ino.cpp:1:
c:\programdata\matlab\supportpackages\r2018a\3p.instrset\arduinoide.instrset\idepkgs\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\utility:68:28: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
compilation terminated.
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

5 Comments

It is possible to workaround this issue with the answer provided by Walter. However, this still does not answer the question as to why the support package disturbs the Arduino IDE installation. I think the problem lies in the fact that the support package tries to install Arduino ide without checking if it exists or not, and then goes ahead and installs the 32-bit version.
Hi,
We are aware of this issue and actively working on a resolution for this. Until then consider using the solution mentioned in post by Haben Ghebremedhin on Dec 16, 2018.
Thanks
Arpita
MATLAB Hardware Team, MathWorks
Hi Arpita,
Haben's solution fixes the external Arduino IDE build issues but it breaks the MATLAB hardware support package! When I try to run arduinosetup, it throws an "samd unknown architecture" error.
Siddharth
Thats true, when you need to use the MATLAB hardware package just go back to the file and change it back.

Sign in to comment.

 Accepted Answer

It turns out that when you use the arduino suport package in matlab things get screw up a bit thats for mathworks to figure out but as for this issue you have to go to C:\Users\Your user name here \AppData\Local\Arduino15 and find the preference text file, in the file chage the settings.path to where you have your arduino...typically C:\Users\Your user name here \Docments\Arduino and that should fix it.

6 Comments

Excelente respuesta,
Otra opción es eliminar el archivo preference, de tal forma que, el arduino genere una nueva y ya funciona.
Hola a todos
Tuve el mismo problema no podia compilar directamente la tarjeta NODEMCU con Arduino despues de cargar la libreria de arduino en MATLAB, actualice el arduino, cargue nuevamente el compilador de "gcc", borre el archivo de "preference.txt" y no me funciono, lo que me funciono para que me aceptara el arduino el poder compilar la tarjeta NODEMCU fue eliminar la carpeta "Arduino15" en la ruta
"C:\Users\"nombre de usuario"\AppData\Local\Arduino15", la cual tenia un tamaño mayor de 3GB, despues de esta accion, al borrar la carpeta, entrar a arduino, cargar una aplicacion para la tarjeta NODEMCU y compilar y compilarme la aplicacion, me volvio a generar la misma carpeta pero con un tamaño de un poco mas de 7MB.
Thank you very much, I wasted a lot of time trying to solve this problem, but this solution work so good, really thanks

Sign in to comment.

More Answers (3)

I had this problem, and I have just solved it by going to C:\Users\Zaid\AppData\Local
then search for the folder arduino or arduino15
Uninstall the IDE then remove this folder, matlab changes the configuration of the IDE somewhere in this folder so it starts reading the boards from somewhere else,, after deleting the folder Arduino or arduino15 or both you can reinstall the arduino IDE and reconfigure the esp boards from boards manager after adding the jason extension from preferences as before and it will work

8 Comments

Thanks You @Zaid.........Your answer can solve my problems.
Thank you @Zaid Haymoor, your answer solved my problem. Thank you very much
what should i do after deleting the Arduino15 file

Sign in to comment.

Hi, I am new to nodemcu. When I was using ESP8266WiFi.h, I got the error "Error compiling for board NodeMCU 1.0 (ESP-12E Module)" which said that Multiple libraries were found for ESP8266WiFi.h. I solved by simply put the void loop(){} empty function at the end of my code. Now It's working...

Categories

Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange

Products

Release

R2018a

Asked:

on 29 Sep 2018

Commented:

on 4 May 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!