DisplayPort 英特尔® Stratix® 10 FPGA IP设计实例用户指南

ID 683887
日期 9/14/2022
Public
文档目录

1.5.1. 重新生成ELF文件

默认情况下,生成动态设计实例时会生成 ELF文件。但在某些情况下,您需要修改软件文件或重新生成dp_core.qsys文件后就要重新生成ELF文件。因为重新生成的dp_core.qsys文件会更新.sopcinfo文件,因此您需要重新生成ELF文件。
  1. 浏览到 <project directory>/software并在必要时编辑代码。
  2. 浏览到 <project directory>/script并执行以下构建脚本:
    source build_sw.sh
    • 在Windows上,搜索并打开Nios II Command Shell。在Nios II Command Shell中,浏览到 <project directory>/script并执行source build_sw.sh
    注: 要在Windows 10上执行构建脚本,您的系统需要适用于Linux的 Windows Subsystems(WSL)。有关WSL安装步骤的更多详细信息,请参阅Nios II Software Developer Handbook
    • 在Linux上,启动Platform Designer,然后打开Tools > Nios II Command Shell。在Nios II Command Shell中,浏览到 <project directory>/script并执行source build_sw.sh
  3. 请确保.elf文件生成于 <project directory>/software/dp_demo
  4. 将生成的.elf文件下载到FPGA中,可以不用重新编译.sof文件,只需要通过运行以下脚本:
    nios2-download <project directory>/software/dp_demo/*.elf
  5. 在FPGA板上按下复位按钮,使新软件生效。