Flashing the SD card (only once)
The SD card contains an "image" which is the file system to run Linux (just like the hard disk on most computers) and the so-called "bitstream" for the FPGA. To be able to use the PYNQ board, you need to copy the image on the SD card. You need to flash your SD card only once per course.
If you bought a PYNQ kit for 5EWC0 2023/24 (Programming and Engineering Challenge) then your SD card is already flashed and you can directly configure your PYNQ
⚠️ Warning
(Re)flashing your SD card will remove all data on the SD card. Make sure that you copy any data that wish to save!ℹ️ Information
If a course requires a different SD card image than your SD card contains, then you can just reflash your SD card with the right image.ℹ️ Information
You can use your PYNQ board with multiple SD cards with different images. You can change the SD card but only when the PYNQ board is switched off. Changing SD cards does not lose any data.ℹ️ Information
If for some reason your SD card becomes corrupted then you can just reflash it.ℹ️ Information
If you buy your own SD card make sure you buy a fast high-reliability SD card of at least 16 GB (preferably 32 GB). Cheaper cards are slower (to flash and to run Linux) and wear out quickly.
Step 1: Download the right SD-card image
-
Visit the SD-Card Images page and download the latest PYNQ image for your board. Make sure that you use the latest image for the course that you're following.
-
Unzip the downloaded
.zip
file on your computer. This results in a.img
file on your computer (something likesdcard-5EWC0-2023-v0.2.0.img
). It is not enough to just open and view the.zip
file's contents.
Step 2: Flash the image on the SD card
Please note that the method of flashing the image to your SD card differs per operating system. Continue to the correct method for the operating system you're running and follow the steps.
Step 2: Windows and Linux
- Insert the SD card into your computer. You may need an adapter as shown below:
- Download and install Balena Etcher.
- Run Balena Etcher and select the PYNQ
.img
file (something likesdcard-5EWC0-2023-v0.2.0.img
). -
Select the SD card as the destination drive.
⚠️ Warning
Be careful not to overwrite your Windows or Linux installation! Select the destination drive that shows the size of your SD card (probably 16-64 GB). Your laptop's internal storage will be much bigger (256 GB or more).
-
Click on the Flash! button to start flashing the image onto the SD card. Copying can take more than 10 minutes; have a coffee in the mean time.
- Wait for both the flashing and verification process to complete.
- Eject the SD card if this is not done automatically and remove it from your computer.
Step 2: macOS with Intel processors
Balena Etcher works on Intel Macs only.
ℹ️ Information
You can check if your Mac has an Intel processor by navigating to "About this Mac" in "System Preferences".
- Insert the SD card into your computer. You may need an adapter like shown in the "Step 2: Windows and Linux" Section.
- Download and install Balena Etcher.
-
Run Balena Etcher and select the PYNQ
.img
file (something likesdcard-5EWC0-2023-v0.2.0.img
).ℹ️ Information
You need to run Balena Etcher using an account that has administrator rights.
-
Select the SD card as the destination drive.
⚠️ Warning
Be careful not to overwrite your macOS installation! Select the destination drive that shows the size of your SD card (probably 16-64 GB). Your laptop's internal storage will be much bigger (256 GB or more).
-
Click on the Flash! button to start flashing the image onto the SD card.
- You may have to type in the password of an administrator.
Give Balena Etcher permission to access the disk.
- Wait for both the flashing and verification process to complete.
Copying can take more than 10 minutes; have a coffee in the mean time. - Eject the SD card if this is not done automatically and remove it from your computer.
Step 2: macOS with Apple/M-series processors
Balena Etcher does not work on Macs with Apple M-series processors and you will need to use the solution provided below.
⚠️ Warning
This is an alternative solution for experts only. Using the wrong output device can irreparably damage your macOS operating system.
ℹ️ Information
You can check if your Mac has an Apple processor by navigating to "About this Mac" in "System Preferences".
-
Open the Terminal application (
/Applications/Utilities/Terminal
) and check which devices are available with thedisk util
command. The output should be something like this (shown in both the Terminal and Disk Utility applications): -
Insert the SD card into your computer. You may need an adapter like shown in the "Step 2: Windows and Linux" Section.
-
In a terminal check which devices are available with the
diskutil list
command. The output should be something like this (shown in the Terminal and Disk Utility applications): Determine which device is new. In this example it is/dev/disk4
.⚠️ Warning
Be careful not to overwrite your macOS installation! Select the device that shows the size of your SD card (probably 16-64 GB). Your laptop's internal storage will be much bigger (256 GB or more).
-
Unmount the new device with the
diskutil unmountDisk /dev/diskXXX
command. In our example,diskXXX
would bedisk4
. -
Copy the disk image to the SD card with the following command:
sudo dd if=sdcard-5EWC0-2023-v0.2.0.img of=/dev/diskXX status=progress
Replace
sdcard-5EWC0-2023-v0.2.0.img
with the filename of your PYNQ image, anddiskXXX
with the new disk (disk4
in our example). You must run this command as a user with administrator privileges and you may be prompted for an administrator password. Note that the internal SD-card slot on the latest Mac Pro laptops is very slow, and flashing can take more than 30 minutes(!).
Continue
After flashing the correct image to your SD card, you can now go ahead and configure your PYNQ board.