tinygo esp8266开发

762 阅读1分钟
pip3 install --upgrade pip
pip3 install esptool
brew install llvm
brew install go
brew tap tinygo-org/tools
brew install tinygo

Toolchain Setup

ESP32 toolchain for macOS is available for download from Espressif website:

dl.espressif.com/dl/xtensa-e…

Download this file, then extract it in ~/esp directory:

mkdir -p ~/esp
cd ~/esp
tar -xzf ~/Downloads/xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz

The toolchain will be extracted into ~/esp/xtensa-esp32-elf/ directory.

To use it, you will need to update your PATH environment variable in ~/.profile file. To make xtensa-esp32-elf available for all terminal sessions, add the following line to your ~/.profile file:

export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin