以下脚本安装 esp-idf、所需的依赖项,然后为 ESP32 构建 MicroPython。
build_micropython_esp32.sh
apt -y update && apt -y install python3 python3-pip cmake
# 安装 esp-idf
git clone --depth 1 -b v4.4.3 https://github.com/espressif/esp-idf.git /opt/esp-idf
cd /opt/esp-idf && git submodule update --init --recursive && ./install.sh
# 克隆 micropython
git clone --depth 1 -b v1.19.1 https://github.com/micropython/micropython.git /opt/micropython
# 构建 micropython
cd /opt/micropython/ && make -C mpy-cross
# 构建 micropython@esp32
cd /opt/micropython/ports/esp32 && source /opt/esp-idf/export.sh && make submodules && make -j4
按类别查看类似文章:
嵌入式 ESP8266/ESP32 MicroPython
如果这篇文章对您有帮助,请考虑请我喝杯咖啡或通过 PayPal 捐款,以支持 TechOverflow 上新文章的研究与发布