Greeting,
Yes, I’ve asked to their help desk, but no answer yet, and yes I’ve already searched this forum, and again yes I’ve already searched trough their manual, but can’t find any thing useful (or do I missed something back there?), so I post this.
I am using rowley crosswork 1.6 evaluation version.
Then I wrote code like this:
char buff[40][1000]; //40 kB right?
int i,j;
for(i=0;i<40;i++)for(j=0;j<1000;j++)buff*[j]=0;*
Then I compile it, using LPC2138 that only has 32 kB SRAM, I thought it will show me some errors because it will use 40 kB, but it does not, do anyone know why?
Is there any option to enable RAM restriction somewhere?
The "show code\data size " is showing us only Flash memory used right? Then how can I know how much RAM I’ve used?
That’s it for now, any reply will be appreciated.
The linker should generate a Map file which shows how the memory is allocated. You need to check that.
Leon
Thx for the rep, I appreciate it.
It depends on where the memory is allocated. Your example code is not clear enough.
If the allocation is done outside the scope of a function (or if it is allocated as static inside a function), the memory is allocated at compile time and any reasonably good toolchain will give you a size error (or at least warn about it). In this case you can find out how much RAM is used by looking at the map file as Leon suggested.
If the allocation is done inside the scope of a function, the memory is allocated at run time from the stack and it becomes very hard for a toolchain to find out that anything might be wrong.
The linker should generate a Map file which shows how the memory is allocated. You need to check that.
Yup, this is the way to do it & FYI, v1.7 now includes a memory window.
Thanks again for all of your rep.
About the obtuse coding style :oops: , well I just want to make a simple code to explain my problem, however thanks for the tips.