The method used to create a .jic file with a Nios® II hardware and software image is as follows.
1. Create a flash file for the hardware and software image
sof2flash --input=<hwimage>.sof --output=hwimage.flash --epcs --verbose
elf2flash --input=<elf file>.elf --output=swimage.flash --epcs --after=hwimage.flash --verbose
Note: When creating the software flash image, there is no need to add a boot srec (this is located in the EPCS Controller), the --after option ensures the software image starts immediately after the hardware image.
2. Convert the flash images into Hex files
nios2-elf-objcopy -I srec -O ihex hwimage.flash hwimage.hex
nios2-elf-objcopy -I srec -O ihex swimage.flash swimage.hex
3. When creating your jic file using Quartus® II Convert Programming File tool, add the Flash Loader and both hex files with absolute addressing option selected.
Note: You do not need to add the .sof file to the jic image. This is because you created a hardware hex image. Using the hardware hex image ensures the software hex image is at the proper offset in the EPCS.