- Pycom MicroPython source code
- Xtensa gcc compiler
- Espressif IoT Development Framework
sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-serial
Make build project directory
$ cd $HOME && mkdir pycom-build
$ git clone https://github.com/pycom/pycom-micropython-sigfox
Check out to latest stable version (output on date 2018-07-23)
$ git tags
1.11.0.b1
1.12.0.b1
1.13.0.b1
1.6.13.b1
v1.14.0.b1
v1.15.0.b1
v1.16.0.b1
v1.17.0.b1
v1.17.2.b1
v1.17.3.b1
v1.18.0
v1.18.0.r1 <--- Check out tag
v1.18.0.r1-0.
v1.19.0.b2
v1.19.0.b3
v1.19.0.b4
$ git checkout v1.18.0.r1
$ cd $HOME/pycom-build
$ wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
$ tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
$ export PATH=$PATH:$HOME/pycom-build/xtensa-esp32-elf/bin
Verify content of $PATH variables:
$ echo $PATH
Verify toolchain installation:
$ xtensa-esp32-elf-gcc -v
If command returns xtensa-esp32-elf-gcc: Command not found
recheck the the
export command!
$ cd $HOME/pycom-build
$ git clone https://github.com/pycom/pycom-esp-idf.git
$ cd pycom-esp-idf
$ git submodule update --init
$ export IDF_PATH=$HOME/pycom-build/pycom-esp-idf
More details:
- https://github.com/pycom/pycom-esp-idf
- https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html
$ $HOME/pycom-build/pycom-micropython-sigfox
$ cd mpy-cross && make clean && make && cd ..
Add custom python modules to include in the firmware in following directory:
$HOME/pycom-build/pycom-micropython-sigfoxesp32/frozen
Currently support for the following BOARD types:
WIPY LOPY SIPY GPY FIPY LOPY4
Build process:
$ cd $HOME/pycom-build/pycom-micropython-sigfoxesp32/esp32
$ make BOARD=LOPY clean
$ make BOARD=LOPY -j5 TARGET=boot
For LoRa need to specify the LORA_BAND
# LORA_BAND=USE_BAND_868
# LORA_BAND=USE_BAND_915
$ make BOARD=LOPY -j5 LORA_BAND=USE_BAND_868 TARGET=app
Pysense board
# On linux
$ make BOARD=LOPY -j5 ESPPORT=/dev/ttyACM0 flash
Connect GND to P23
# On linux
$ make BOARD=LOPY -j5 ESPPORT=/dev/ttyUSB1 flash
# On MacOSX
$ make ESPPORT=/dev/tty.usbserial-DQ008HQY flash
https://github.com/pycom/pycom-micropython-sigfox#the-esp32-version