Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16627 Discussions

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

Amir3
New Contributor I
1,610 Views

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 Replies
KellyJialin_Goh
Employee
1,574 Views

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


0 Kudos
Amir3
New Contributor I
1,436 Views

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.

0 Kudos
KellyJialin_Goh
Employee
1,527 Views

Hi,

Is the information provided useful to you?


Regards,

Kelly Jialin


0 Kudos
KellyJialin_Goh
Employee
1,492 Views

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



0 Kudos
KellyJialin_Goh
Employee
1,417 Views

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


0 Kudos
Amir3
New Contributor I
1,392 Views

Hey Kelly,

 

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

 

Thanks.

0 Kudos
KellyJialin_Goh
Employee
1,380 Views

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


0 Kudos
Amir3
New Contributor I
1,371 Views

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?

0 Kudos
KellyJialin_Goh
Employee
1,359 Views

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


0 Kudos
Amir3
New Contributor I
1,338 Views

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).



0 Kudos
KellyJialin_Goh
Employee
1,323 Views

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






0 Kudos
Amir3
New Contributor I
1,315 Views

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. 

 

 

0 Kudos
KellyJialin_Goh
Employee
1,308 Views

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


0 Kudos
Amir3
New Contributor I
1,286 Views

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.

0 Kudos
KellyJialin_Goh
Employee
1,272 Views

Hi,

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

Thank you.


Regards,

Kelly


0 Kudos
KellyJialin_Goh
Employee
1,244 Views

Hi,

Any updates from your side?


Regards,

Kelly


0 Kudos
KellyJialin_Goh
Employee
1,229 Views

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





0 Kudos
Reply