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.
12410 Discussions

Runtime Stack Checking not working

Broddo
New Contributor I
364 Views

Hi - I'm running C++ code on a Max10 and booting from the UFM. Everything works well enough, however, I'm trying to search for a hard to find bug. In the process of doing this, I thought I'd enable runtime stack checking. I did this by following the embedded developers guide.

 

I have enabled "runtime stack checking" and also enabled "instruction related exceptions" in the BSP. However, when I do this, the device stops booting properly - it never leaves alt_main(). It appears to continuously trigger a 'trap' exception while trying to configure the system clock timer (sys_clk_timer). However - this works fine if "runtime stack checking" is left turned off.

 

Has anyone experienced something similar?

0 Kudos
5 Replies
Ahmed_H_Intel1
Employee
182 Views

Hi,

Can you share the BSP settings?

 

Broddo
New Contributor I
182 Views

Sure thing. Here is "settings.bsp" renamed as "settings.xml" to allow it to be uploaded to the forum.

Ahmed_H_Intel1
Employee
182 Views

Thanks for the shared file, I will check it and let you know my comments

 

Broddo
New Contributor I
182 Views

Thanks! Some more info that might be useful: if I remove the system clock from the BSP but leave runtime stack checking enabled, it works fine also.

Broddo
New Contributor I
182 Views

I think I've found the answer. I'm using the vectored interrupt controller. Seciont 37.5.6 the Embedded Peripherals IP User Guide version 19.2 (page 452) states:

 

"The VIC does not support runtime stack checking feature (hal.enable_runtime_stack_checking) in the BSP setting."

 

That is most likely the reason then.

Reply