Access to LPC1788 External SRAM with Linker Script

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Access to LPC1788 External SRAM with Linker Script

717件の閲覧回数
Eugene723
Contributor II

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:

Access to LPC1788 Extended SRAM with Linker Script (post in NXP forum) - illustration 1.png

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

0 件の賞賛
返信
1 返信

619件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信