This project encompasses a TFTP (Trivial File Transfer Protocol) server operating on a card equipped with Xilinx's Zynq-7000 series FPGA and ARM processor combination.
Report Bug
or
Request Feature
Table of Contents
This project presents a specialized implementation of a TFTP (Trivial File Transfer Protocol) server designed for the Zynq-7000 SoC, specifically utilizing the AMD Zynq 7000 SoC ZC702 Evaluation Kit. The focus of this project is to harness the capabilities of the ZC702 board, transforming it into a dedicated server that facilitates efficient file transfers. Users can directly transfer files to the SD card located on the ZC702 evaluation board via an Ethernet connection. This setup not only ensures high-speed data transmission but also maintains simplicity and ease of use. The project is tailored to cater to environments where quick and efficient file transfer is crucial, such as in embedded systems development and educational applications related to the Zynq-7000 SoC. By concentrating on the TFTP protocol and the specific features of the ZC702 board, the project aims to deliver a robust and user-friendly file transfer solution that leverages the full potential of the Zynq-7000 platform.
This guide will help you set up and start using the Zynq-7000 TFTP server. Before beginning, ensure you have the AMD Zynq 7000 SoC ZC702 Evaluation Kit and an Ethernet connection. If you have are facing any issues in this section, feel free to contact me!
There is no specific pre-requisites list for this project. You just need to have:
- Xilinx Vitis for programming (I'm using 2020.2 version)
- A TFTP application to send and receive files (I'm using Tftpd64 by Philippe Jounin)
- Appropriate drivers for using the UART with ZC702 Evaluation Kit (CP210x USB to UART Bridge driver needed to view
printf
statements. You can click here to go to the download page of this driver.)
- Download
TFTP_server_v1.2.0.zip
file from releases page. - Create a new folder for the workspace.
- Open Vitis and select the newly created workspace folder.
- Select "Vitis project exported zip file" and click "Next.
- Click "Browse..." button next to the "Archive File" text and select the
TFTP_server_v1.2.0.zip
file. - Make sure all of these 3 projects are ticked:
- TFTP_server-app
- TFTP_server-app_system
- TFTP_server-platform If any of them are not ticked, tick it.
- Click "Finish" button. After importing is finished, right click on the
TFTP_server-app_system
project and click "Clean Project". After you see thee "Build Finished" text in the console below, right click again theTFTP_server-platform
project and click "Build Project". And then wait until the "Build Finished" text to appear on the console. Then build theTFTP_server-app_system
project, either.
You have various options to run this software on the ZC702 board:
- JTAG
- QSPI
- SD card etc.
The only methods I tried were JTAG and QSPI. To use this program with JTAG, you just need to debug the project after importing it into Vitis. However, you will only be able to use this program when connected to the computer via a USB cable. As a second and recommended method, you can connect it to the computer via JTAG and write the software to the QSPI. In this way, after turning off the board, setting the boot switch as necessary and turning it on again, you will see the software running automatically.
To perform the AES encryption, run the AES_Encryption.exe
file located in the AES_encryption
folder. When this file is executed, a terminal window will open. Drag and drop your BOOT.BIN
file into this terminal window (See steps 1 to 3 in the Flashing the Software to the QSPI section to create your boot image). Once the file path appears in the terminal, simply press Enter to complete the process. The encrypted file is saved under the same folder with the name BOOT_encrypted.BIN
. You can find the source code of this tiny application in the AES_Encryption/src folder. The decryption operation is done by Zynq device automatically and it may take a while. Like, a couple of minutes.
You must build the project before these steps.
(DEPRECATED, SEE AUTOMATIC FLASHING SECTION)
- Right click on the
TFTP_server-app_system
and select "Create Boot Image". - Click "Browse" button next to the "Output Path" text and select a path for the output file and name it as BOOT.BIN. Be aware, you should click the button next to the "Output Path" text, not "Output BIF File Path".
- Click "Create Image" button. If any message box appears that says a BIF file already exists, just click OK and wait for the "Bootimage generated successfully" text in the console down below.
- Right click on the
TFTP_server-app_system
and select "Program Flash". - Click "Browse" button next to the "Image File" text and find the
BOOT.BIN
file you've just created. - Click "Program" button and wait for flashing to finish. Be aware, do not turn off the board while flashing software!
In order to use this server, you need to make your computer's Ethernet settings as in the software. The necessary IP address settings for the board are located in the tftp_server.h
file. You can change these settings as you wish. If you want to connect to the server with the default settings:
- Go to your computer's ethernet settings and set your computer's IPv4 address to
192.168.1.X
. Since the board's default IPv4 address is192.168.1.10
, you need to select another number instead of X. - You need to set your computer's IPv4 mask to
255.255.255.0
. If you want to use a different setting, you must change it in the software. - There is no setting you need to enter as Gateway, but you can enter it as
192.168.1.1
. - You do not need to define any DNS settings.
After doing these settings, run your favorite TFTP program. Enter 192.168.1.10
as the IP address (default value, can be changed) and 69
as the port number and then connect to the server. Afterwards, you can transfer files to the SD card installed on the board or transfer the files on this card to the computer.
After each read and write request transmitted to the board, the index.html
file automatically created by the software on the SD card will be automatically updated. This file contains a file tree that shows the files and folders on the SD card.
You can see the outputs of the software from the moment it runs through a program such as PuTTY. For this, you must download and install the driver given in the Prerequisites section. Then, you need to run PuTTY or another program of your choice, select the COM port which the board is connected to and set the baudrate to 115200.
You can now automatically flash a BOOT.BIN
file by just sending the file over TFTP. You can create your boot image by following the steps 1 to 3 in the Flashing the Software to the QSPI section. The program automatically recognizes the file and does the necessary QSPI Flashing operations. You just have to monitor the progress coming through the UART on a terminal like PuTTY, and turn off the board and turn it on again in QSPI boot mode when the operations are completed.
If you want to use a different boot file name, you have to change the
BOOT_FILE_NAME
define in theweb_utils.h
file.
- Automatically flashing the BOOT.BIN file to QSPI.
- Store the BOOT.BIN file encrypted.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue.
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch
git checkout -b feature
- Commit your Changes
git commit -m 'Added some Feature'
- Push to the Branch
git push origin feature
- Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
If you have any questions regarding this project, please feel free to reach out to me at efetunca@hotmail.com.