Altera下载脚本一

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%\bin\cygwin\bin\bash.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

你可能感兴趣的:(脚本,ext,Flash,Path,download)