ao_intflash: Avoid overwriting code
[fw/altos] / src / Makefile.proto
index 625ca459f58e20916978b565272e7e2217a42a8e..ee3b4d6c60a3a23027447125be341ee3a2aaba66 100644 (file)
@@ -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 = \