Cannot compile for ESP based boards in Arduino IDE after installing Simulink Support package for Arduino

조회 수: 96(최근 30일)
Gergely Szabó
Gergely Szabó 2018년 7월 8일
댓글: Enrique Flores 2020년 7월 28일
I would like to add some Embeded Coder generated code to my project, but after installing the Simulink Support Package for Arduino, I am not able to compile my project for ESP based boards. The AVR based boards are not affected.
Everytime I try to compile I am given the following errors:
Build options changed, rebuilding all
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.1\cores\esp8266/Arduino.h:254,
from sketch\Project_Home.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 WeMos D1 mini Pro.
  댓글 수: 2
SAYAN HAZRA
SAYAN HAZRA 2019년 5월 12일
  1. Go to Arduino15 folder.
  2. Open preferences.txt file
  3. Then change the harware path from matlab to any of the arduino folder

댓글을 달려면 로그인하십시오.

채택된 답변

Zaid Haymoor
Zaid Haymoor 2018년 10월 22일
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
  댓글 수: 6
Enrique Flores
Enrique Flores 2020년 7월 28일
Hello, im having this problem trying to compile on an ESP32, after reading this solution i wonder if you are still available to work with Arduino and Matlab after this movements ? Thank you in advance !

댓글을 달려면 로그인하십시오.

추가 답변(2개)

mutasam hazzah
mutasam hazzah 2019년 2월 11일
i have just solve it by removing the file performanes.txt from
C:\Users\userName\AppData\Local\Arduino15
and restart the arduino..
note: u can cut the the performances.txt file to some where and get it back to the same
location to keep matlab working write.

Supachai Vorapojpisut
Supachai Vorapojpisut 2018년 10월 13일
There are conflicts in the preferences.txt that not compatible with Arduino core for ESP32. I found the similar problem while writing ESP32 code using Arduino IDE. So I have to install Arduino IDE as a portable app to solve the issue. Setting the portable Arduino as the toolchain for Embedded Coder should solve your issue.

Community Treasure Hunt

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

Start Hunting!

Translated by