Open GarMingLi opened 4 years ago
Typesource ~/.profile in your terminal to execute your environment variable
I would have done this earlier, otherwise the print path wouldn't have seen the message.
But now that I've switched to root, I'm ready to compile.
It is amazing, I see the toolchain is xtensa-lx106-elf-linux32-1.22.0-100-ge567ec7-5.2.0.tar
, and it is used at 32-bit ubuntu system, so do you ubuntu WSL is 32-bit ?
64-bit.
@GarMingLi Did you manage to get this to work? I'm not using WSL(2) since there is no USB passthrough yet, thus I can't flash to my ESP8266 board.
I'm now trying MSYS2 and downloaded the "all-in-one toolchain & MSYS2 zip file" from here. Then, I also downloaded the toolchain for ESP8266 from the same site and put it in my ~/esp
folder. I've updated the PATH (in .bash_profile
) to include xtensa-lx106-elf/bin
, however when running make
the command can't be found.
I get the same error message that the command can't be found and additionally:
$ make
make: xtensa-lx106-elf-gcc: Command not found
expr: syntax error: unexpected argument „5.2.0“
which: no xtensa-lx106-elf-gcc in (hereIsMyPathWhereTheBinsAreLocated)
...
I've just moved the xtensa-lx106-elf-gcc
folder to /opt
(where you can already see the folder xtensa-esp32-elf
. Then, I've added these two lines at the end of .bash_profile
:
_Note that C:/msys32/home/domin/esp/ESP8266_RTOS_SDK
is the path I've cloned the RTOSSDK into.
export PATH=$PATH:/opt/xtensa-lx106-elf/bin
export IDF_PATH="C:/msys32/home/domin/esp/ESP8266_RTOS_SDK"
I don't know why, but now it's working 🎉
The fact, that we should put the extracted xtensa toolchain (in my case for Windows 10 using MSYS2) into the /opt
folder, should definitely be added to the documentation here.
[ ] I solved this by extracting the xtensa-lx106-elf-gcc8_4_0-esp-2020r3-win32.zip
file into msys32 home
directory
so now my Xtensa path looks like this: C:\msys32\home\PC\xtensa-lx106-elf\bin
(where instead of PC it will be your username)
[ ] Once this is done, open mingw32.exe
and run the following commands:
PATH="${HOME}/xtensa-lx106-elf/bin:${PATH}"
export IDF_PATH=~/esp/ESP8266_RTOS_SDK
[ ] Now run echo $PATH
and echo $IDF_PATH
to check if the newly included paths are there.
Navigate to any of the examples and run make
. Hopefully, it should all work now.
- [ ] I solved this by extracting the
xtensa-lx106-elf-gcc8_4_0-esp-2020r3-win32.zip
file into msys32home
directory so now my Xtensa path looks like this:C:\msys32\home\PC\xtensa-lx106-elf\bin
(where instead of PC it will be your username)- [ ] Once this is done, open
mingw32.exe
and run the following commands:PATH="${HOME}/xtensa-lx106-elf/bin:${PATH}"
export IDF_PATH=~/esp/ESP8266_RTOS_SDK
- [ ] Now run
echo $PATH
andecho $IDF_PATH
to check if the newly included paths are there.Navigate to any of the examples and run
make
. Hopefully, it should all work now.
this works for me, thanks @nabeelkirmani
I solved this by extracting the xtensa-lx106-elf-gcc8_4_0-esp-2020r3-win32.zip file into msys32 home directory so now my Xtensa path looks like this: C:\msys32\home\PC\xtensa-lx106-elf\bin (where instead of PC it will be your username)
Once this is done, open mingw32.exe and run the following commands: PATH="${HOME}/xtensa-lx106-elf/bin:${PATH}" export IDF_PATH=~/esp/ESP8266_RTOS_SDK
Now run echo $PATH and echo $IDF_PATH to check if the newly included paths are there.
This works for me too. I agree with @nabeelkirmani, the guide should be improved.
Environment
Problem Description
I built the development environment of ESP8266 RTOS SDK in the Ubuntu subsystem of win10, but there was an error when compiling:
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:~/esp/xtensa-lx106-elf/bin
xtensa-lx106-elf-gcc -v
The environment variable is normal, but I'm not sure why it was compiled incorrectly.