esp32编译工具链安装
2016-02-03 16:20
253 查看
We suggest to choose Crosstool-ng as the compiler toolchain. Follow the instructions below to install Crosstool-ng.
Step 1. Install the required toolchain packages.
Step 2. Create a directory (e.g./opt/Espressif) to store the toolchain.
Step 3. Make the current user the owner.
Step 4. Download the latest toolchain installation file to the directory created in Step 2.
Step 5. Install toolchain.
Step 6. Set the PATH variable to point to the newly compiled toolchain.
Note: You need to do Step 6 once you open a new shell, or you can put it inside your .bashrc file
Step 1. Create a directory (e.g.~/Workspace) to store a new project.
Step 2. Clone ESP32 RTOS SDK.
Step 3. Copy ESP32_RTOS_SDK/examples/project_template to Workspace directory created in Step 1.
Step 4. Create a directory (e.g.~/Workspace/ESP32_BIN) to store the bin files compiled.
Step 5. Set SDK_PATH as the path of SDK files and BIN_PATH as the path of .bin files compiled.
Notice: Make sure you set the correct paths, or it will occur a compile error.
Step 6. Start to compile files
Note: You need to do Step 3 every time you open a new shell, or you can put it inside your .bashrc file.
If your project is successfully compiled, the irom1.bin, irom0_flash.bin, and user.ota files will be generated in ~/Workspace/ESP32_BIN directory.
Step 1. Install the required toolchain packages.
sudo apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-i386 python-serial libexpat-dev
Step 2. Create a directory (e.g./opt/Espressif) to store the toolchain.
sudo mkdir /opt/Espressif
Step 3. Make the current user the owner.
sudo chown $USER /opt/Espressif/
Step 4. Download the latest toolchain installation file to the directory created in Step 2.
cd /opt/Espressif/ git clone -b esp108-1.21.0 git://github.com/jcmvbkbc/crosstool-NG.git
Step 5. Install toolchain.
cd crosstool-NG ./bootstrap && ./configure --prefix=`pwd` && make && make install ./ct-ng xtensa-esp108-elf ./ct-ng build
Step 6. Set the PATH variable to point to the newly compiled toolchain.
export PATH=/opt/Espressif/crosstool-NG/builds/xtensa-esp108-elf/bin:$PATH
Note: You need to do Step 6 once you open a new shell, or you can put it inside your .bashrc file
Project
template Compile
Step 1. Create a directory (e.g.~/Workspace) to store a new project.mkdir ~/Workspace
Step 2. Clone ESP32 RTOS SDK.
cd ~/Workspace git clone https://github.com/espressif/ESP32_RTOS_SDK.git
Step 3. Copy ESP32_RTOS_SDK/examples/project_template to Workspace directory created in Step 1.
cp ~/Workspace/ESP32_RTOS_SDK/examples/project_template ~/Workspace/ -r
Step 4. Create a directory (e.g.~/Workspace/ESP32_BIN) to store the bin files compiled.
mkdir –p ~/Workspace/ESP32_BIN
Step 5. Set SDK_PATH as the path of SDK files and BIN_PATH as the path of .bin files compiled.
export SDK_PATH=~/Workspace/ESP32_RTOS_SDK export BIN_PATH=~/Workspace/ESP32_BIN
Notice: Make sure you set the correct paths, or it will occur a compile error.
Step 6. Start to compile files
cd ~/Workspace/project_template make clean make
Note: You need to do Step 3 every time you open a new shell, or you can put it inside your .bashrc file.
If your project is successfully compiled, the irom1.bin, irom0_flash.bin, and user.ota files will be generated in ~/Workspace/ESP32_BIN directory.
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- Ubuntu Linux使用体验
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- Ubuntu 12.04和Windows 7双系统安装图解
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试
- 你应该选择 Ubuntu 还是 Fedora?
- 100 个最佳 Ubuntu 应用(中)
- 看看我的Ubuntu Linux截图
- Ubuntu 12.04 LTS服务器版安装过程及使用图解
- Windows 7/8/8.1 硬盘安装 Ubuntu 14.04 实现双系统