当前位置:网站首页>XILINX K7 FPGA+RK3399 PCIE驱动调试
XILINX K7 FPGA+RK3399 PCIE驱动调试
2022-08-09 06:49:00 【深圳信迈科技DSP+ARM+FPGA】
ARM端 xdma 的驱动编译,交叉编译器的配置,编译内核。
先上图。
以下参考XILINX FPGA+RK3399 PCIE X4_FPGA零下的博客-CSDN博客
编译xdma说明
一、安装交叉编译器(官方用的6.3的)
// An highlighted block
1、 mkdir -p /opt/FriendlyARM/toolchain/ #新建一个目录
2 、cp gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar /opt/FriendlyARM/toolchain/
3、tar xvf gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar # 将编译器解压到当前目录
4、 mv gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu gcc-linaro-7.4.1 #把名字变短一点
5 、source setEnv.sh #设置临时环境变量 只在当前终端有效 、每次编译前source一下
验证 aarch64-linux-gnu-gcc -v
2、Makefile 修改 kernel 路径 自己的 编译器自己指定
// An highlighted block
obj-m += xdma.o
xdma-objs := xdma-core.o xdma-sgm.o xdma-ioctl.o xdma-bit.o
KERNELDIR ?=/home/ycd/project/rk3399/kernel/kernel-rockchip-nanopi4-linux-v4.4.y
PWD := $(shell pwd)
ROOT := $(dir $(M))
XILINXINCLUDE := -I$(ROOT)../include -I$(ROOT)/include
GCC49 :=aarch64-linux-gnu-
all:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
install: all
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
depmod -a
install -m 644 10-xcldma.rules /etc/udev/rules.d
clean:
rm -rf *.o *.o.d *~ core .depend .*.cmd *.ko *.ko.unsigned *.mod.c .tmp_versions *.symvers .#* *.save *.bak Modules.* modules.order Module.markers *.bin
CFLAGS_xdma-core.o := -Wall -DDEBUG $(XILINXINCLUDE)
ifeq ($(GCC49),1)
CFLAGS_xdma-core.o += -Wno-error=date-time
endif
CFLAGS_xdma-sgm.o := $(XILINXINCLUDE)
CFLAGS_xdma-bit.o := $(XILINXINCLUDE)
CFLAGS_xdma-ioctl.o := $(XILINXINCLUDE)
编译出xdma.ko 导入到开发板内就可以插入内核了。
边栏推荐
猜你喜欢
使用百度EasyDL实现智能垃圾箱
2022-08-08: Given an array arr, it represents the height of the missiles that will appear in order from morning to night.When the cannon shoots missiles, once the cannon is set to shoot at a certain h
Use of PlantUML plugin in idea
Altium designer软件常用最全封装库,包含原理图库、PCB库和3D模型库
Teach you how to make the Tanabata meteor shower in C language - elegant and timeless (detailed tutorial)
leetcode 之盛水问题
Fragments
报错jinja2.exceptions.UndefinedError: ‘form‘ is undefined
Zero shift of leetcode
ByteDance Interview Questions: Mirror Binary Tree 2020
随机推荐
Distributed id generator implementation
golang zip aes base64
数据库中间件-jdbi
The Integer thread safe
stm32定时器之简单封装
代码目录结构
longest substring without repeating characters
Simple to use Lambda expressions
jdepend
长沙学院2022暑假训练赛(一)六级阅读
The division principle summary within the collection
语句加锁分析
C language implements sequential stack and chain queue
String.toLowerCase(Locale.ROOT)
Common Oracle Commands
01 自然语言处理NLP介绍
TCP段重组PDU
2022年7月小结
bzoj 5333 [Sdoi2018]荣誉称号
INSTALL_RPATH and BUILD_RPATH problem in CMake