Program download to Hummingbird Softcore
Program download to Hummingbird Softcore
Method 1: Using the Linux Hummingbird development environment
For the convenience of users, the company has configured the Hummingbird development environment, directly open the virtual machine image provided in the company's data with a virtual machine, or you can configure it yourself, if you configure it yourself, please refer to the Hummingbird documentation:
Hummingbird_E200_Series_Core_SoC_Quick_Start_Guide.pdf
Hummingbird documentation and engineering downloads are available at https://github.com/SI-RISCV/e200_opensource
Open the backup image directly with a virtual machine as follows:
Step 1: Open the image
Select the file
Click Open. Find the Hummingbird image file path and open it.
Open and click Run Virtual Machine.
Open it as shown in the following figure.
Username:Perf-V
Password:perfxlab
After entering the password, as shown in the figure below.
Step 2: Open the Demo file location.
Demo related files are located as follows
Please put the finished c program in this directory, otherwise the compiler will not find the file, if you put it in another directory, please modify the makefile file by yourself.
Step 3: Compile and link the C file.
Go to the following directory.
Right-click and select open in Terminal.
Open it as shown in the figure.
To compile the c-file.
In the terminal, type:
make software PROGRAM=demo_gpio BOARD=Perf-V-creative-board
This article only describes how to use it; for more information, please refer to the Hummingbird documentation at
Hummingbird_E200_Series_Core_SoC_Quick_Start_Guide.pdf
Note that the terminal must be opened in the path shown below.
Click Enter, if the program is error-free as shown in the figure.
If an error is reported, it means that the program is written in error, please follow the instructions to modify the relevant procedures.
Download the program to the Hummingbird softcore.
Switch the downloader to the USER_JTAG port as shown in the figure.
and click the usb logo at the bottom right corner of the virtual machine to make the virtual machine connect with the downloader.
After clicking, the connection is successful as shown in the figure.
Type the following command into the terminal: make upload PROGRAM=demo_gpio BOARD=Perf-V-creative-board
Note that the terminal must be opened in the path shown in the figure below:
Enter and execute as shown in the figure.
Then the compiled program will be downloaded to the Hummingbird soft core and start execution.
The effect of downloading the tricolor le blinking program to Perf-V is shown as follows
Method 2: Use perf-v IDE
Step 1: Install
Step 2: Create a new project
Run the IDE
Select the workspace and click Launch to open the IDE interface.
Click New Perf-V Project on the leftmost side of the upper toolbar.
Select Perf-V C Project, fill in the project name, then click Next until Finish
You have successfully created a new project.
Step 3: Write the code
You can create a new C file directly in the project to write the code, or copy the C file from the sample into the project directly.
Step 4: Compile and Run
Click the Build icon on the toolbar to start compiling
The compilation is complete.
Right-click the launch file in the project and select Run As or Debug As
The program starts running.
Step 5: Debug the program
Click the Pause button in the toolbar to pause the program.
In the toolbar, you can choose to continue, stop the program or execute it in a single step.