Forum Discussion
2 Replies
- Altera_Forum
Honored Contributor
hi,
use the nios II command shell and sof2flash/elf2flash/nios2-elf-objcopy programs. options depend on your needs. # 1) Convert SOF to Flash sof2flash --input=filename.sof --output=hwimage.flash --epcs --verbose# 2) Convert ELF to Flash elf2flash --input=../filename.elf --output=swimage.flash --epcs --after=hwimage.flash --verbose# 3) Concatenate cp hwimage.flash hw_sw.flash cat swimage.flash >> hw_sw.flash # 4) Create HexFile nios2-elf-objcopy -I srec -O ihex hw_sw.flash hw_sw.hex i use it in a tcl script and run it with nios II shell. - Altera_Forum
Honored Contributor
The application Makefile has a 'mem_init_install' target that uses the BSP mem_init.mk.
Here is the help target from a Nios II application project Makefile for reference help : @$(ECHO) "Summary of Makefile targets" @$(ECHO) " Build targets:" @$(ECHO) " all (default) - Application and all libraries (including BSP)" @$(ECHO) " bsp - Just the BSP" @$(ECHO) " libs - All libraries (including BSP)" @$(ECHO) " flash - All flash files" @$(ECHO) " mem_init_generate - All memory initialization files" @$(ECHO) " mem_init_install - All memory initialization files (copy files to Quartus II project)" @$(ECHO) " Clean targets:" @$(ECHO) " clean_all - Application and all libraries (including BSP)" @$(ECHO) " clean - Just the application" @$(ECHO) " clean_bsp - Just the BSP" @$(ECHO) " clean_libs - All libraries (including BSP)" @$(ECHO) " Run targets:" @$(ECHO) " download-elf - Download and run your elf executable" @$(ECHO) " program-flash - Program flash contents to the board"