Download ELF failed

Download ELF failed

by Alexandre Chau -
Number of replies: 7

Hello,

We are always facing the same issue when we try to upload the software to the Nios II processor (on-chip memory, no caches). We had a similar problem last semester which was caused by a license issue, however we rebuilt the whole project from scratch with the correct license but we still get the same error message:


Here is our QSys system:


The system compiles on quartus and can be flashed to the device.

Does anyone have any idea what may be the root cause?

Thank you in advance,

Cheers,

Alex

In reply to Alexandre Chau

Re: Download ELF failed

by Sahand Kashani-Akhavan -

What does your top-level file look like? I often see cases like this when the CPU is always under reset.
In such cases, though quartus can program the FPGA, the jtag master cannot write a compiled binary onto the on-chip memory through the Nios's jtag master port.

In reply to Alexandre Chau

Re: Download ELF failed

by Matthias René Wüst -

Hi Alex

We had a similar problem. If you have changed your .vhd or .qsys files reset the DE1_SoC_top_level.vhd as your top level in Quartus (right-click under hierarchy). Maybe that helps.

Cheers,

Matthias

In reply to Alexandre Chau

Re: Download ELF failed

by Loïc Karl Droz -

Hello, I am Alex' teammate, thank you for your replies.

We have tried both suggestions and unfortunately we still get the same error.

Below is a screenshot of the code we used to deactivate the reset signal.

Regards,

Loïc

In reply to Loïc Karl Droz

Re: Download ELF failed

by Sahand Kashani-Akhavan -

Nothing looks wrong here. I wonder if the problem is in eclipse.

This is going to sound dumb, but when launching your code in eclipse, are you using the "bug-looking" button in the toolbar? If yes, can you instead try right-clicking on your project and doing "Debug As > Nios hardware" and not use the "bug-looking" button in the toolbar? I swear this is something I've seen occasionally in eclipse and it solves issues at times...

In reply to Sahand Kashani-Akhavan

Re: Download ELF failed

by Loïc Karl Droz -

We have tried and unfortunately it doesn't work.

Another problem we sometimes face that may be related: sometimes when flashing the board with the programmer, flashing will fail at a random percentage.

In reply to Loïc Karl Droz

Re: Download ELF failed

by Sahand Kashani-Akhavan -

Ah, that flashing behavior is indeed weird. The programmer should work all the time once you have a valid image. It may be that the OS is repeatedly connecting and disconnecting it?

What's your setup for the labs? Are you using the VM, or do you have the tools installed on your own machine? I have the impression it's a physical issue and not a design issue, but in any case can you zip and upload your project somewhere and send me a pointer to it? I don't have a board, but I want to check the rest of the system to see if anything else is wrong.

In reply to Sahand Kashani-Akhavan

Re: Download ELF failed

by Alexandre Chau -

Hi Sahand,

We solved the issue: we had simply forgotten to run the TCL script, which did not raise any other error at compilation or flashing.

Thanks,

Alex