9 years, 1 month ago.

Locate variables at the specified address

I'm trying to use DMA on NXP's LPC824, and it requires to locate some variables ('descriptors') at the certain location in SRAM, whose address should be aligned at 512-byte boundary. Is there any way to specify the address of variables in SRAM?

1 Answer

9 years, 1 month ago.

So you don't need a specific address, just alligned, see: http://www.keil.com/support/man/docs/armccref/armccref_babdfecc.htm

If you want really a specific location, see for example: http://www.keil.com/support/docs/2829.htm or

 __attribute__((section(".ARM.__at_0x10000"))). 

With of course a correct location inside your SRAM memory.

Accepted Answer

Thank you, Erik, I'll try it!

posted by Junichi Akita 14 Mar 2015