Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Error Code 8 Command: nios2-flash-programmer

Jayeshkumar
Beginner
254 Views

We are facing an Error Code 8 Command: nios2-flash-programmer. can someone please help on this?

0 Kudos
1 Solution
JingyangTeh
Employee
95 Views

Hi Jayesh 

 

You may find the quartus_pgm command line parameters in the links below:


https://www.intel.com/content/www/us/en/docs/programmable/683118/current/quartus-pgm-nios2.html 

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/general-parameters-74068.ht...

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/device-parameters-82285.htm...

 

Here are some examples for the quartus_pgm:

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/quartus-pgm-nios2-command-l...


I shall set this thread to close pending. If you still need further assistance, you are welcome to reopen this thread within 20days or open a new thread, some one will be right with you.


If you happened to close this thread you might receive a survey.  If you think you would rank your support experience less than 10 out of 10, please allow me to correct it before closing or if


 

Regards

Jingyang, Teh


View solution in original post

9 Replies
JingyangTeh
Employee
231 Views

Hi Jayesh

 

For the error that you are facing could you send me a screen shoot of the whole error reported text and the nios2-flash-programmer command?

Furthermore could you also descript the environment you are working on? (eg. what board/ device you are using? )

 

At the meantime could you check the if there are any warnings/conflicts on the NIOS2 PLL settings for the SDRAM clock and the CPU clock?

 

It is recommended to have 3 separate clock source for the CPU,  internal SDRAM module, and external SDRAM module.

 

 

Regards

Jingyang,Teh

 

Jayeshkumar
Beginner
224 Views

Hello Jingyang,

 

Following is the whole error:

 

Info: 30 May, 2022 11:33:05 AM - (INFO) elf2flash: args = --input=C:/jayesh/AKASH_ARMY/mtx_firefly_4c40/software/hello/hello.elf --output=C:/jayesh/AKASH_ARMY/mtx_firefly_4c40/flash/hello_flash.flash --boot=C:/altera/15.1/nios2eds/components/altera_nios2/boot_loader_cfi.srec --base=0xa000000 --end=0xc000000 --reset=0x0 --verbose
Info: 30 May, 2022 11:33:05 AM - (FINE) elf2flash: Starting
Info: 30 May, 2022 11:33:05 AM - (WARNING) elf2flash: Supplied reset address: 0x0 differs from the elf file reset vector: 0xa000000.
Info: 30 May, 2022 11:33:05 AM - (FINE) elf2flash: Done
Info: Using cable "USB-Blaster [USB-1]", device 1, instance 0x00
Info: Resetting and pausing target processor: OK
Info: No CFI table found at address 0x0A000000
Info: Original contents (after writing 0xF0 and 0xFF00FF to address 0x0A000000):
Info: 0: 98 00 00 01 3A 20 00 00 01 3A 88 01 00 01 37 42 ....: ...:....7B
Info: 10: 80 08 01 3A 88 B3 C8 01 2C F0 81 C8 01 1E F8 3F ...:....,......?
Info: 20: 10 01 35 D6 40 08 01 37 00 80 F0 01 35 BD 80 08 ..5.@..7....5...
Info: 30: 01 C4 FF BF 00 01 35 F0 80 08 01 BA 30 05 00 01 ......5.....0...
Info: 40: 7A 30 07 00 01 FA 30 09 00 01 3A 31 0B 00 01 35 z0....0...:1...5
Info: Contents after writing 0x980098 to address 0x0A0000AA:
Info: Same after writing 0x980098 to address 0x0A000154:
Info: Same after writing 0x00980098 to address 0x0A0002A8:
Info: Same after writing 0x980098 to address 0x0A000055:
Info: Same after writing 0x980098 to address 0x0A0000AA:
Info: Same after writing 0x00980098 to address 0x0A000154:
Info: Same after writing 0x980098 to address 0x0A000154:
Info: Same after writing 0x980098 to address 0x0A0002A8:
Info: Same after writing 0x00980098 to address 0x0A000550:
Info: 0: 98 00 00 01 3A 20 00 00 01 3A 88 01 00 01 37 42 ....: ...:....7B
Info: 10: 80 08 01 3A 88 B3 C8 01 2C F0 81 C8 01 1E F8 3F ...:....,......?
Info: 20: 10 01 35 D6 40 08 01 37 00 80 F0 01 35 BD 80 08 ..5.@..7....5...
Info: 30: 01 C4 FF BF 00 01 35 F0 80 08 01 BA 30 05 00 01 ......5.....0...
Info: 40: 7A 30 07 00 01 FA 30 09 00 01 3A 31 0B 00 01 35 z0....0...:1...5
Info: Ignored possible autoselect code 04-04 as no override data
Info: present in section [FLASH-04-04]
Info: Ignored possible autoselect code 0004-0004 as no override data
Info: present in section [FLASH-0004-0004]
Info: Ignored possible autoselect code 00000004-00000004 as no override data
Info: present in section [FLASH-00000004-00000004]
Info: Leaving target processor paused
Error: Error code: 8 for command: nios2-flash-programmer "C:/jayesh/AKASH_ARMY/mtx_firefly_4c40/flash/hello_flash.flash" --base=0xa000000 --accept-bad-sysid --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-1]' --program --verbose --erase-all

 

