sof2flash –input=hello_cy3.sof –output=hwimage.flash –epcs –verbose
elf2flash –input=hello_world_0.elf –output=swimage.flash –epcs –after=hwimage.flash –verbose
step2: 把flash文件转化成hex文件
nios2-elf-objcopy -I srec -O ihex hwimage.flash hwimage.hex
nios2-elf-objcopy -I srec -O ihex swimage.flash swimage.hex
step3:打开Quartus? II Convert Programming File 工具,给Flash Loader添加器件类型,然后添加第2步转化出来的hex文件。添加hex文件时,选中“绝对地址”选项。
复制代码
BLOCK START ADDRESS END ADDRESS
hwimage.hex 0x00000000 0x00030FA5
swimage.hex 0x00030FA6 0x0003131D
Note: All the addresses in this file are byte addresses
复制代码
当然了,也可以只转换swimage,hwimage直接用sof就可以了,不过,这个我没试,这里有说明
http://www.altera.com.cn/support/kdb/solutions/rd10132010_126.html
2、将HW和SW合成一个SOF文件
结语:
参考资料:
如何将Nios II的硬件映像和软件映像合并生成一个jic文件
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!