This is the documentation for the latest development branch of MicroPython and may refer to features that are not available in released versions.

If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

Installing MicroPython

To facilitate the installation of the MicroPython PSOC™ Edge port, the mp-ifx-flash.py Python script is provided. It is compatible with Windows, Linux, and macOS.

Prerequisites

Before downloading and running the script, it is recommended to create a new folder to keep all the related files together. For example:

$ mkdir mp-install
$ cd mp-install

You can easily download the script from the terminal using the following command:

$ curl -s -L https://raw.githubusercontent.com/micropython/micropython/master/ports/psoc-edge/tools/mp-ifx-flash.py > mp-ifx-flash.py

Ensure you have a recent version of Python 3.x and the pip package installed. Then install the following packages:

$ pip install requests

Getting the firmware

Download the desired MicroPython firmware version for the PSOC™ Edge board from the MicroPython download page. The downloaded file is a .zip package containing the firmware binary and the necessary files for flashing.

Flashing

To flash the firmware, use the from-package command. Specify the board using the --board flag and the path to the downloaded .zip package using the --zip-package flag, as shown below:

$ python mp-ifx-flash.py from-package --board KIT_PSE84_AI --zip-package pathtodir/psoc-edge-package.zip

Multiple connected devices

If you have multiple PSOC™ Edge boards connected to your computer, you can identify them by their serial number and flash each one individually. To do so, use the -n flag to provide the serial number of the target board as shown below:

$ python mp-ifx-flash.py from-package --board KIT_PSE84_AI --zip-package pathtodir/psoc-edge-package.zip -n 181F0D5A01212300