当前位置:网站首页>Yushenle's learning record: the first project of SOC FPGA -hello world
Yushenle's learning record: the first project of SOC FPGA -hello world
2022-07-26 15:56:00 【YuKaguraNe】
List of articles
One 、Soc Environment configuration
1. Image burning
1) format TF card :
First the TF card format For a volume
2) Using tools : Win32DiskImager
Will be prepared in advance linux Simple image burn TF In the memory card 
3) Start and use serial port debugging
1、 First, connect the serial port connection , Then turn on the computer Device manager .
as follows :
Generally, it can be in port Found at , If in Other equipment Found in ( Usually with yellow exclamation point ) It means there is a problem with the drive , Update can .
2、 Use MobaXterm Connecting boards
Session Set as follows :
3、 Press... On the board after the connection is completed RST Key , You can see the loading as follows :
4、 Just log in as a user 
Here we are SoC Of linux The environment has been set up .
Two 、Soc The golden project
1. Introduction to gold project
What is? Soc What about the golden project , In fact, it is done for a specific board Formwork works , Relevant Peripherals and HPS Etc. are configured in the project , Pin Also bind the completed project accordingly .
2. The benefits of using gold Engineering
Use the golden project , It can greatly reduce the burden of novice developers SoC Difficulty of project establishment , There is no need to write related top-level files , Developers only need to work in the golden project , On demand Discard or add the peripherals or interfaces you want .
3、 ... and 、Soc And hello world
1.SSH To configure
Get into ssh The configuration directory
cd /etc/ssh/

To configure ssh Set up
vi sshd_config

Will be the first 44 The row is configured as PermitRootLogin yes
So far SSH Configuration complete
2. The network configuration
To configure Soc Board static address
Enter the network configuration folder
cd /etc/network

modify interfacces The configuration file
vi interfaces
as follows :
Here, the address of the board can be configured arbitrarily
After the configuration is completed, you can use the restart command to restart the board
reboot
After the restart is completed, enter
ifconfig
Check if the configuration is successful 
You can see that the configuration is complete
Configure computer network address

Modify network settings 
The address here can also be configured at will , But the main thing is Need to be on a network among .
This is related to the network Network configuration completed
3. Software coding
Code writing
Open up Quartus Directory embedded/ds-5/bin Medium eclipse
In the previous gold project app Folder Store software projects 
On the eclipse New China C project 
Add source files to the project hello_world.c
Write code
#include<stdio.h>
int main(){
while(1)
{
printf("Hello World\n");
//sleep(1);
}
}
Environment configuration

The files to be configured are as follows :
hps_0.h
Put hps_0.h Just copy it into the project 
rest include To configure 
Project — Properties

Select settings select C++ routine , Click the right side. add Add the path as shown in the figure
4. Code compilation and running
Compile code

After compilation, the following will appear Binary 
If an error is reported , Note that after the code is written Pay attention to saving the file ,eclipse Code will not be saved automatically
function
Use eclipse Remote SSH Connect to the board 
Open the window shown above 
choice Remote System Explorer
Note that the address in the red box is Board configuration ip Address ,eclipse visit linux, The host to linux.
Input Login username and password that will do
Then the binary file generated by the previous compilation hello_world Copied to the 
Root directory opt Under the document
Open the terminal in this directory
chmod +x hello_world

Modify the executable permissions of the file
./hello_world
Can run 
边栏推荐
- This article explains in detail the discovery and processing of bigkey and hotkey in redis
- 13年资深开发者分享一年学习Rust经历:从必备书目到代码练习一网打尽
- TI C6000 TMS320C6678 DSP+ Zynq-7045的PS + PL异构多核案例开发手册(4)
- No module named ‘win32gui‘
- We were tossed all night by a Kong performance bug
- anaconda No module named ‘cv2‘
- 04 callable and common auxiliary classes
- 反射、枚举以及lambda表达式
- 数仓:数仓建设中的数据建模和日志体系
- 使用verdaccio搭建自己的npm私有库
猜你喜欢

Enterprise digital transformation needs in-depth research, and it cannot be transformed for the sake of transformation

【EXPDP导出数据】expdp导出23行记录,且不包含lob字段的表,居然用时48分钟,请大家帮忙看看

sklearn clustering聚类

关于我写的IDEA插件能一键生成service,mapper....这件事(附源码)

单例模式
![[expdp export data] expdp exports a table with 23 rows of records and no lob field. It takes 48 minutes. Please help us have a look](/img/ee/7bec8211dddc90e52c2bc0f56c8dd4.png)
[expdp export data] expdp exports a table with 23 rows of records and no lob field. It takes 48 minutes. Please help us have a look

TI C6000 TMS320C6678 DSP+ Zynq-7045的PS + PL异构多核案例开发手册(3)
原来卡布奇诺信息安全协会是干这个的呀,一起来看看吧。

parker电磁阀D1VW020DNYPZ5

This article explains in detail the discovery and processing of bigkey and hotkey in redis
随机推荐
MYSQL 命令大全
Understand │ XSS attack, SQL injection, CSRF attack, DDoS attack, DNS hijacking
Deep packet inspection using cuckoo filter paper summary
全志A40i工业核心板,100%国产4核ARM Cortex-A7,支持“双屏异显”【显示接口能力,工业HMI首选方案】
A comprehensive review of image enhancement technology in deep learning
大型仿人机器人整机构型研究与应用
QT is the most basic layout, creating a window interface
Research and application of the whole configuration of large humanoid robot
FOC motor control foundation
基于SSM开发实现校园疫情防控管理系统
No module named ‘win32gui‘
使用verdaccio搭建自己的npm私有库
Change an ergonomic chair to relieve the old waist of sitting and writing code~
How to convert planning map into vector data with longitude and latitude geojson
Super simple! It only takes a few steps to customize the weather assistant for TA!!
gcc/g++与动静库以及gdb
VS2019Debug模式太卡进不去断点
Continuous integration (I) brief introduction to basic concepts
如何通过ETL调度工具 TASKCTL 使用作业插件类型调用 kettle作业?
单例模式