Forum Discussion
Altera_Forum
Honored Contributor
21 years agoYa if it is a simple program that should be enough. When you compile in the IDE if you're quick enough, they give you a breakdown of how much memory you're program takes, and the amount left over for the heap/stack. If you program kicks the bucket at different places then to me that sounds like memory colliding but I don't know why if you have that much.
In you're code you're not doing any memory allocation yourself are you? I didn't follow what you said about "If only read/write memory in SRAM and other in SDRAM all is ok" are you saying that it works in those memories in read/write mode, but when using the onboard memory it doesn't? If that's the case you may want to check if you're memory is indeed running out (if you don't perform the optimizations that you're readme file give you a hello world program can turn into something like 67kB .... yikes!) Altera has a document talking about reducing the memory requirements but I can't remember what it's called. A few things to try are using -O3 optimization, small C lib, no clean exit, adding the pre-processor "ALT_NO_INSTUCTION_EMULATION", etc.... (in the properties of the software project). If you have done those then you're code might be around ten times bigger then you expect unfortunately. G-luck