Content originally posted in LPCWare by Mark_O on Tue Aug 31 22:20:45 MST 2010
George,
actually, there are 3 SRAM regions: one 32K, and two of 16K, though the 2 peripheral RAM regions are at least contiguous in the address space.
To directly answer your question, even though there is 64K of RAM on the LPC1768, I don't think you can do what you're trying to do. The reason being that the single array you've defined uses up ALL of the main SRAM block. For that to work, you'd have to push ALL other data items out of that space, and into the peripheral SRAM blocks. Including your stacks.
I haven't done enough with this processor yet to know if that's possible or not. Perhaps someone else with more experience can jump in.
BTW, since the main SRAM and peripheral SRAM blocks are NOT contiguous in the memory space, there is no possibility of linearly extending one data segment across them. You probably need to evaluate whether you really need a 32KB array, or if you can get by with a smaller, or dynamic structure.
- Mark
P.S. BTW, this doesn't address the issue that you're going to get truncation of all the entries after the first 255, in your loop here:
> test_table[x]=x+1;
since your indices will quickly exceed what will fit into 1 byte. I suspect you're already aware of that.