We are using Device : Cyclone IV : EP4CE55F23I7

 

The compile log report is attached herewith for your reference

 

We are using external PLL IP where the source clk is 24MHz and it is constraint in sdc file. There are two output clocks both are 100MHz out of which one is used for external SDRAM (External to FPGA) and other is used for NIOS. There is no internal SDRAM used in our project.

 

 

 

JingyangTeh
Employee
211 Views

Hi Jayesh

 

From the error report, I see that there is no CFI Table available. 

There is a possibility that there is a problem with the flash and this could cause the programmer to unable to query the flash memory and that could be the cause of your problem.

 

Could we try to run the program from RAM instead of the flash as a first step? 

To run without downloading to the flash : 

1. You can run a software without downnloading program to the flash :  

In NIOS II IDE/SBT/EDS, you do "run as > ... hardware". By doing this, you download the programm to the RAM and run from here. 

 

After being able to run on the RAM we could debug the flash by entering the command:

nios2-flash-programmer --debug --base=0xa000000  

 

Please share the output for the debug command.

 

Regards

Jingyang, Teh

JingyangTeh
Employee
194 Views

Hi Jayesh 

 

Any update on this case?

 

Regards,

Jingyang, Teh

Jayeshkumar
Beginner
178 Views

Hi Jingyang,

 

I have done as you told and following is the result of debug is attached for your reference. Please go through it.

Please let me know the alternate way to program the flash with .elf file. we need to convert .elf file to compatible flash file and load onto flash.

I was getting error code 8 when using Quartus 15.1 and now switched to Quartus 18.1 and getting error code 4 while programming the flash using nios flash programmer.

JingyangTeh
Employee
154 Views

Hi Jayeesh

 

Could you use the Quartus Programmer instead of the Nios2 Flash Programmer? 

This is because currently the Nios2 Flash Programmer is not recommended to be use anymore.

You could find the steps on using the Quartus Programmer here:

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/using-the-flash-programmer-...

 

With an elf file you could use the command "elf2flash" to first convert the elf to a S-Record file format that is required by the command "quartus_pgm --nios2" to program.

 

Regards

Jingyang, Teh

JingyangTeh
Employee
128 Views

Hi Jayeesh


Any update on the new tool?

I believe that the Quartus Programmer will be the tool for your use.


Regards

Jingyang, Teh


Jayeshkumar
Beginner
103 Views

Hi Jingyang,

 

I will try quartus programmer as i am in another task so will try later. you can share the pdf link for using quartus programmer for programming flash.

 

you may close the thread as of now.

 

Thanks,

Jayesh

JingyangTeh
Employee
96 Views

Hi Jayesh 

 

You may find the quartus_pgm command line parameters in the links below:


https://www.intel.com/content/www/us/en/docs/programmable/683118/current/quartus-pgm-nios2.html 

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/general-parameters-74068.ht...

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/device-parameters-82285.htm...

 

Here are some examples for the quartus_pgm:

https://www.intel.com/content/www/us/en/docs/programmable/683118/current/quartus-pgm-nios2-command-l...


I shall set this thread to close pending. If you still need further assistance, you are welcome to reopen this thread within 20days or open a new thread, some one will be right with you.


If you happened to close this thread you might receive a survey.  If you think you would rank your support experience less than 10 out of 10, please allow me to correct it before closing or if


 

Regards

Jingyang, Teh


Reply