(三)、配置内核
1、#make menuconfig
Networking support --->
<*> CAN bus subsystem support --->
--- CAN bus subsystem support
<*> Raw CAN Protocol (raw access with CAN-ID filtering)
<*> Broadcast Manager CAN Protocol (with content filtering)
<*> CAN Gateway/Router (with netlink configuration)
CAN Device Drivers --->
<*> Xilinx CAN
#make all
#make uImage
拷贝uImage到SD卡中
2、配置设备树
打开can设备树代码
#vim arch/arm/boot/dts/system-top.dts
增加CAN pinctrl代码
#make all
将arch/arm/boot/dts/system-top.dtb重命名位devicetree.dtb文件放入SD中
(四)、调试板卡
设置can0的波特率,这里设置的是125k
ip link set can0 type can bitrate 125000