ESP8266 NonOS SDK Toolchain problem

I have some strange problem with platformio.

After run task “Update all” (Ctrl+Alt+T from VSCode) I see new folder “toolchain-xtensa@1.40802.0” in packages “version”: “1.40802.0” , and “toolchain-xtensa” version “version”: “2.40802.190218”. After this project cann’t compile. If I erase toolchain-xtensa@1.40802.0 platformio download it again.

Problem very simple: " user_config not found. " and I can solve it.
I read information from kolban ( The use of "user_config.h" - ESP8266 Developer Zone ) where he write, that is bad idea and solution on this page. It solved problem. But simple “hello world” example from platformio in [user].platformio\platforms\espressif8266\examples\esp8266-nonos-sdk-blink\src\ - cann’t be compiled , because [user].platformio\packages\framework-esp8266-nonos-sdk\include/osapi.h:30:25: fatal error: user_config.h: No such file or directory . Platformio doesn’t include user_config.h from src project folder. And from include folder too.

I don’t really understand your exact setup, can you post the platformio.ini and code you’re using?

It should be sufficient to create a user_config.h in the src/ or include folder. If it is still not found, you can add build_flags = -I src/ to e.g. add src/ to the header search index.

No changes from autogenerated.

platform = espressif8266
board = esp12e
framework = esp8266-nonos-sdk

Yes, then I add
build_flags = -I src/
and put user_config.h in src folder this is fix my problem.

Any code. Without this line “build_flags = -I src/” or without empty (or any correct exited) user_config.h in [user].platformio\packages\framework-esp8266-nonos-sdk\include\
Without this changes I cann’t compile simple sample from platformio - esp8266-nonos-sdk-blink

This is sample.
Without build_flags:

#include “user_config.h”
compilation terminated.
In file included from C:\Users[].platformio\packages\framework-esp8266-nonos-sdk\driver_lib\driver\hw_timer.c:27:0:
C:\Users[].platformio\packages\framework-esp8266-nonos-sdk\include/osapi.h:30:25: fatal error: user_config.h: No such file or directory

See updated example => platform-espressif8266/examples/esp8266-nonos-sdk-blink at develop · platformio/platform-espressif8266 · GitHub

You need to add extra path where your configuration is located via build_flags option.

1 Like

Вifferent behavior in RTOS SDK.
All files from src/ includes automaticaly with this config, without any build_flags.

platform = espressif8266
board = esp12e
framework = esp8266-rtos-sdk