Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussões

'quartus_pgm' command - works with "Nios II Command Shell" but not with batch file

Amir3
Novo colaborador I
3.091 Visualizações

Hey everyone,

 

I'm trying to burn Flash memory device (MT25QL256) with SW image (Nios Application) by Batch file with these commands, and always I get an error:

C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm --nios2 --epcq --base=0xY --csr=0xZ --cable="USB-Blaster [USB-2]" X.flash

This Batch file located in the same path of "X.flash" file.

 

When I'm trying to burn Flash memory device with "Nios II Command Shell 18.0" tool with these commands, It's work:

1. cd Path

2. quartus_pgm --nios2 --epcq --base=0xY --csr=0xZ --cable="USB-Blaster [USB-2]" X.flash

 

The 'quartus_pgm' command is the same in both scenarios, so I don't understand why it doesn't work with the Batch file.

 

Note - PathX, Y and Z have no special meaning, I can't write down the original data.

 

Thenks.

 

 

 

 

0 Kudos
17 Respostas
KellyJialin_Goh
Funcionário
3.055 Visualizações

Hi,

The Programmer uses these valid supported file formats: Programmer Object Files (.pof), SRAM Object Files (.sof), Jam File (.jam), or Jam Byte-Code File (.jbc).

However, the command line quartus_pgm.exe can run in batch file where it reads the file and executes the command. Hope this could solve your issue.

Thank you.


Regards,

Kelly Jialin


Amir3
Novo colaborador I
2.917 Visualizações

I'm sorry, but I don't understand how your answer help me..

 

As I mentioned, the 'quartus_pgm' command works in the "Nios II Command Shell 18.0" tool but not through the Batch file.
The Batch file stores in the same Path as the other relevant files (X.flash and more).

 

The 'quartus_pgm' command is the same in both scenarios, so I don't understand why it doesn't work with the Batch file.

 

If it helps, the command I use to convert an elf file to a flash file:

elf2flash --verbose --input=A.elf --output=X.flash --base=0xY --end=0xC --reset=0xB --boot=${SOPC_KIT_NIOS2}/components/altera_nios2/boot_loader_cfi.srec

 

NotePathXYZ, A, B and C have no special meaning, I can't write down the original data.

KellyJialin_Goh
Funcionário
3.008 Visualizações

Hi,

Is the information provided useful to you?


Regards,

Kelly Jialin


KellyJialin_Goh
Funcionário
2.973 Visualizações

Hi,

As we do not receive any response from you on the previous reply that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.

Thank you.


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 9/10 survey.


Regards,

Kelly Jialin, GOH



KellyJialin_Goh
Funcionário
2.898 Visualizações

Hi,

Could you kindly log in to ‘https://supporttickets.intel.com’ to reopen this case so that I can support your question further.

Thank you.


Regards,

Kelly Jialin, GOH


Amir3
Novo colaborador I
2.873 Visualizações

Hey Kelly,

 

This case has been reopened, I would appreciate your help.

 

Thanks.

KellyJialin_Goh
Funcionário
2.861 Visualizações

Hi,

The 'quartus_pgm' command cannot be used as it does not support a batch file, but 'quartus_pgm.exe' can run in batch file where it reads the file and executes the command.

Here is some information that might be useful to you: https://www.intel.com/content/www/us/en/docs/programmable/683118/current/quartus-pgm-nios2.html

You can also look at the elf2flash section from the link above.


Regards,

Kelly


Amir3
Novo colaborador I
2.852 Visualizações

Hey Kelly,

 

I don't see any problem with my 'quartus_pgm' and 'elf2flash' commands.

In addition, using the "Nios II Command Shell 18.0" tool, if something was not correct in the above commands, probably the programming and functioning of the system would not work either.

 

Do you have another way to help me?

KellyJialin_Goh
Funcionário
2.840 Visualizações

Hi,

Could you share your .bat file for reference?


You can also adjust the path:

C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm --nios2 --epcq --base=0xY --csr=0xZ --cable="USB-Blaster [USB-2]" <path to X.flash file>.flash


Thank you.

Regards,

Kelly


Amir3
Novo colaborador I
2.819 Visualizações

Hey Kelly,

 

The Batch file:

C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm --nios2 --epcq --base=0xY --csr=0xZ --cable="USB-Blaster [USB-2]" X.flash

pause

 

Remminde you the Batch file stores in the same Path as the other relevant files (X.flash and more).



KellyJialin_Goh
Funcionário
2.804 Visualizações

Hi,

Is the X.Flash in the path of C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm?

Are they in the same directory with the quartus_pgm executable? If no, could you copy the X.flash in the same directory as the quartus_pgm.


Thank you.


Regards,

Kelly






Amir3
Novo colaborador I
2.796 Visualizações

Hey Kelly,

 

The Batch file in the same directory of the X.flash, for example:

- Flash file directory - Path/X.flash.

- Batch file directory - Path/Burn.bat.

 

Do you want me to move the Flash file and Batch file to the path of quartus_pgm application? (C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm)

 

Thanks. 

 

 

KellyJialin_Goh
Funcionário
2.789 Visualizações

Hi,

Yes, move the flash file to the same directory as quartus_pgm but remain the batch file in the directory :

C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm --nios2 --epcq --base=0xY --csr=0xZ --cable="USB-Blaster [USB-2]" X.flash


Hope this helps. Thank you.

Regards,

Kelly


Amir3
Novo colaborador I
2.767 Visualizações

Hey Kelly,

 

If I understand you correctly, the paths should be in this order:

- Flash file directory - C:\intelFPGA_lite\18.0\quartus\bin64\X.flash.

- Batch file directory - C:\intelFPGA_lite\18.0\quartus\bin64\Burn.bat.

- Quartus_pgm application directory - C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm.exe.

 

And the text in the Batch file should be:

C:\intelFPGA_lite\18.0\quartus\bin64\quartus_pgm --nios2 --epcq --base=0xY --csr=0xZ --cable="USB-Blaster [USB-2]" X.flash

pause

 

I'd appreciate your confirmation.

 

Thanks.

KellyJialin_Goh
Funcionário
2.753 Visualizações

Hi,

Yes, correct. Does your .bat file run with 'quartus_pgm' command now?

Thank you.


Regards,

Kelly


KellyJialin_Goh
Funcionário
2.725 Visualizações

Hi,

Any updates from your side?


Regards,

Kelly


KellyJialin_Goh
Funcionário
2.710 Visualizações

Hi,

As we do not receive any response from you on the previous answer that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 9/10 survey.


Thank you.

Regards,

Kelly Jialin, GOH





Responder