Using Shrike from the Terminal¶
Use MicroPython’s mpremote tool to run programs and copy files to Shrike.
Before you begin, install the Shrike MicroPython firmware and download the LED blink bitstream as described in Getting Started.
1. Install mpremote¶
Activate a Python virtual environment and install mpremote:
pip install mpremote
2. Blink the MCU LED¶
First blink the LED connected to the RP2040/RP2350. Later you’ll load a bitstream to blink the FPGA LED.
Save this MicroPython script as test_led.py on your computer:
from machine import Pin
import time
led = Pin(4, Pin.OUT) # Onboard MCU LED
while True:
led.toggle()
time.sleep(0.5)
Run the file from your terminal:
mpremote run test_led.py
If several boards are connected, specify the serial port:
mpremote connect port:<port path> run test_led.py
The MCU LED should blink.
To open the interactive MicroPython prompt (REPL), run:
mpremote
You can now enter Python commands one line at a time.
3. Upload the bitstream¶
Download led_blink.bin for your board revision from the test bitstreams. Copy it to the board:
mpremote cp led_blink.bin :
The trailing colon selects the connected board. List its files to confirm the transfer:
mpremote ls
4. Configure the FPGA¶
Run this script on the board:
import shrike
shrike.flash("led_blink.bin")
Use mpremote run as in step 2, or enter the lines at the MicroPython prompt.
The FPGA LED should blink.
See the mpremote reference for more commands.
See also the MicroPython community discussion.