Page 1 of 2

Build tools for 32-bit Linux

Posted: Mon Jan 16, 2017 6:21 pm
by luca.gamma
Following instructions in the ESP-IDF documentation about Linux setup it is not possible to download the 32-bit version of the Linux build tools 1.22.0-61 (nice to have because I'm also running Xubuntu on a netbook). Currently I installed 1.22.0-59 (GCC 4.8.5) but with the latest Git update the compilation fails when linking the app image:

Code: Select all

WARNING: Toolchain version is not supported: crosstool-NG crosstool-ng-1.22.0-59-g8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Toolchain version is not supported: crosstool-NG crosstool-ng-1.22.0-59-g8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
...
CC main.o
AR libmain.a
LD demo.elf
/home/luca/Playground/projects/espressif/esp32.works/demo/build/esp32/libesp32.a(system_api.o):(.iram1.literal+0x34): undefined reference to `esp_wifi_stop'
/home/luca/Playground/projects/espressif/esp32.works/demo/build/esp32/libesp32.a(system_api.o): In function `esp_restart_noos':
/home/luca/Playground/projects/espressif/esp-idf/components/esp32/./system_api.c:38: undefined reference to `esp_wifi_stop'
collect2: error: ld returned 1 exit status
/home/luca/Playground/projects/espressif/esp-idf/make/project.mk:313: recipe for target '/home/luca/Playground/projects/espressif/esp32.works/demo/build/demo.elf' failed
make: *** [/home/luca/Playground/projects/espressif/esp32.works/demo/build/demo.elf] Error 1
May the 1.22.0-59 break the SDK? Thanks!

Re: Build tools for 32-bit Linux

Posted: Tue Jan 17, 2017 1:48 am
by ESP_Sprite
That may be a bug in the SDK instead; have you confirmed that it *does* work on a 64-bit system? Either way, we'll investigate.

Re: Build tools for 32-bit Linux

Posted: Tue Jan 17, 2017 7:15 am
by ESP_krzychb

Re: Build tools for 32-bit Linux

Posted: Tue Jan 17, 2017 7:19 am
by luca.gamma
Yes, the same code compiles on Linux 64 with xtensa-esp32-elf-linux64-1.22.0-61 but NON on Linux 32 with xtensa-esp32-elf-linux32-1.22.0-59. The main topic is that I would like to update the toolchain on Linux 32 too with xtensa-esp32-elf-linux32-1.22.0-61 BUT the link is broken:

Code: Select all

https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-61-gab8375a-5.2.0.tar.gz -> 404 Not Found

Re: Build tools for 32-bit Linux

Posted: Tue Jan 17, 2017 12:57 pm
by matiasjara
Hello,

I have the same problem on Windows 32.

Code: Select all

$ make app
WARNING: Toolchain version is not supported: crosstool-NG 8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
LD app-template.elf
C:/Users/mjara/Documents/esp32/esp-idf-template/build/esp32\libesp32.a(system_api.o):(.iram1.literal+0x38): undefined reference to `esp_wifi_stop'
C:/Users/mjara/Documents/esp32/esp-idf-template/build/esp32\libesp32.a(system_api.o): In function `esp_restart_noos':
C:/Users/mjara/Documents/esp32/esp-idf/components/esp32/system_api.c:38: undefined reference to `esp_wifi_stop'
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/4.8.5/../../../../xtensa-esp32-elf/lib\libstdc++.a(vterminate.o):(.literal._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x8): undefined reference to `_impure_ptr'
collect2.exe: error: ld returned 1 exit status
make: *** [/c/Users/mjara/Documents/esp32/esp-idf/make/project.mk:314: /c/Users/mjara/Documents/esp32/esp-idf-template/build/app-template.elf] Error 1
Any help?
Thank you!

Re: Build tools for 32-bit Linux

Posted: Tue Jan 17, 2017 3:21 pm
by luca.gamma
luca.gamma wrote:

Code: Select all

WARNING: Toolchain version is not supported: crosstool-NG crosstool-ng-1.22.0-59-g8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Toolchain version is not supported: crosstool-NG crosstool-ng-1.22.0-59-g8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
...
CC main.o
AR libmain.a
LD demo.elf
/home/luca/Playground/projects/espressif/esp32.works/demo/build/esp32/libesp32.a(system_api.o):(.iram1.literal+0x34): undefined reference to `esp_wifi_stop'
/home/luca/Playground/projects/espressif/esp32.works/demo/build/esp32/libesp32.a(system_api.o): In function `esp_restart_noos':
/home/luca/Playground/projects/espressif/esp-idf/components/esp32/./system_api.c:38: undefined reference to `esp_wifi_stop'
collect2: error: ld returned 1 exit status
/home/luca/Playground/projects/espressif/esp-idf/make/project.mk:313: recipe for target '/home/luca/Playground/projects/espressif/esp32.works/demo/build/demo.elf' failed
make: *** [/home/luca/Playground/projects/espressif/esp32.works/demo/build/demo.elf] Error 1
After last IDF commit (a14bef8) the compilation issue on 32-bit Linux seems to be resolved, now compiling even with 1.22.0-59 (GCC 4.8.5). Tested with idf-template, a slightly modified blink and spi_master examples.

Re: Build tools for 32-bit Linux

Posted: Wed Jan 18, 2017 6:35 am
by luca.gamma
matiasjara wrote: Any help?
Thank you!
Updating the IDF seems to resolve this issue:

Code: Select all

$ cd esp-idf
$ git pull
$ git submodule update
$ cd $PROJECT
$ make clean; make defconfig; make all

Re: Build tools for 32-bit Linux

Posted: Thu Jan 19, 2017 8:47 pm
by ESP_krzychb
../esp-idf/components/esp32/./system_api.c:38: undefined reference to `esp_wifi_stop'
I have noticed exactly the same error when compiling sd_card example.

This example is not using Wi-Fi at all.
To resolve this error I have disabled Wi-Fi in menuconfig.

Re: Build tools for 32-bit Linux

Posted: Thu Feb 02, 2017 6:51 am
by Ritesh
Hi All,

Is there any other location from where I can get both 32 and 64 bit toolchain in compressed package as I am also getting same error like "404 page not found" while opening this below link.
I have tried manual steps to cross compile toolchain source but getting some problem as I am using older Ubuntu 12.04 Linux system in which some packages are older which causes to stop to compile the toolchain from source using crosstool-NG

Please provide me link from where I can get both updated 5.2.0 toolchain for 32 bit and 64 bit machines as I need to compile my application using latest ESP32-IDF SDK in which they have mentioned that you need higher version of toolchain for that as per below logs.
Unknown option: -C
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
WARNING: Toolchain version is not supported: crosstool-NG crosstool-ng-1.22.0-59-g8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
Unknown option: -C
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
WARNING: Toolchain version is not supported: crosstool-NG crosstool-ng-1.22.0-59-g8d95cad
Expected to see version: crosstool-NG crosstool-ng-1.22.0-61-gab8375a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
WARNING: Compiler version is not supported: 4.8.5
Expected to see version(s): 5.2.0
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.

Re: Build tools for 32-bit Linux

Posted: Thu Feb 02, 2017 2:57 pm
by kolban
You can download the Linux 64 bit compiled toolchain from here:

https://dl.espressif.com/dl/xtensa-esp3 ... 2.0.tar.gz

See the following docs:

http://esp-idf.readthedocs.io/en/latest ... -the-esp32

However, the link for the 32 bit compiled toolchain is not working as of the date of this post and there is an open issue to resolve that .. see:

https://github.com/espressif/esp-idf/issues/279