diff options
author | Anthony Towns <aj@erisian.com.au> | 2011-02-26 16:06:48 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-16 15:57:38 -0700 |
commit | fc5d014721a7e5a7b22f07eb4ab0bb3c764473fe (patch) | |
tree | 16c9d95beb28bf1ccf93f888c41852a24c3397c0 /src/ao_intflash.c | |
parent | 0e4c55d78852415e79f7318471f4d00c89703b78 (diff) |
ao_intflash: Avoid overwriting code
Require firmware to specify the end of its codespace in its Makefile,
and use this to determine where the start of available flash is. Should
give compile time errors if either there's no room left for storage, or
if there's not enough room for code.
Diffstat (limited to 'src/ao_intflash.c')
-rw-r--r-- | src/ao_intflash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ao_intflash.c b/src/ao_intflash.c index ad5e5aac..450d94a3 100644 --- a/src/ao_intflash.c +++ b/src/ao_intflash.c @@ -24,7 +24,7 @@ #define FCTL_WRITE (1 << 1) #define FCTL_ERASE (1 << 0) -#define ENDOFCODE (0x51f0 + 1500) +#define ENDOFCODE (CODESIZE) #define NUM_PAGES ((0x8000-ENDOFCODE)/1024) #define SIZE (1024*NUM_PAGES) #define LOCN (0x8000 - SIZE) |