该笔记主要记录SoC的软件开发流程,主要包含一些Linux下的操做命令
1. 编写design file .c .hlinux
2. 编写makefile
可执行文件名,交叉编译环境,compile flags
3. 拷贝文件到SD Cardshell
(1)经过USB mount
1)mount命令格式:
mount [-t vfstype] [-o option] device dir
vfstype:windows 9x fst32文件系统:vfat
windows NTntfs文件系统:ntfs
2)option采用只读方式挂接设备
采用读写按时挂接设备rw
3)device:要挂接(mount)的设备
4)dir:设备在系统上的挂接点(mount point)
5)使用umount卸载mount挂载的设备
mount -t vfat (ntfs)/dev/sda1 /mnt
cp -p /mnt/可执行文件名 /home/root
unmount /mnt(解挂)
(2)linux环境下copy
(3)经过SSH网络传输(基于scp shell command)WinSCP
4.生成dtb文件
sopc2dts --input soc_system.sopcinfo\ sopcinfo文件跟工程名字一致
--output socfpga.dtb\ dtb文件本身定义
--type dtb\
--board soc_system_board_info.xml\
--board hps_common_board_info.xml\
--bridge-removal all\
--clocks
5.经过sof文件生成rbf文件
实际就是将这段代码放进文本改为.dat文件就能够了
%QUARTUS_ROOTDIR%\\bin64\\quartus_cpf -c DE1_SOC_Linux_Audio.sof soc_system.rbf
pause
6.根据硬件信息,经过sopcinfo文件生成在Linux下用到的.h头文件
将一下命令写在.sh文件中执行
sopc-create-header-files \
"./soc_system.sopcinfo" \
--single hps_0.h \
--module hps_0