Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- The elf2flash commang line tool can convert a .elf to an .srec ready to be written to the EPCS using nios2-flash-programmer. IIRC the graphical version of the Nios II flash programmer can also do both steps directly from Eclipse. --- Quote End --- I am not shure what the IIRC is. In eclipse i can right-klick on a software project and select "Nios II" -> "Flash Programmer ...". I think this is the tool you mean and i tried it. In the tool i added the .sof and .elf files to the "Files for flash conversion" - List and started the process without success. Ths is the output:
Info: 16.04.2013 16:10:54 - (FEIN) sof2flash: Starting
Info: Info: *******************************************************************
Info: Info: Running Quartus II 32-bit Convert_programming_file
Info: Info: Command: quartus_cpf --no_banner --convert --device=EPCS128 --option=Y:/TLK2711-SP/Terasic_DE0/NIOS_SYSTEM/flash/NIOS_SYSTEM_epcs.opt Y:/TLK2711-SP/Terasic_DE0/NIOS_SYSTEM/NIOS_SYSTEM.sof Y:/TLK2711-SP/Terasic_DE0/NIOS_SYSTEM/flash/NIOS_SYSTEM_epcs.pof
Info: Info: Quartus II 32-bit Convert_programming_file was successful. 0 errors, 0 warnings
Info: Info: Peak virtual memory: 126 megabytes
Info: Info: Processing ended: Tue Apr 16 16:11:01 2013
Info: Info: Elapsed time: 00:00:07
Info: Info: Total CPU time (on all processors): 00:00:02
Info: Info: *******************************************************************
Info: Info: Running Quartus II 32-bit Convert_programming_file
Info: Info: Command: quartus_cpf --no_banner --convert Y:/TLK2711-SP/Terasic_DE0/NIOS_SYSTEM/flash/NIOS_SYSTEM_epcs.pof Y:/TLK2711-SP/Terasic_DE0/NIOS_SYSTEM/flash/NIOS_SYSTEM_epcs.rpd
Info: Info: Quartus II 32-bit Convert_programming_file was successful. 0 errors, 0 warnings
Info: Info: Peak virtual memory: 126 megabytes
Info: Info: Processing ended: Tue Apr 16 16:11:11 2013
Info: Info: Elapsed time: 00:00:10
Info: Info: Total CPU time (on all processors): 00:00:02
Info: 16.04.2013 16:11:13 - (FEIN) sof2flash: Done
Info: Using cable "USB-Blaster ", device 1, instance 0x00
Info: Resetting and pausing target processor: OK
Info: Reading System ID at address 0x00022080:
Info: ID value does not match: read 0x0000000D; expected 0x00000013
Info: Timestamp value was not verified: value was not specified
Info: Warning: The software you are downloading may not run on the system which
Info: is currently configured into the device.
Info: Processor data bus width is 32 bits
Info: Looking for EPCS registers at address 0x00021800 (with 32bit alignment)
Info: Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00021900 (with 32bit alignment)
Info: Initial values: 92400237 4A40100C 483FFD26 90000135 92400237 4A40200C
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00021A00 (with 32bit alignment)
Info: Initial values: 108001C4 1004D0FA 002EE03A 003F9C06 002EE03A 003F9506
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00021B00 (with 32bit alignment)
Info: Initial values: 00000000 00000000 00000000 00000000 00000000 00000000
Info: Not here: SPI_SLAVE_SEL has 0 valid bits (should be between 1 and 16)
Info: Looking for EPCS registers at address 0x00021C00 (with 32bit alignment)
Info: Initial values: 00000000 00000000 00000260 00000000 00000000 00000001
Info: Valid registers found
Info: EPCS signature is 0x00
Info: EPCS identifier is 0x000000
Info: No EPCS layout data - looking for section
Info: Unable to use EPCS device
Info: Leaving target processor paused
Error: Error code: 8 for command: $SOPC_KIT_NIOS2/bin/nios2-flash-programmer "Y:/TLK2711-SP/Terasic_DE0/NIOS_SYSTEM/flash/NIOS_SYSTEM_epcs.flash" --base=0x21800 --epcs --sidp=0x22080 --id=0x13 --accept-bad-sysid --device=1 --instance=0 '--cable=USB-Blaster on localhost ' --program --verbose
The problem seems to be that an EPCS128 is used as target while an EPCS16 exist in the real hardware. (The tool reads 0x0 as EPCS identifier, this looks like there is another problem.) I don't found an option to change the target device. Do you know where the flash programmer gets the information?