FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5922 Discussions

Nios II code only working in debug mode.

BigHandsomeBee
729 Views

I'm testing a very simple led blinking code.

 

After programming the board, when I click "run" in eclipse, the led blinking code is not working at all.

However, if I click "debug" and enter step-by-step debug mode, and then click "resume", the code is working.

 

Is there any possible reason for this?

 

Code is also attached.

0 Kudos
6 Replies
BigHandsomeBee
711 Views

I also tried the command line "nios-download -g led_example.elf", the result is the same.

It seems that the downloaded code is not working at all.

0 Kudos
BoonBengT_Intel
Moderator
684 Views

Hi @BigHandsomeBee,

 

Thank you for posting in Intel community forum and hope all is well.
A few clarification, is the programmer detecting the board? And did you managed to program the board with the .sof files?
Would also recommend to check for timing issues or unassigned pin.

 

I did managed to look into the project shared, however there seems to be multiple qsf files and failed to compile, can you share what are the targeted device and also quartus version used?
Hope to hear from you soon.

 

Best Wishes
BB

0 Kudos
BigHandsomeBee
668 Views

Hi @BoonBengT_Intel ,

 

Thanks for the reply!

 

I'm using Quartus Prime Pro 21.2 with Stratix 10 device.

 

I re-packed the project file deleting irrelevant files. Please find it in the attachment.

I'm pretty sure the .sof file is successfully programmed to the hardware.

Another thing that I have found recently is that if I downloaded the .elf code multiple times, e.g. type command "nios2-download -g xxxx.elf" in terminal multiple times,

occasionally the downloaded code can work while most of the time it does not work. No timing error was reported in the compilation report, so I'm not sure how this nondeterministic behavior happens.

 

Thank you.

Yu

0 Kudos
BigHandsomeBee
656 Views

@BoonBengT_Intel 

 

Hello,

 

I was wondering if you have successfully compiled the project and reproduced the error?

 

Thank you.

0 Kudos
BoonBengT_Intel
Moderator
631 Views

Hi @BigHandsomeBee,

 

Apologies for the delayed in reply, managed to review through the design and it look good, with reset vector set, can you please try the following 1) Check the connection of the USB blaster by refreshing the target connection. 2) Also please try to set the stdout to null in the bsp editor. 3) If all things failed, can you please try to use the hello world template to see if the run as will work.

Hope to hear from you soon.

 

Best Wishes
BB

0 Kudos
BoonBengT_Intel
Moderator
576 Views

Hi @BigHandsomeBee,

 

Greetings, unfortunately as we do not receive any further clarification on what is provided. Hence thread will now be transitioned to community support and we will no longer monitor this thread. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.

 

Best Wishes

BB

0 Kudos
Reply