**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

No pages like "PlacingData"!

Clear message

Placing data at an address

If you wish to place data (for example a buffer used by a peripheral) at a known address, you can use the following technique.

__attribute__ ((section(".myBuffer"))) unsigned char myBuffer[1024] ;

  /* Define each memory region */
  MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32k */
  RamLoc8 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x2000 /* 8k */
  MyBufferRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x2000

    .myBuffer (NOLOAD):
    } > MyBufferRAM

Aligning data

Data can be aligned by using the following attribute:

__attribute__((aligned(32))) unsigned char my_data[1234] ;