加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Altera下载脚本一

发布时间:2020-12-15 18:45:50 所属栏目:百科 来源:网络整理
导读:download.bat: @ set SOPC_BUILDER_PATH_71=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_71% @ set SOPC_BUILDER_PATH_72=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_72% @ set SOPC_BUILDER_PATH_80=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_80% @ set SOPC_BUILDER_PATH

download.bat:

@ set SOPC_BUILDER_PATH_71=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_71%
@ set SOPC_BUILDER_PATH_72=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_72%
@ set SOPC_BUILDER_PATH_80=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_80%
@ set SOPC_BUILDER_PATH_81=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_81%
@ set SOPC_BUILDER_PATH_90=%SOPC_KIT_NIOS2%+%SOPC_BUILDER_PATH_90%

@ "%QUARTUS_ROOTDIR%bincygwinbinbash.exe" --rcfile ".download_bashrc"
pause

--------------------------------------------

download_bashrc:

. "$QUARTUS_ROOTDIR/sopc_builder/bin/nios_bash"

nios2-configure-sof DE2_NIOS_DEVICE_LED.sof
nios2-download -g USB_LED_1.elf
nios2-terminal

----------------------------------------------

当要修改时,只用打开download_bashrc,修改 .sof 和 .elf 的文件名,而不用修改download.bat的内容。


配置文件和程序下载到fpga和sdram中,用于调试。

nios-command-shell
nios2-configure-sof e:/SKC_VHDL/SKC.sof
nios2-download -g e:/SKC_VHDL/zImage
nios2-terminal

下载FPGA配置文件到EPCS16,NIOS2程序(uclinux镜像文件)到flash中
将内核改成为从flash启动
nios-command-shell
nios2-configure-sof e:/SKC_VHDL/SKC.sof
sof2flash --epcs --input=e:/SKC_VHDL/SKC.sof --output=standard.flash
nios2-flash-programmer --epcs --base=0x00201800 standard.flash
elf2flash --base=0x00 --end=0x1fffff --reset=0x00 --input=e:/SKC_VHDL/zImage --output=ext_flash.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec
nios2-flash-programmer --base=0x0 ext_flash.flash
nios2-terminal

下载FPGA配置文件到EPCS16,NIOS2程序(uclinux镜像文件)到EPCS16中 将内核改成从epcs启动 下载到flash中 nios-command-shell nios2-configure-sof e:/SKC_VHDL/SKC.sof sof2flash --epcs --input=e:/SKC_VHDL/SKC.sof --output=standard.flash nios2-flash-programmer --epcs --base=0x00201800 standard.flash elf2flash --epcs --after=standard.flash --input=e:/SKC_VHDL/zImage --ouput=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_epcs.srec nios2-flash-programmer --epcs --base=0x00201800 epcs_controller.flash

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读