Other Parts Discussed in Thread: MSP430G2553, TEST2
Hello,
I'm a bit confused as to what data types can be stored in rom. The compiler data user guide says that:
using the const keyword you can define large constant tables and allocate them into system ROM. For example to allocate a ROM table you could use the following defination:
const int digits[] = {0,1,2,3,4,5,6,7,8,9};
I have been experimenting a bit with this and am somewhat confused as to how this is implemented. I have done a small but of PIC programming before and microchip used a rom keyword which (for what i needed at the time, which was strings) made things fairly clear but I'm not really getting this.
From what I can gather by building code on CCS for a msp430g2553, the only data I can place in rom has to be in an array and must be declared before main, is this correct?
I started this initially with the idea of putting some structures into rom, and a const single structure appears to take up data space, but two+ in an array of structures takes up no data space which I found a bit strange. I don't understand why this is limited to arrays.
Any pointers would be appreciated, thanks.