summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.proto6
-rw-r--r--src/ao_intflash.c2
-rw-r--r--src/telemini-v0.1/Makefile.defs1
3 files changed, 6 insertions, 3 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 = \
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)
diff --git a/src/telemini-v0.1/Makefile.defs b/src/telemini-v0.1/Makefile.defs
index 8a3e1ef9..94ac1268 100644
--- a/src/telemini-v0.1/Makefile.defs
+++ b/src/telemini-v0.1/Makefile.defs
@@ -6,3 +6,4 @@ SRC = \
PRODUCT=TeleMini-v0.1
PRODUCT_DEF=-DTELEMINI_V_0_1
IDPRODUCT=0x000a
+CODESIZE=0x6700