summaryrefslogtreecommitdiff
path: root/src/Makefile.proto
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2011-02-26 16:06:48 +1000
committerKeith Packard <keithp@keithp.com>2011-03-16 15:57:38 -0700
commitfc5d014721a7e5a7b22f07eb4ab0bb3c764473fe (patch)
tree16c9d95beb28bf1ccf93f888c41852a24c3397c0 /src/Makefile.proto
parent0e4c55d78852415e79f7318471f4d00c89703b78 (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/Makefile.proto')
-rw-r--r--src/Makefile.proto6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.proto b/src/Makefile.proto
index 625ca459..ee3b4d6c 100644
--- a/src/Makefile.proto
+++ b/src/Makefile.proto
@@ -13,9 +13,11 @@ ifndef VERSION
include ../Version
endif
-CFLAGS=--model-small --debug --opt-code-speed
+CFLAGS=--model-small --debug --opt-code-speed -DCODESIZE=$(CODESIZE)
-LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size 0x8000 \
+CODESIZE ?= 0x8000
+
+LDFLAGS=--out-fmt-ihx --code-loc 0x0000 --code-size $(CODESIZE) \
--xram-loc 0xf000 --xram-size 0xda2 --iram-size 0xff
INC = \