MiniZed - Getting Started Guide - Avnet (Rev1.2)
MiniZed - Getting Started Guide - Avnet (Rev1.2)
Version 1.2
Page 1
Copyright © 2017 Avnet, Inc. AVNET, “Reach Further,” and the Avnet logo are registered
trademarks of Avnet, Inc. All other brands are the property of their respective owners.
LIT# MiniZed-GSG-v1-1-V1
Document Control
Document Version: 1.2
Page 2
Contents
Getting Started with MiniZed................................................................................. 6
What’s Inside the Box? ......................................................................................... 7
Optional add-on items: ............................................................................................................. 7
What’s on the Web? ............................................................................................. 7
Official Documentation: ............................................................................................................ 7
Tutorials and Reference Designs: ............................................................................................ 7
Trainings and Videos: ............................................................................................................... 7
Available through Avnet FAE: .................................................................................................. 7
MiniZed Key Features ........................................................................................... 8
MiniZed Basic Setup and Operation ................................................................... 10
Example Design ..................................................................................................................... 11
Hardware Setup ...................................................................................................................... 11
Boot Linux ........................................................................................................... 13
Reading from USB .............................................................................................. 15
Wi-Fi ................................................................................................................... 16
Bluetooth............................................................................................................. 24
I2C Sensor and GPIO ......................................................................................... 25
Linux File System ............................................................................................... 27
Poweroff.............................................................................................................. 30
Getting Help and Support ................................................................................... 31
Avnet Support ......................................................................................................................... 31
Xilinx Support ......................................................................................................................... 32
Installing and Licensing Xilinx Software .............................................................. 33
Install Vivado Design Suite, WebPack Edition ....................................................................... 33
Certification Disclaimer ....................................................................................... 34
Regulatory Compliance Information .................................................................... 35
Safety Warnings ................................................................................................. 36
RF Certification ................................................................................................... 37
Appendix A – Partition and Format eMMC.......................................................... 38
Page 3
Figures
Figure 1 – MiniZed ...................................................................................................... 6
Figure 2 – MiniZed Block Diagram .............................................................................. 9
Figure 3 – MiniZed Topology ..................................................................................... 10
Figure 4 – MiniZed USB-JTAG/UART Installed Correctly ......................................... 11
Figure 5 – MiniZed Switch Location .......................................................................... 12
Figure 6 – QSPI/Flash Boot Mode ............................................................................ 13
Figure 7 – COM Port Settings for USB-UART Terminal ............................................ 13
Figure 8 – PetaLinux Boot on MiniZed ...................................................................... 14
Figure 9 – USB Drive Recognized ............................................................................ 15
Figure 10 – USB Drive Mounted ............................................................................... 15
Figure 11 – Edit these 2 fields in wpa_supplicant.conf .............................................. 16
Figure 12 – iperf results on MiniZed .......................................................................... 17
Figure 13 – ping results ............................................................................................. 18
Figure 14 – Download and View Text File ................................................................. 19
Figure 15 -- ifconfig ................................................................................................... 20
Figure 16 – MiniZed FTP Session ............................................................................. 21
Figure 17 – WinSCP Launched ................................................................................. 22
Figure 18 – WinSCP Parameters Entered................................................................. 22
Figure 19 – WinSCP Save Session ........................................................................... 23
Figure 20 – MiniZed Bluetooth Discovers V20 Android ............................................. 24
Figure 21 – Testing LEDs, Button, Switch, and Sensor............................................. 25
Figure 22 – USER DIP set towards Push Button ...................................................... 25
Figure 23 – Print Working Directory .......................................................................... 27
Figure 24 – List Contents .......................................................................................... 27
Figure 25 – Detailed List Contents ............................................................................ 28
Figure 26 – Disk Free ................................................................................................ 28
Figure 27 – Find a File .............................................................................................. 29
Figure 28 – Which ..................................................................................................... 29
Figure 29 – fdisk started ............................................................................................ 38
Figure 30 – View Partitions ....................................................................................... 38
Figure 31 – Partition 1 Deleted .................................................................................. 39
Figure 32 – 128 MB Primary Partition Created .......................................................... 39
Page 4
Figure 33 – Partition #2 ............................................................................................. 39
Figure 34 – New Partitions ........................................................................................ 39
Figure 35 – Partition Type Set to FAT32 ................................................................... 40
Figure 36 – Partition Table Written ............................................................................ 40
Figure 37 – eMMC Partitions Mounted ...................................................................... 41
Page 5
Getting Started with MiniZed
The Avnet MiniZed enables hardware and software developers to explore the capabilities of the
Zynq™-7000 All Programmable SoC Single-Core. Designers can create or evaluate designs for
both the Zynq Processor Subsystem (PS) and the Programmable Logic (PL) fabric.
Figure 1 – MiniZed
This Getting Started Guide will outline the steps to setup the MiniZed hardware. It documents
the procedure to run a PetaLinux design running on the ARM® Cortex™-A9 MPCore™
Processing System (PS).
Page 6
What’s Inside the Box?
MiniZed development board
Voucher for SDSoC license from Xilinx
Micro USB cable
Quick Start Instruction card
Safety Instructions pamphlet
Official Documentation:
Getting started guide
Hardware user guide
Schematics
Bill of materials
Layout
PCB net lengths
Mechanical drawing
3D Model
Board definition files for Vivado integration
Programmable logic (PL) master user constraints
Page 7
MiniZed Key Features
Page 8
Figure 2 – MiniZed Block Diagram
Page 9
MiniZed Basic Setup and Operation
The functionality of the MiniZed is determined by the application booted from the non-volatile
memory – by default that is the QSPI and eMMC. This Getting Started Guide allows system
developers to exercise and demonstrate multiple circuits through PetaLinux, including:
USB 2.0
eMMC
Wi-Fi
Bluetooth
I2C Sensor
Microphone
In addition to the items included in the kit, you will also need the following to complete the
exercises in this tutorial.
Wi-Fi connection
2nd micro-USB cable
USB thumb drive formatted as FAT or FAT32
A MiniZed image in its expected out-of-box configuration is shown below along with the
locations of several key components.
Hardware Setup
1. The USB thumb drive must be formatted as FAT32. If this has not been previously done,
please do that now.
2. A terminal program is required. Tera Term was used in this example which can be
downloaded from the Tera Term project on the SourceForge Japan page:
ttssh2.sourceforge.jp Install Tera Term or another terminal program of your choice.
4. In the rare circumstance that the drivers are not auto-installed, then you must manually
install the driver for the FTDI FT2232H device. Visit the FTDI website and download the
appropriate driver for your operating system.
http://www.ftdichip.com/Drivers/VCP.htm
5. Make sure the MiniZed is unplugged from the PC. Unzip and install the driver.
Page 11
7. Set the MiniZed boot mode switch SW1 to QSPI mode (‘F’ for Flash) as shown below.
Page 12
Figure 6 – QSPI/Flash Boot Mode
Boot Linux
8. If previously disconnected, plug in the micro-USB cable to the USB-JTAG/UART port.
9. Plug in the 2nd micro-USB cable to the auxiliary power port. This is necessary for the USB
thumb drive to get power.
10. Launch and connect Tera Term using the settings shown below. Press the RESET button
(SW2) to reset the board so you can see the boot sequence.
11. Login into the system with the following credentials (note that these credentials are set up
under the PetaLinux build environment, and we purposely chose very simple username
and password for this example).
Username: root
Password: root
This Linux image creates a “ramdisk” file system in the DDR3 on MiniZed. Basic Linux
commands are available as you might expect on any Linux system.
Page 14
Reading from USB
12. Plug the USB thumb drive into MiniZed. Linux should recognize the drive and report status
to the terminal. Notice the USB device is labeled sda1.
13. PetaLinux will also automatically mount the USB drive. Issue the ‘df’ command to see
where the USB drive was mounted. Use ‘ls’ to see if you recognize the contents.
root@plnx_arm:~# df
root@plnx_arm:~# ls /run/media/sda1
The eMMC was previously partitioned and formatted when your board was tested. In fact, you
can see this in the ‘df’ command in Figure 10. The eMMC shows up as already mounted on
/run/media/mmcblk1p1. In the interest of time, we will use this existing formatted partition as
is. If you have time, you are welcome to learn about partitioning and formatting the eMMC in
Appendix A – Partition and Format eMMC at the end of this document.
Page 15
14. You may copy images from the USB stick to the eMMC.
root@plnx_arm:~# cd /run/media/sda1
root@plnx_arm:~# ls
root@plnx_arm:~# cp file1 ../mmcblk1p1
root@plnx_arm:~# cp file2 ../mmcblk1p1
Wi-Fi
15. Prior to testing the Wi-Fi, you must edit the configuration file to match your wireless
settings. The config file is wpa_supplicant.conf and is located on the eMMC. You
must edit this file so that SSID and passcode (psk) match your wireless connection. You
can use the built-in editor vi to do this.
You may also copy wpa_supplicant.conf to the USB stick, then edit on your PC, then
copy back to the eMMC.
root@plnx_arm:~# vi /run/media/mmcblk1p1/wpa_supplicant.conf
16. To test your Wi-Fi connection, several setup steps are required. To ease the burden of
typing, a script has been provided in the /usr/local/bin directory, which is in the
default search path. To view the script, use the cat command. View the comments in the
script to understand what the script is doing.
root@plnx_arm:~# wifi.sh
When MiniZed connects with the network it will obtain an IP address and report it in the Tera
Term window as below.
Page 16
18. Now run iperf in Server mode on the MiniZed side:
root@plnx_arm:~# iperf -s
19. To complete the test, you must also run the iperf Client side on your PC, connecting to the
displayed IP address. You can get iperf from the following site:
https://iperf.fr/iperf-download.php
20. First, make sure your PC is on the same Wi-Fi network as MiniZed. Also, turn off any
VPN or firewall that may prevent communication across the network. Open a CMD
window. Change directory to the location where you copied iperf. Then enter command
below, using the IP you discovered for MiniZed in the previous step.
iperf -c <IP_of_MiniZed>
Results are then displayed in Tera Term as well as in the CMD window, as shown below.
Page 17
22. Note that this step will only work if the Wi-Fi access point is connected to the
internet.
Now try using ping to see if you can reach various internet sites using the DHCP server to
resolve the IP addresses.
Page 18
23. Note that this step will only work if the Wi-Fi access point is connected to the
internet.
Page 19
24. Use ifconfig to get information about the connection.
root@plnx_arm:~# ifconfig
Figure 15 -- ifconfig
26. Connect an FTP session to the remote host with the command
ftp <MiniZed IP>
27. Use the login root. You can use the ftp session to transfer files back and forth across the
network to MiniZed. Commands such as ‘cd’ , ‘ls’ , ‘pwd’ , ‘put’ , and ‘get’ are all
useful commands.
Page 20
Figure 16 – MiniZed FTP Session
Page 21
29. So far we have seen how files can be copied to and from MiniZed using a USB memory
stick or over Wi-Fi via FTP. Lastly, we will look at a secure copy mechanism that can
also be used with a graphical interface. WinSCP can be downloaded from
http://winscp.net. It can be run command line under Windows or Linux.
30. Change the File protocol to SCP. Edit the Host name to match the IP address of
MiniZed. Use “root” for both the User name and Password.
Page 22
31. Click Save. You can set the Site name to “MiniZed” if you would like. You can also
choose to Save password. Then click OK.
32. Click Login. If you get a prompt about connecting to an unknown server, click .
33. On the left side pane of the WinSCP, which is the host, browse a directory containing a
file that you would like to transfer (for example, a new image.ub or .bin file for the QSPI).
On the MiniZed side, browse to /run/media/mmcblk1p1, which is the eMMC. Drag the
file to the eMMC side (or click F5) and click OK if prompted for permission.
Page 23
Bluetooth
34. To test your bluetooth connection, several setup steps are required. To ease the burden
of typing, a script has been provided in the /usr/local/bin directory. To view the script,
use the cat command. View the comments in the script to understand what the script is
doing.
root@plnx_arm:~# bt.sh
If you would like to scan again, do NOT rerun the script or it will hang your system.
37. To rescan the system, you can rerun the hcitool command:
Page 24
I2C Sensor and GPIO
To ease testing of several peripheral devices on your board, a user application, i2csensor, has
been built into image.ub.
38. To test the LEDs, button, switch, and I2C sensor on the board, enter
root@plnx_arm:~# i2csensor
39. Set the 2nd dip switch nearest the Arduino connector towards the LED. This puts both
LEDs into counting mode.
40. Press the PS push button (SW3) to blank the LEDs and restart the counter.
41. Set the 2nd dip switch towards the push button. This puts the outside LED into microphone
mode. Speak near the microphone, and the LED brightness will reflect the intensity of the
sound.
43. The relative temperature is also reported. For this sensor the temperature delta is actually
tracked, and the absolute displayed value is not necessarily accurate.
Page 26
Linux File System
root@plnx_arm:~# cd /bin/
root@plnx_arm:~# pwd
root@plnx_arm:~# ls
Page 27
48. To see full details, use the command below
root@plnx_arm:~# ls -l
49. To see how much free disk space is available, use the command df. This will also show
you what mass storage is already mounted. In our case, the eMMC (SDIO 1) partition #1
is /dev/mmcblk1p1 and is mounted at /run/media/mmcblk1p1.
root@plnx_arm:~# df
Page 28
50. To find a file in the file system, use the command ‘find’. The command below searches
from the root directory looking for a file called “flaschcp”.
Figure 28 – Which
A short list of several more useful file- and directory-oriented commands are listed below. For an
explanation of these commands, see:
https://en.wikibooks.org/wiki/Guide_to_Unix/Commands/File_System_Utilities.
mkdir
rmdir
rm
chmod
cp
mv
less <file>
Page 29
Poweroff
When you are finished experimenting with PetaLinux on MiniZed, you should shut PetaLinux
down gracefully to prevent corruption of your eMMC.
52. Enter either of the following commands to shut down the MiniZed properly. Both
accomplish the same thing.
root@plnx_arm:~# shutdown –h now
or
root@plnx_arm:~# poweroff
If you want to issue a restart to the system, use the following command:
root@plnx_arm:~# reboot
Page 30
Getting Help and Support
Avnet Support
The MiniZed is a versatile development kit that allows evaluation of the Zynq SoC, which can
help you adopt Zynq into your next design. All technical support is offered through
www.minized.org website support forums. MiniZed users are encouraged to participate in the
forums and offer help to others when possible.
http://minized.org/forums/
For questions regarding the MiniZed community website, please direct any questions to:
MiniZed.org Web Master – webmaster@MiniZed.org
To access the most current collateral for MiniZed please visit the community support page at:
www.MiniZed.org/content/support
To access the latest reference designs for MiniZed, click on the following link:
Page 31
To view online training and videos, click on the following link:
Xilinx Support
For questions regarding products within the Product Entitlement Account, send an e-mail
message to the Customer Service Representative in your region:
For technical support including the installation and use of the product license file, contact Xilinx
Online Technical Support at www.xilinx.com/support. The following assistance resources are also
available on the website:
Page 32
Installing and Licensing Xilinx Software
Install Vivado Design Suite, WebPack Edition
The Zynq device on the MiniZed is supported in Vivado Design Suite, WebPack Edition. Version
2017.1 or later is required for the on-board USB-JTAG/UART circuit to work. See
www.xilinx.com/products/design-tools/vivado/vivado-webpack.html
Although free, WebPack still must be licensed. To obtain your free license, visit the following
website and insert the voucher code from the certificate included in your kit:
http://www.xilinx.com/getlicense
If a full seat of Vivado System or Design Edition has already been installed, then no further
software will be needed. Please check online for any updates at:
www.xilinx.com/support/download/index.htm
For detailed instructions on installing and licensing the Xilinx tools, please refer to the latest
version of Vivado Design Suite User Guide Release Notes, Installation, and Licensing
(UG973). The 2017.1 version is available on the Xilinx website at:
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_1/ug973-vivado-release-notes-install-license.pdf
Page 33
Certification Disclaimer
Both CE and FCC certifications are necessary for system level products in those countries
governed by these regulatory bodies.
Because Avnet boards are intended for evaluation kits only and destined for professionals (you)
to be used solely at research and development facilities for such purposes, they are considered
exempt from the EU product directives and normally are not tested for CE or FCC compliance.
If you choose to use your board to transmit using an antenna, it is your responsibility to make
sure that you are in compliance with all laws for the country, frequency, and power levels in
which the device is used. Additionally, some countries regulate reception in certain frequency
bands. Again, it is the responsibility of the user to maintain compliance with all local laws and
regulations.
Page 34
Regulatory Compliance Information
EU Compliance Statement:
Hereby, Avnet declares that this device is in compliance with the essential requirements and other
relevant provisions of the Radio Equipment Directive 2014/53/EU. A full copy of the Declaration of
Conformity can be found at http://minized.org/policies.
US Compliance Statement:
This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions:
(1) This device may not cause harmful interference, and (2) this device must accept any interference
received, including interference that may cause undesired operation.
Changes or modifications not expressly approved by the party responsible for compliance could void the
user’s authority to operate the equipment.
This transmitter must not be co-located or operated in conjunction with any other antenna or
transmitter.
English
This device complies with Industry Canada’s licence-exempt RSSs. Operation is subject to the following
two
conditions:
(1) This device may not cause interference; and
(2) This device must accept any interference, including interference that may cause undesired operation
of the device.
French
Le présent appareil est conforme aux CNR d’Industrie Canada applicables aux appareils radio exempts
de licence.
L’exploitation est autorisée aux deux conditions suivantes:
1) l’appareil ne doit pas produire de brouillage;
2) l’utilisateur de l’appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est
susceptible
d’en compromettre le fonctionnement.
WEEE statement:
Correct Disposal of this product. This marking indicates that this product should not be disposed with other
household wastes throughout the EU. To prevent possible harm to the environment or human health from
uncontrolled waste disposal, recycle it responsibly to promote the sustainable reuse of material resources. To return
your used device, please use the return and collection systems or contact the retailer where the product was
purchased. They can take this product for environmental safe recycling.
Page 35
Safety Warnings
This product shall only be connected to an external power supply rated at 5V DC that provides a minimum
current of 500mA. Any external power supply used with MiniZed shall comply with relevant regulations and
standards applicable in the country of intended use.
Only compatible plug-in modules shall be connected to MiniZed. The connection of incompatible devices
may affect compliance or result in damage to the unit and void the warranty.
This product shall be operated in a well-ventilated environment. If a case is used, it shall have adequate
ventilation.
Page 36
RF Certification
The frequency range is 2.4 to 2.4835GHz.
The max power complies with 802.11b, which is 17dBm (typ).
Page 37
Appendix A – Partition and Format eMMC
Although the eMMC was previously formatted and partitioned, you can repeat the steps to learn
the process.
1. First, unmount the eMMC.
2. The Linux fdisk utility is used to create a partition on the storage media for use with a file
system. Enter the commands as shown below:
a. Start the fdisk utility for the eMMC controller. ( fdisk <device name> )
b. List the existing partition information by typing command ‘p’. If the storage media
has never been used, there should be no partitions shown. In our case, there is
one partition which is 3907 units large, 32768 bytes per unit, for a total of 128MB.
The formatting is Linux.
Page 38
c. Delete this partition with command ‘d’
d. Create a new primary partition #1 starting at the first cylinder and extending for
128 MB using commands ‘n’, ‘p’, ‘1’, ‘1’, ‘+128M’
e. Create another partition that spans the remainder of the eMMC, using commands
‘n’, ‘p’, ‘2’, ‘3908’, ‘232448’
Figure 33 – Partition #2
Page 39
g. Change the Type for Partition 1 to be FAT32 using commands ‘t’, ‘1’, ‘L’, ‘b’ and
then reprint the table with ‘p’
h. Write the partition table and exit fdisk using command ‘w’
3. Before the new partitions can be used, they must be formatted. Format the first one with
a FAT32 file system. Use the Linux mkdosfs utility to perform this action. ( mkdosfs –F 32
<device name> )
Page 40
root@plnx_arm:~# mkfs.vfat /dev/mmcblk1p2
5. The first partition will be automatically mounted. The second one must be mounted
manually.
Page 41