mynote/esp/build_code_with_micropython.md
2019-01-30 17:16:51 +08:00

846 B

在esp8266上编译micropython固件

安装编译工具

$ git clone --recursive https://github.com/pfalcon/esp-open-sdk.git

安装烧录工具

$ pip install esptool

下载源程序

$ git clone git@github.com:micropython/micropython.git

编译固件

$ export PATH=/home/light/PycharmProjects/esp-open-sdk/xtensa-lx106-elf/bin:$PATH
$ cd micropython
$ git submodule update --init
$ make -C mpy-cross
$ cd esp8266
$ make axtls
$ make
重新编译
$ make clean
$ make axtls
$ make

刷写固件

$ sudo esptool.py --port /dev/ttyUSB0 erase_flash
$ sudo esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect 0 build/firmware-combined.bin