So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By s56ffb
#95639 Hi,

I noticed an interesting project on the Github that uses ESP8266 and Non-os code.The project
documentation states:

qz]Install ESP8266 gcc. See

https://docs.espressif.com/projects/esp ... setup.html
Fetch ESP8266_NONOS_SDK from https://github.com/espressif/ESP8266_NONOS_SDK
Point environment variable ESP_SDK to the SDK directory.
Install esptool.


Since I already have a MSYS system that compile gcc code for AVR devices
(http://siz.hu/en/content/sd2iec-develop ... nt-windows), I tried to add support also
for xtensa-lx106-elf and ESP8266 NONOS SDK by next 7 steps:

1. Download the toolchain 8.4.0 from
https://docs.espressif.com/projects/esp ... setup.html

2. Extract zip on C: ,result is new folder C:\xtensa-lx106-elf

3. Download zip from https://github.com/espressif/ESP8266_NONOS_SDK

4. Extract zip on C: ,result is new folder C:\ESP8266_NONOS_SDK

5. In the .bat file that start Msys, I add next 3 lines:
set Xtensa_PATH=%CD:~0,2%\xtensa-lx106-elf
set PATH=%PATH%;%Xtensa_PATH%\bin
set ESP_SDK=%CD:~0,2%\ESP8266_NONOS_SDK

6. Run the Msys and test:
xtensa-lx106-esp-gcc -- version -> print version 8.4.0 and other stuff

printenv ESP_SDK -> C:\ESP8266_NONOS_SDK

7, run sh script in /C/ESP8266_NONOS_SDK/driver_lib
./make_lib.sh driver
--------

But this not work...

When I start the make command in the project folder, compiler did not find ets_sys.h. I solved
this by simply add the missing .h files from SDK into the project folder.

Now compiling started successfully and produce object code (.o files), but then the linker
reported cannot find -lhal and few other missing files or folders (picture below).

It seems that the xtensa-lx106-elf does not know where the SDK is located. What did I do wrong?
You do not have the required permissions to view the files attached to this post.