Arduino-esp32: Compiling of mbedtls failes with '#include expects "FILENAME" or <FILENAME>'

Created on 10 Jan 2019  路  11Comments  路  Source: espressif/arduino-esp32

In platform.txt must be fixed on line 25, from:

"compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -[..]"

into:

"compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="" -[..]"

All 11 comments

Can you please not skip the proper form to fill an issue? OS, Arduino version, etc... how should we know all of that? Minimal sketch to reproduce?

Hello, it is an issue in the preprocessor command line argument.

  • Platform is: ESP32, but that is the common context here. So this information would be redundant.
  • OS is not important (my system is Win10 x86_64)
    - The misstake is shown above in the issue description: "[..] -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" [..]" is wrong and must be changed into: "[..] -DMBEDTLS_CONFIG_FILE="

A sample sketch would be:

#include <WiFi.h>
#include <WiFiClientSecure.h>

const char ssid[] = "ssid";
const char pass[] = "pass";

WiFiClientSecure net;

unsigned long lastMillis = 0;

void setup() {

}

void loop() {

}

results in:

"
c:binsloeberarduinopluginpackagesesp32hardwareesp321.0.0toolssdkincludembedtlsmbedtlsplatform.h:39:10: error: #include expects "FILENAME" or
#include MBEDTLS_CONFIG_FILE
^
"

BR,
Mathias

@me-no-dev, please reopen it. I hope there are enought information now.

It is definitely not enough :) what version of this esp32-arduino core you are running? And OS does matter, since we compile those fine on Linux and Mac for sure.
Just to chime in some more on this issue... many people use WiFiClientSecure and nobody has reported this issue since we last "fixed" the define. I just compiled your exact code also and have no problem at all.

image

Sample sketch compiles fine in Win10 x86_64

Oh... I just saw "c:binsloeber" on your error... You are using Eclipse with Arduino plugin? I would open an issue there...

yup, i can confirm sloeber issue. We have tried a few things for the last couple of years and other settings cause errors in the actual Arduino IDE on some operating systems (Windows usually). IMO this should go to sloeber devs

Ok, thanks for your great work :-) I will set a user specific compile line in my eclipse project to fix the issue for now.. And I will also try to work with sloeber under linux. Working with Arduino IDE isn't the right way for me. Eclipse has better smart coding functionality.

Agreed! :)

@plcengineer May I suggest VSCode with Arduino Plugin? You get rid of Arduino IDE and it's so much better than Sloeber IMHO.

I麓m using VSCode and have the same problem. but the solution don麓t help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danthegoodman1 picture danthegoodman1  路  100Comments

PhilColbert picture PhilColbert  路  125Comments

dbachko picture dbachko  路  84Comments

nae9 picture nae9  路  57Comments

muktillc picture muktillc  路  57Comments