-->
Page 1 of 1

Q:How to set NONOS system on Windows (Msys)?

PostPosted: Tue Dec 20, 2022 4:19 am
by s56ffb
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 parts.

It seems that the xtensa-lx106-elf does not know where the SDK is located. What did I do wrong?

Re: Q:How to set NONOS system on Windows (Msys)?

PostPosted: Tue Dec 27, 2022 9:03 am
by s56ffb
OK, I'm change step 5 in:

5. In the folder etc/profile.d/ reate a new .sh script named export_esp_path.sh with next 2
lines:

export ESP_SDK="C:/ESP8266_NONOS_SDK"
export PATH=$PATH:/C/xtensa-lx106-elf/bin


Now xtensa-lx106-elf detects SDK and its libraries. However, there is a problem that shows the
image in below. What does this message mean?