Welcome to FPGA MicroPython (FμPy)
Gateware is the name we use for the hardware code that is loaded onto the FPGA that MicroPython runs on.
Jan 2018 blog post with instructions for Numato Mimas v2 and Digilent Arty A7, using
timvideos/litex-buildenv(currently more maintained than the
Older detailed instructions for the MimasV2 (note: since this was written the repository has been renamed from
fupyand the build process has been streamlined; see blog post above)
Developing in MicroPython environment
- get lm32 toolchain
- git clone https://github.com/fupy/micropython.git
- cd litex
- Download prebuilt gateware + headers using
- Compile micropython
- Load micropython
Developing in HDMI2USB LiteX environment
- Follow getting started instructions to setup gateware environment.
- Enter the gateware environment with ./scripts/enter-env.sh
- Set PLATFORM and TARGET correctly - IE “export PLATFORM=mimasv2” if using the MimasV2
- Build the gateware with
This will give you an image for your target at
./build/$PLATFORM_$TARGET_lm32/micropython.bin which you can then flash to your board.
Running MicroPython inside QEmu environment
The HDMI2USB LiteX environment provides some limited QEmu emulation of the FPGA gateware, this means you can test your code without needing hardware.
It can be used with the MicroPython image by running
./scripts/build-qemu.sh and then replacing
-kernel qemu.bin with
-kernel micropython.bin in the last command.
MimasV2 - $50 USD, Spartan 6 board with DDR memory.
These targets don’t need any physical hardware and are good for testing / developing.