Building ESP32 toolchain on ARM (Armbian Raspbian)
Credits to jrullan original from arduino-esp32 issue
Another tutorial to build the toolchain from Kolban’s book on ESP32
Another tutorial to build the toolchain from ESP32 forum
Download ready build toolchain from Neil Kolbans website: toolchain
Video tutorial to build the toolchain from ESP32 – Development environment on PI
Install Arduino IDE on Armbian script
To install ESP32 toolchain on Armbian:
1. Install Prerequisites:
1 |
sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial |
2. Install Dependencies:
1 |
sudo apt-get install gawk grep gettext python-dev automake texinfo help2man libtool libtool-bin |
3. Download crosstool-NG
1 2 3 4 |
cd ~/esp git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git cd crosstool-NG ./bootstrap && ./configure --enable-local && make install |
4. Build
1 2 3 |
./ct-ng xtensa-esp32-elf ./ct-ng build chmod -R u+w builds/xtensa-esp32-elf |
5. Toolchain will be built in ~/esp/crosstool-NG/builds/xtensa-esp32-elf.
Follow instructions for standard setup to add the toolchain to your PATH.
Installation output (So you know what to expect!)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
xxxxxxx@pine64:~/crosstool-NG$ ./ct-ng xtensa-esp32-elf MKDIR config.gen IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in IN config.gen/debug.in CONF config/config.in # # configuration written to .config # *********************************************************** Initially reported by: Ivan Grokhotkov <ivan@espressif.com> URL: Comment: Based on xtensa-esp108-elf sample reported by Max Filippov <jcmvbkbc@gmail.com> *********************************************************** WARNING! This sample may enable experimental features. Please be sure to review the configuration prior to building and using your toolchain! Now, you have been warned! *********************************************************** Now configured for "xtensa-esp32-elf" xxxxxxx@pine64:~/crosstool-NG$ ./ct-ng build [INFO ] Performing some trivial sanity checks [INFO ] Build started 20180124.175557 [INFO ] Building environment variables [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [INFO ] Retrieving needed toolchain components' tarballs: done in 1340.35s (at 22:25) [INFO ] ================================================================= [INFO ] Extracting and patching toolchain components [INFO ] Extracting and patching toolchain components: done in 302.74s (at 27:28) [INFO ] ================================================================= [INFO ] Installing ncurses for build [INFO ] Installing ncurses for build: done in 157.91s (at 30:06) [INFO ] ================================================================= [INFO ] Installing GMP for host [INFO ] Installing GMP for host: done in 181.29s (at 33:07) [INFO ] ================================================================= [INFO ] Installing MPFR for host [INFO ] Installing MPFR for host: done in 138.04s (at 35:25) [INFO ] ================================================================= [INFO ] Installing ISL for host [INFO ] Installing ISL for host: done in 149.44s (at 37:55) [INFO ] ================================================================= [INFO ] Installing MPC for host [INFO ] Installing MPC for host: done in 63.21s (at 38:58) [INFO ] ================================================================= [INFO ] Installing expat for host [INFO ] Installing expat for host: done in 32.46s (at 39:30) [INFO ] ================================================================= [INFO ] Installing binutils for host [INFO ] Installing binutils for host: done in 376.66s (at 45:47) [INFO ] ================================================================= [INFO ] Installing C library headers & start files [INFO ] Installing C library headers & start files: done in 0.19s (at 45:47) [INFO ] ================================================================= [INFO ] Installing pass-2 core C gcc compiler [INFO ] Installing pass-2 core C gcc compiler: done in 1996.04s (at 79:03) [INFO ] ================================================================= [INFO ] Installing C library [INFO ] Installing C library: done in 245.31s (at 83:09) [INFO ] ================================================================= [INFO ] Installing final gcc compiler [INFO ] Installing final gcc compiler: done in 2581.76s (at 126:10) [INFO ] ================================================================= [INFO ] Installing cross-gdb [INFO ] Installing cross-gdb: done in 744.19s (at 138:35) [INFO ] ================================================================= [INFO ] Cleaning-up the toolchain's directory [INFO ] Stripping all toolchain executables [INFO ] Cleaning-up the toolchain's directory: done in 10.38s (at 138:45) [INFO ] Build completed at 20180124.201442 [INFO ] (elapsed: 138:44.91) [INFO ] Finishing installation (may take a few seconds)... [138:45] / xxxxxxx@pine64:~/crosstool-NG$ chmod -R u+w builds/xtensa-esp32-elf |






