[arm-gnu] Placing variable at absolute address in RAM

42Bastian list-bastian.schick at sciopta.com
Thu Apr 5 14:23:59 UTC 2012


> I had no idea this would be so difficult, but apparently GCC doesn't
> make this easy, unlike other compilers.  Since I'm using the lite
> (free) compiler, buying one really isn't an option for hobby use.

The problem is complicated. GCC makes it as easy as other compilers to
place a variable somewhere.
Your constraints (not wasting RAM) makes is complicated.

Try (untested):

	. = ALIGN(1024);
	dma_ring = .;
	/* place some data here e.g.*/
	test.o(.data .bss)
	toto.o(.data .bss)
	dma_eof_data = .;
	dma_desc = dma_ring+464;
	. = dma_desc+16;
	/* place more stuff */

Check the map file, that dma_desc is >= dma_eof_data.

-- 
42Bastian
+
| http://www.sciopta.com
| Fastest direct message passing kernel.
| IEC61508 certified.
+



More information about the arm-gnu mailing list