Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12409 Discussions

Nios2 debug and variable panel

Altera_Forum
Honored Contributor II
820 Views

Hello guys.. this issue is driving me mad !! 

 

I can't understand while debugging some projects the variable panel shows that my vars value are all 0s. Moreover if I put an alt_printf() in my code, exactly a step before the breakpoint after which I check my vars value with the variables tab, the nios console shows the exact value of the var !! So What I See Is Not What I Get !! 

 

eg:  

 

alt_u8 myvar=0x01; 

 

--> variable panels shows myvar=0x00 

--> alt_printf() shows 0x01 

 

To make matters worse on some projects I can't see any variable in the variable panel as if there are no vars at all in my main() function. 

 

I'm running quartus13sp1 web edition 

 

 

Do you have any suggestion ?! 

 

Thank you and have a nice day !
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
88 Views

Solved.. 

 

The problem was the optimization. If it is turned on unusued variable are not displayed and step debugging is not sequantial.  

 

You can disable optimization in this way: 

- right click on your project -> properties 

- click on Nios2 application properties 

- set optimization level to off
Altera_Forum
Honored Contributor II
88 Views

Thanks. That just fixed my problem too. Perhaps a warning message would not go amiss?

Reply