03-14-2017 12:13 AM
I face some very weird problem with a large array size in SDK.
To simplify my problem.
I created array . Then, set every index to 0 value. Then, print data out to terminal.
Everything work well.
However, if I change array size to . The printed data aren't the value that I assigned.
Moreover, if I change array size to . It doesn't print anything.
Could you give any sugguestion.
03-14-2017 05:17 AM
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:
03-19-2017 02:17 AM
Could you try increasing stack and heap in SDK ld?
03-20-2017 06:05 AM
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
08-29-2017 10:47 PM
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,