Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21069 Discussions

JAM Player exit code 10 Device Programming Failure

JayHarikumaran
5,559 Views

Hello,

 

We have ported the JAM player onto an embedded processor. I can see the status is JBIC_SUCESS but the exit code says Device programming Failure. The FPGA is a MAX10 (10M08SC169I7G) device and it can be programmed using the byte blaster.

 

What would be the reason to get an exit code of 10?

Regards

Jay

0 Kudos
16 Replies
NurAiman_M_Intel
Employee
5,507 Views

Hi,


I found a similar case as yours in forum community.


Please take a look and see if it can help.


https://community.intel.com/t5/Programmable-Devices/programming-fails-with-JAM-STAPL-Player-and-MAX10-10m02scu169/td-p/717957


Regards,

Aiman


0 Kudos
JayHarikumaran
5,501 Views

Hi Aiman,

 

I had seen that post. It is different from our setup. In that setup the JAM player is split between pc and the micro. In our case, the entire JAM player is running from the micro.

 

Regards

 

Jay

0 Kudos
ak6dn
Valued Contributor III
5,496 Views

Well, you have the source code, right? Where in the source code is the exit code 10 generated, for what cases?

0 Kudos
JayHarikumaran
5,475 Views

I can the exit code 10 is set in case 0x25

case 0x25: /* EXIT */
IF_CHECK_STACK(1)
{
*exit_code = (int) stack[--stack_ptr];
}
done = 1;
break;

How or why it gets here is harder to find out as the stack array is modified in many of the case statements which go to 0x80

0 Kudos
NurAiman_M_Intel
Employee
5,462 Views

Hi,


So do you still have issue with the exit code?


Perhaps you can refer to AN425 on using JAM STAPL.

https://www.intel.com/content/www/us/en/docs/programmable/683089/current/using-the-command-line-jam-stapl-solution.html


Regards,

Aiman




0 Kudos
NurAiman_M_Intel
Employee
5,460 Views

Additional information from our KDB regarding exit code 10;


https://www.intel.com/content/www/us/en/support/programmable/articles/000074573.html


Regards,

Aiman


0 Kudos
JayHarikumaran
5,500 Views

Dear Aiman,

 

Thats a great tip. Thank you very much. Could you let me know how to turn off the real time ISP feature? We are using JAM player from embedded processor. We can program in the string if I could know the command.

 

Regards

 

Jay

0 Kudos
JayHarikumaran
5,494 Views

Hi Aiman,

 

I checked the page 5 you mentioned.
https://www.intel.com/content/www/us/en/docs/programmable/683089/current/generating-byte-code-jam-stapl-files.html

 

I have also attached the options I saw from the programmer when generating the jam file. The ISP clamp is turned off by default and I checked to make sure the ISP option is unchecked in the programmer options. I have attached the screen shots below.

 

It is not clear for me how to disable the ISP option. We have an MCU which is used to program the MAX 10 on the board. The JAM player is ported to that MCU to run the update.

 

Do I change the ISP mode from a quartus option in the .jam file generation or do i need to change anything in the jam player to send that command? For eg: in the jbi_execute function?

 

Thanks in advance for your help.

 

Regards

 

Jay

0 Kudos
NurAiman_M_Intel
Employee
5,480 Views

Hi Jay,


Apologize that previous reply does not help to solve this.


Just to confirm, you are already using Quartus programmer to programmer .jbc or .jam files is it?


Have you try to use quartus_jli command-line to program .jbc or .jam files? You can refer to page 10 of the AN425

https://www.intel.com/content/www/us/en/docs/programmable/683089/current/command-line-syntax-of-quartus-jli-command.html


Regards,

Aiman


0 Kudos
JayHarikumaran
5,477 Views

Hi Aiman,

 

I would describe my setup once again.

As I mentioned in previous posts, we are not using JAM player from the pc.
We are using JAM player from an embedded MCU.

 

To load program from quartus, we use the .pof file with the programmer and USB blaster II

 

The program is ported to the embedded target and we have four pins connected to the MAX10 to program the FPGA.

 

After you shared the tip about the ISP option, I tried two options:

 

1. Disabled the ISP and generated the JAM file and converted it to a hex file and used it to program the FPGA.

I get the exit code 10 as mentioned before. The image in fpga is unaffected.

 

2. Enabled the ISP and used the generated the JAM file to program the FPGA. I got exit code 0!! from both Program and Verify action.

After power cycling though, I saw the FPGA logic is absent and it is at the reset state.

 

So did the above option just erase the flash? In that case, why would I get successful programming confirmation from JAM player?

Or do I need to try something else to transfer the logic to SRAM if I use the ISP option?

 

Regards

 

Jay

0 Kudos
JayHarikumaran
5,451 Views

Hi Aiman,

 

Is there any other options I can try? I can recreate the ISP situation I described above.

If I disable ISP, I get exit_code 10 and device program in CFM is unchanged.
If ISP is enabled, I get exit_code 0 but it erases the CFM.

 

We are using 10M08SCU169A7G device and JTAGEN is disabled. So the JTAG pins are reserved for JTAG alone.

 

Regards

 

Jay

0 Kudos
NurAiman_M_Intel
Employee
5,394 Views

Hi,


Apologize for the delay in response.


  • Can you show me how did you generate the JAM? Show the setting when generating this file.
  • Can you share the picture on how you do the programming?


Regards,

Aiman


0 Kudos
JayHarikumaran
5,359 Views

Hi Aiman,

 

Apologies for the delayed response. I had some access issues to the community forum.

I have attached the settings. The Max 10 JTAG chain is connected to GPIO of our embedded mcu. We ported the jam player to the cpu.

We generate the JAM file and then convert the JAM file to JBC format using the jbc.exe using
"jbc -f2 -u xxx.jam xxx.jbc"

 

Are the above options correct to use? We convert the jbc file to a C file with the entire buffer.

 

Regards

 

Jay

 

 

 

 

0 Kudos
NurAiman_M_Intel
Employee
5,369 Views

We do not receive any response from you to the previous answer that I have provided. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you


0 Kudos
JayHarikumaran
5,346 Views

Hi Aiman,

 

Any suggestions after reviewing the settings?

Regards

 

Jay

0 Kudos
Reply