Discussion Forum

LARGE ARRAY

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
elavarasan selvaraj
Posted
19-Mar-2010 07:25 GMT
Toolset
ARM
New! LARGE ARRAY

Hi...

Is there any way to declare large size of array?

example:

char arr[200*1024];//200kb

Thanks

Read-Only
Author
Andy Neil
Posted
19-Mar-2010 08:02 GMT
Toolset
ARM
New! Why do you doubt it?

For specific limits of the compiler you're using, look in the Manual; eg,

http://www.keil.com/support/man/docs/armccref/armccref_babdfdbb.htm

Read-Only
Author
Tamir Michael
Posted
19-Mar-2010 09:13 GMT
Toolset
ARM
New! RE: LARGE ARRAY

Is there any way to declare large size of array?

Not as an automatic variable. use static or externally linked variables, assuming you have enough RAM. Note that an LPC2468/78 has only 98 KB internal RAM...

Read-Only
Author
IB Shy
Posted
19-Mar-2010 09:28 GMT
Toolset
ARM
New! RE: LARGE ARRAY

"Not as an automatic variable."

Surely that just depends upon the size of the stack you've allocated, which (of course) would be limited to the amount of physical storage.

Not that I'd recommend having such a large stack.

Read-Only
Author
John Linq
Posted
19-Mar-2010 09:37 GMT
Toolset
ARM
New! RE: LARGE ARRAY
const char arr[200*1024];    //200kb

If it is a constant array, it can be put into internal flash with the keyword const.

Read-Only
Author
Andy Neil
Posted
19-Mar-2010 09:51 GMT
Toolset
ARM
New! RE: Not as an automatic variable.

Why not?

It's probably not a good idea, but I don't see any particular reason that would prevent it - if you really wanted to...

Next Thread | Thread List | Previous Thread Start a Thread | Settings