question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[esp32] `sdkconfig.h` not found with v4.2, was working with v4.1

See original GitHub issue

What kind of issue is this?

  • PlatformIO Core. If you’ve found a bug, please provide an information below.

Configuration

Operating system: Windows 10 (Microsoft Windows [Version 10.0.18362.657])

PlatformIO Version (platformio --version): 4.2.0

Description of problem

After upgrading to PlatformIO v4.2, pio run yields the following error:

fatal error: sdkconfig.h: No such file or directory

but if I downgrade PIO to v4.1, it yields the expected result (compilation successful)

Steps to Reproduce

I’ve setup a repo to reproduce the test:

  1. pip install platformio==4.2.0
  2. git clone https://github.com/giupo/https://github.com/giupo/test.case.platformio or create an empty project with pio init with the following specified ini and cpp in this issue.
  3. pio run

Actual Results

In file included from .pio\libdeps\esp12e\AsyncTCP_ID1826\src\AsyncTCP.cpp:24:0:
.pio\libdeps\esp12e\AsyncTCP_ID1826\src\AsyncTCP.h:26:23: fatal error: sdkconfig.h: No such file or directory

*******************************************************************
* Looking for sdkconfig.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:sdkconfig.h"
* Web  > https://platformio.org/lib/search?query=header:sdkconfig.h
*
*******************************************************************

 #include "sdkconfig.h"
                       ^
compilation terminated.
*** [.pio\build\esp12e\lib1ea\AsyncTCP_ID1826\AsyncTCP.cpp.o] Error 1
=============== [FAILED] Took 8.64 seconds ====================

Expected Results

The expected result is obtained by downgrading to 4.1:

  1. pip install platformio==4.1.0

Here’s the expected output:

********************************************************************************
Obsolete PIO Core v4.1.0 is used (previous was 4.2.0)
Please remove multiple PIO Cores from a system:
https://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system
********************************************************************************
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.3.3 > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: toolchain-xtensa 2.40802.191122 (4.8.2), framework-arduinoespressif8266 3.20603.200130 (2.6.3), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20800.0 (2.8.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for ESP Async Webserver library in registry
Found: https://platformio.org/lib/show/306/ESP Async WebServer
LibraryManager: Installing id=306
ESP Async WebServer @ 1.2.3 is already installed
Installing dependencies
LibraryManager: Installing id=305
ESPAsyncTCP @ 1.2.2 is already installed
LibraryManager: Installing id=1826
AsyncTCP @ 1.1.1 is already installed
Looking for Hash library in registry
Warning! Library `{'platforms': ['espressif8266'], 'name': 'Hash'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'platforms': ['espressif8266'], 'name': 'Hash'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP Async WebServer> 1.2.3
|   |-- <ESPAsyncTCP> 1.2.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
Building in release mode
Retrieving maximum program size .pio\build\esp12e\firmware.elf
Checking size .pio\build\esp12e\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
DATA:    [===       ]  32.7% (used 26772 bytes from 81920 bytes)
PROGRAM: [==        ]  24.5% (used 255680 bytes from 1044464 bytes)
========================= [SUCCESS] Took 2.52 seconds =========================

If problems with PlatformIO Build System:

The content of platformio.ini:

[env]
lib_deps =
    ESP Async Webserver
[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
board_build.flash_mode = qio
upload_speed = 115200
monitor_speed = 115200

Source file to reproduce issue:

#include <Arduino.h>
#include <Wire.h>
#include <ESPAsyncWebServer.h>

void setup() {

}

void loop () {

}

Additional info

I guess the update was triggered by PlatformIO IDE for Visual Studio Code?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mvaducommented, Feb 16, 2020

ah… nice… IMHO usually closing an issue hides it from default github search, and leads to many duplicates. Keeping it open until mainstream has the fix solves it.

1reaction
ivankravetscommented, Feb 16, 2020

We plan to release PIO Core 4.2.1 tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project Configuration - ESP32 - — ESP ... - Espressif Systems
Based on sdkconfig , application build targets will generate sdkconfig.h file in the build directory, and will make sdkconfig options available to the ......
Read more >
Configuration Options - ESP-IDF Programming Guide
Based on sdkconfig , application build targets will generate sdkconfig.h file in the build directory, and will make sdkconfig options available to component ......
Read more >
why i get this error? "sdkconfig.h: No such file or directory"
I'm trying to serve files for nodeMCU from SDcard I found this code from microcontrollerslab.com but I get this error: NOTE that I...
Read more >
unable to locate sdkconfig.h when generating phy_init_data.bin
C:\SysGCC\esp32\esp-idf\v3.2-beta3\components\esp32\phy_init_data.h(18,23): error : sdkconfig.h: No such file or directory.
Read more >
Espressif IoT Development Framework - Platformio Docs
ESP-IDF v4.0 projects are not backwards-compatible with ESP-IDF v3.x projects ... the project configuration depends on a pregenerated file sdkconfig.h which ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found