From 5c0e26fb7be7d1e268462221c30998ddb2223580 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 11 Jul 2010 17:18:29 +0200 Subject: gcc: automatically compute user flash size This is done at link time. As a consequence, the user flash size is not available at compile time, which is a problem for the FILEHEADER type. This is solved by using a maximum size so that the static Header variable is big enough. It would not have been a problem if this variable was put on the stack. --- AT91SAM7S256/SAM7S256/gcc/nxt.ld | 3 +++ 1 file changed, 3 insertions(+) (limited to 'AT91SAM7S256/SAM7S256/gcc/nxt.ld') diff --git a/AT91SAM7S256/SAM7S256/gcc/nxt.ld b/AT91SAM7S256/SAM7S256/gcc/nxt.ld index 9a41b10..8e5f0cb 100644 --- a/AT91SAM7S256/SAM7S256/gcc/nxt.ld +++ b/AT91SAM7S256/SAM7S256/gcc/nxt.ld @@ -77,6 +77,9 @@ SECTIONS _edata = . ; PROVIDE (edata = .); + __STARTOFUSERFLASH_FROM_LINKER = + ALIGN (LOADADDR (.data) + SIZEOF (.data), 0x100); + /* .bss section which is used for uninitialized data */ .bss (NOLOAD) : { -- cgit v1.2.3