cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Observer
Observer
3,316 Views
Registered: ‎11-23-2016

SDK Problem with large size array

Hi,

 

I face some very weird problem with a large array size in SDK.

To simplify my problem.

I created array [100][100]. Then, set every index to 0 value. Then, print data out to terminal.

Everything work well.

However, if I change array size to [200][200]. The printed data aren't the value that I assigned.

Moreover, if I change array size to [300][300]. It doesn't print anything.

 

Could you give any sugguestion.

0 Kudos
Reply
4 Replies
Visitor
Visitor
3,288 Views
Registered: ‎01-06-2017

Most likely the huge array is larger than the stack so the program gets corrupted when you write to all the elements. See this thread:

https://forums.xilinx.com/t5/Embedded-Development-Tools/Break-symbol-changing-values-in-case-statement/m-p/741761#M40843

 

Steve

0 Kudos
Reply
Moderator
Moderator
3,223 Views
Registered: ‎07-31-2012

Hi,

 

Could you try increasing stack and heap in SDK ld?

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Reply
Moderator
Moderator
3,197 Views
Registered: ‎12-04-2016

Hi

 

If you want to allocate larger sizes either on stack or on heap, you need to edit the linker descriptor(ld) file in SDK, and needs to increase stack size since you are using larger array. 

 

Right click on Application ---> Generate Linker script ---> Increase stack size

 

 

Best Regards

Shabbir

2,326 Views
Registered: ‎08-29-2017

Hi,

 

I am running into the same issues (xil_printf and print not working) and data not being correct. I have adjusted the stack size to its max size of 0xDEC8 or 57,032. It helped a little bit but didn't solve my problem. I am trying to fill array of 500,000 unsigned integers, sum all the array elements and return a sum. I currently have it working when I have hardware and software running together. But when I want to run the same functionality in software only, it doesn't seems to find the correct result. Any suggestions on how I could get this working without having to add external memory?

 

Thanks in advance,

Aaron

0 Kudos
Reply