I work with a board that has two 1MB SRAM (CY7C1051DV33) chips connected via CS0 (address: 0x8000 0000) and CS1 (address: 0x9000 0000). These memories are declared in settings:
Is this correct? Can external RAM be used this way:
uint8_t __attribute__ ((section("RW_RAM0"))) myLargeData[500000];
As opposite to:
#define LPC_STAT_CS0_BASE 0x80000000UL
volatile uint8_t *myLargeData = (uint8_t *) LPC_STAT_CS0_BASE;
The reason I want to avoid the latter way is that I have multiple variables so I would have to assign each one individually:
volatile uint32_t * myFirstInteger = (uint32_t *)( LPC_STAT_CS0_BASE + 500000 );
volatile uint32_t * mySecondInteger = (uint32_t *)( LPC_STAT_CS0_BASE + 500004 );
volatile uint32_t * myThirdInteger = (uint32_t *)( LPC_STAT_CS0_BASE + 500008 );
and so forth.
Thank you,
Eugene