In C functions with array parameters are passed by pointer, not
value, so there is no stack push of the array.
You might consider poisting your project archive for forum to look at -
“Create Workspace Bundle”
Stack is put aside at system start, the amount is defined in "System"-tab of the cydwr view defaulted to 0x0400 bytes which is fairly enough. Memory is usually not allocated at run-time except when you are using malloc() yourself. So when the compilation reports that everything fitted (no error-message abot ram overflow) and your stack is still 1k all will be ok.
"Horribly slow start" of the program can be caused by the debugger when complicated breakpoints are to be executed or large amount of watched variables have to be displayed.
'slow program' can also mean you have a problem in your algorithm. And if thats the case, then maybe it has some other bugs too.
Do you allocate your arrays statically, or via malloc()? Do you use heavy recursion / function calls?
Ugg. Why does the forum not email notifications of replies. :/ My main problem (and I have to re-read the replies) was that I was declaring the arrays in the Main() function and that it wasn't checking the memory used. Once I put the arrays outside, then it became part of the memory check and I saw I was way over. I was able to go down to a uint16 instead of 32 and squeeze it it. Let me check the other replies now.
No recursion. Nothing to complicated. Arrays are statically declared. No debugging. Although debugging is slow when I do it, but that's always the case.
It just seems like when I had the arrays declared in the main function and they weren't being included in the memory check, then I would use them, and when I accessed a portion of the memory that would have perhaps gone into the stack or whatever would have happened when the memory ran out, then the whole thing ground to a halt. I have a simple portion that turns on a PIN, delays for 20ms, and then turns off the pin, but it would delay for 5-6 seconds...
But all is good now.