Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
818 Views

Program Counter Jumping Randomly while debugging?

Hi all, 

I am using stratix-2 FPGA(EP2S30F484)[/B]and there is no external ram. 

My elf file size is 170 Kilo Bytes.even if i create small hello world also its giving the same size. 

If i include some code and try to debug Processor is not executing sequentially (Break points not working/even step by step also).  

In this case i don`t have any external Flash but i have EPCS. 

 

I am using Cyclone-V FPGA(5CEFA4F23) and there is no external ram. 

My elf file size is 720 Kilo Bytes.even if i create small hello world also its giving the same size. 

If i include some code and try to debug Processor is not executing sequentially (Break points not working/even step by step also). 

Here i have NOR flash of size 128 MB . 

 

The above two cases i have the following questions: 

1.If i want to debug properly is there any way to reduce the elf size? 

2.Is it possible to debug with that elf size and available internal memory? 

3.If it is there any possibility to debug from the Flash memory can you please suggest? 

4.Else is there any additional configurations required? 

 

Kindly let me know is there any confusion and help me. 

Thanks In advance. 

 

Thanks & Regards, 

Inaganti Venu
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
92 Views

The size of the .elf doesn't really affect the ability to perform basic debugging. Required question: have you enabled the JTAG debug features when you parameterized the processor in Qsys/Platform Designer? Can you run code at all from Eclipse (run as hardware as opposed to debug as hardware)?

Altera_Forum
Honored Contributor I
92 Views

what optimisation level are you using when compiling? it might appear as if the code is stepping out of sequence when debugging with higher levels of optimisation and where you set a breakpoint might get optimised out.

Altera_Forum
Honored Contributor I
92 Views

Jtag connection enabled. 

I run the software in run mode and worked after some time i got download elf failed and after that i am unable to download .elf.
Altera_Forum
Honored Contributor I
92 Views

 

--- Quote Start ---  

what optimisation level are you using when compiling? it might appear as if the code is stepping out of sequence when debugging with higher levels of optimisation and where you set a breakpoint might get optimised out. 

--- Quote End ---  

 

 

"I am using -O0 level to support break points other wise it is -Os 

 

I am attaching my project sopcinfo the elf file size is 500Kbytes. 

Can you please reduced to 64KB and send me if possible send me the process also.
Reply