Forum Discussion
Altera_Forum
Honored Contributor
11 years agoProgramming EPCS Devices With a Processor
Hi,
First, I've searched the forum for hits on this topic. In the first few dozen of hits, I didn't see anything that fit. So I apologize in advance if the answer is buried deep somewhere that I missed. I am not an FPGA designer, but an embedded guy. I need to take a file on a PC (probably .sof or .pof???) and send it over USB to the embedded processor and from there program it into the EPCS device. The EPCS commands along with the /cs clock and data are all pretty clear. What I'm missing is how to interpret the .sof or .pof file so I can send the raw binary over USB and then clock it into the EPCS. I searched the web for a description of either .sof or .pof, but all I've found are references to existing software or devices which do this and that doesn't help. Can someone point me to a document I can study to figure this out? Thanks for the help! Dave5 Replies
- Altera_Forum
Honored Contributor
Take a look at the SRunner source and documentation
https://www.altera.com/download/legacy/srunner/dnl-srunner.html You cannot interpret an .sof or .pof directly as Altera do not publish the details. You need to create an .rpd file per AN418. Cheers, Dave - Altera_Forum
Honored Contributor
I use sof2flash to translate the .sof into S-records, and then objcopy to a flat binary which in the NIOS+HAL can be written to the EPCS quite simply via alt_write_flash().
http://www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf - Altera_Forum
Honored Contributor
--- Quote Start --- I use sof2flash to translate the .sof into S-records, and then objcopy to a flat binary which in the NIOS+HAL can be written to the EPCS quite simply via alt_write_flash(). http://www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf --- Quote End --- Thanks Ted. I guess I'm too ignorant to understand what that document is supposed to tell me. But translating from .sof to S-records would be easy enough. Dave - Altera_Forum
Honored Contributor
The document contains the reference section for the sof2flash utility.
It is normally used in conjunction with the nios2-flash-programmer, which in your case you would not be using since you are trying to program the EPCS directly. In case it wasn't clear, you can't just "translating from .sof to S-records"; you have to use sof2flash which understands the (undocumented) structure of the .sof and generates the S-records. - Altera_Forum
Honored Contributor
Ah. Got it. Very helpful. THANKS!