当前位置:首页 > FPGA > 正文内容

SOC 在线修改设备树和FPGA配置文件 并在线配置FPGA

chanra1n2年前 (2022-04-14)FPGA4684

测试过的平台:

    1、DE-10 Cyclone V开发板                        ->    通过

    2、海云捷迅 C5MX系列 Cyclone V开发板   ->    通过

    3、小梅哥AC501 Cyclone V开发板              ->   通过

更新FPGA配置程序:点击下载

请连接至开发板并新建一个sh文件,内容如下

#!/bin/sh
if [ -f "soc_system.rbf" ];then
	  if [ -f "soc_system.dtb" ];then
       clear
       echo ----------------------------------------------------------------------------------
       echo INFO: This program was developed by ChanRa1n and all rights reserved.
      umount /soctemp
      rm -rf /soctemp
      mkdir /soctemp
      mount /dev/mmcblk0p1 /soctemp
      echo INFO: disk mount success!
      cp soc_system.rbf /soctemp/soc_system.rbf
      cp soc_system.dtb /soctemp/soc_system.dtb
      sleep 3s
      echo INFO: soc data copy success!
      /soctemp/hps_config_fpga /soctemp/soc_system.rbf
      sleep 3s
      umount /soctemp
      echo INFO: disk umount success!
      rm -rf /soctemp
      echo INFO: clean temp file success!
      echo INFO: soc flash finished!
      echo If an error occurs in the process, please restart the development board manually!
      echo ----------------------------------------------------------------------------------
    else
      echo ERROR: soc_system.dtb not exists!
    fi
else
    echo ERROR: soc_system.rbf not exists!
fi

接下来,请将dtb文件和rbf文件放置和sh文件同一级目录,并运行以下命令:

chmod +x flashsoc.sh && sh ./flashsoc.sh

运行示例:

----------------------------------------------------------------------------------
INFO: This program was developed by ChanRa1n and all rights reserved.
INFO: disk mount success!
INFO: soc data copy success!
INFO: alt_fpga_control_enable().
INFO: alt_fpga_control_enable OK.
alt_fpga_control_enable OK  next config the fpga
INFO: MSEL configured correctly for FPGA image.
/soctemp/soc_system.rbf file file open success
INFO: FPGA Image binary at 0xb2c64008.
INFO: FPGA Image size is 2068700 bytes.
ERROR: FPGA failed to program after 5 attempt(s).
INFO: alt_fpga_control_disable().
INFO: disk umount success!
INFO: clean temp file success!
INFO: soc flash finished!
If an error occurs in the process, please restart the development board manually!
----------------------------------------------------------------------------------

如果如图所示,出现了ERROR,请重启开发板。(断开开发板电源,并重新上电,或者ssh输入reboot也可以)

如果没有出现ERROR,例如

INFO: alt_fpga_control_enable().
alt_fpga_control_enable OK  next config the fpga
INFO: MSEL configured correctly for FPGA image, MSELs ==a.
C5MB_top.rbf file file open success
INFO: FPGA Image binary at 0xb2bd3008.
INFO: FPGA Image size is 2058776 bytes.
INFO: alt_fpga_configure() successful on the 1 of 5 retry(s).
INFO: alt_fpga_control_disable().

则在线配置成功完成!FPGA端的配置已经更新。


如果你只需要对FPGA重新配置,则只需要运行

./hps_config_fpga soc_system.rbf


扫描二维码推送至手机访问。

版权声明:本文由我的FPGA发布,如需转载请注明出处。

本文链接:https://www.myfpga.cn/index.php/post/238.html

分享给朋友:

“SOC 在线修改设备树和FPGA配置文件 并在线配置FPGA” 的相关文章

Intel FPGA初级考试模拟试题 四套含答案

Intel FPGA初级考试模拟试题 四套含答案

*1.下列对异步信号进行同步的描述错误的是(使用锁存器)。采用保持寄存器加握手信号的方法特殊的具体应用电路结构,根据应用的不同而不同使用锁存器异步 FIFO *2.FPGA 的可编程是主要基于什么结构(查找表(LUT))。查找表(LUT)ROM 可编程PAL 可编程与或阵列可编程解析:FP...

ALGO C4MB V11引脚参照表(持续更新)

ALGO C4MB V11引脚参照表(持续更新)

功能:常用引脚CLKPIN_E1LED0PIN_G15LED1PIN_F16LED2PIN_F15LED3PIN_D16KEY1PIN_E15KEY2PIN_E16KEY3PIN_M15KEY4PIN_M16RXDPIN_M2TXDPIN_G1功能:VGA引脚VGA_BLUE[0]PIN_C15VG...

Verilog实现串并转换

Verilog实现串并转换

项目文件:SIPO.zip//------------------------------------------------------// File Name        : SIPO.v// Author       &n...