- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to program a CFI Flash (NOT EPCS) device that is attached to my Cyclone2 with both the HW and SW images. It appears one method that fits my needs is to follow appnote an478 and create a flash POF from the hw image SOF and sw image ELF. Then use the default config to load a PFL design in the FPGA to allow me to write to the CFI Flash over the JTAG interface.
I think my problem is that I am assuming the SW image needs to be loaded into the "Convert Programming File" tool to create the POF (combines HW and SW image) but should be added as HEX data. I'm having trouble trying to convert my ELF file to HEX while being able to append the bootloader to the image (sw needs bootloader to transfer instructions from CFI Flash to external sdram). elf2hex does not allow the use of bootloader or offset address i've tried elf2flash, which does let me attach the bootloader, but then when I try the following command I get an error: nios2-elf-objcopy --input-target srec --output-target ihex sw.flash sw.hex error ":Interleave must be positive"Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you compile your bootloader into the regular project, thereby making one .elf that has everything in it? Maybe you could create two .elf's instead.
Either way, once you have the .elf use it to do the conversion... nios2-elf-objcopy -O ihex file.elf output_file.hex- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I will be extremely interested by the end of this thread... Because I need to do the same thing and I don't know how to do this... Please, someone could help ? Thks in advance. See u.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- i've tried elf2flash, which does let me attach the bootloader, but then when I try the following command I get an error: nios2-elf-objcopy --input-target srec --output-target ihex sw.flash sw.hex error ":Interleave must be positive" --- Quote End --- You've put the options here with two dashes before, but I bet you've only got one on your command line. That is, your command has the option -input-target rather than the option --input-target, so the nios2-elf-objcopy command thinks it's the interleave option. There's the same error in the official Altera knowledge base article. Mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the answer Mark!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page