06.02.2013 Views

AVR32795: Using the GNU Linker Scripts on AVR UC3 ... - Atmel

AVR32795: Using the GNU Linker Scripts on AVR UC3 ... - Atmel

AVR32795: Using the GNU Linker Scripts on AVR UC3 ... - Atmel

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

32158A-<strong>AVR</strong>-01/11<br />

<str<strong>on</strong>g><strong>AVR</strong>32795</str<strong>on</strong>g><br />

� Clear uninitialized external SDRAM data having a global lifetime in <str<strong>on</strong>g>the</str<strong>on</strong>g><br />

.bss_sdram secti<strong>on</strong> using <str<strong>on</strong>g>the</str<strong>on</strong>g> symbols previously defined in <str<strong>on</strong>g>the</str<strong>on</strong>g> linker script<br />

(_bss_sdram_start and _bss_sdram_end (VMA addresses))<br />

D. <str<strong>on</strong>g>Using</str<strong>on</strong>g> dynamic allocati<strong>on</strong>: use malloc() and free() “as usual”<br />

E. Assigning an initialized variable to external SDRAM:<br />

__attribute__((__secti<strong>on</strong>__(".data_sdram")))<br />

static int AllGoodChildrenGoToHeaven[7] = { 1,2,3,4,5,6,7 };<br />

F. Assigning a n<strong>on</strong>-initialized variable to external SDRAM:<br />

__attribute__((__secti<strong>on</strong>__(".bss_sdram")))<br />

static int HelloGoodbye;<br />

6.3.2 Details (documentati<strong>on</strong> and source code)<br />

<strong>AVR</strong>32733 applicati<strong>on</strong> note: Placing data and <str<strong>on</strong>g>the</str<strong>on</strong>g> heap in external SDRAM.<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!