diff --git a/apps/ed/Makefile b/apps/ed/Makefile index 6890630..7a05556 100755 --- a/apps/ed/Makefile +++ b/apps/ed/Makefile @@ -41,10 +41,14 @@ APP_COMMON_DIR = $(CURDIR)/../common BASEDIR = ../../.. # Override values given by parent make for this application as its memory usage differs from the standard app. +# Only apply for ZPU builds - these addresses are within the ZPU's unified BRAM address space. +# K64F uses the default heap/stack calculated by build.sh which fits within the Cortex-M4 SRAM regions. +ifeq ($(__ZPU__),1) override HEAPADDR = 0x1FFF5000 override HEAPSIZE = 0x00033000 override STACKADDR = 0x20028000 override STACKSIZE = 0x00000000 +endif # Modules making up Kilo. APP_C_SRC = $(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c diff --git a/apps/kilo/Makefile b/apps/kilo/Makefile index f585d12..b2934e0 100755 --- a/apps/kilo/Makefile +++ b/apps/kilo/Makefile @@ -41,10 +41,14 @@ APP_COMMON_DIR = $(CURDIR)/../common BASEDIR = ../../.. # Override values given by parent make for this application as its memory usage differs from the standard app. +# Only apply for ZPU builds - these addresses are within the ZPU's unified BRAM address space. +# K64F uses the default heap/stack calculated by build.sh which fits within the Cortex-M4 SRAM regions. +ifeq ($(__ZPU__),1) override HEAPADDR = 0x1FFF5000 override HEAPSIZE = 0x00033000 override STACKADDR = 0x20028000 override STACKSIZE = 0x00000000 +endif # Modules making up Kilo. APP_C_SRC = $(APP_COMMON_DIR)/sysutils.c $(APP_COMMON_DIR)/ctypelocal.c diff --git a/apps/mbasic/Makefile b/apps/mbasic/Makefile index 12f389d..e04fe8c 100755 --- a/apps/mbasic/Makefile +++ b/apps/mbasic/Makefile @@ -43,6 +43,8 @@ COMMON_DIR = $(CURDIR)../../common BASEDIR = ../../.. # Override values given by parent make for this application as its memory usage differs from the standard app. +# mbasic only builds on K64F (ZPU build disabled due to missing maths libraries). +# These overrides extend the CODE region to encompass the larger heap needed by the BASIC interpreter. override HEAPADDR = 0x2000C000 override HEAPSIZE = 0x0001BC00 override STACKADDR = 0x20027C00 @@ -62,7 +64,15 @@ FILTER2 = $(filter-out $(filter HEAPSIZE=%,$(FILTER1)), $(FILTER1)) NEWMAKEFLAGS = $(FILTER2) HEAPADDR=$(HEADADDR) HEAPSIZE=$(HEAPSIZE) ifeq ($(__K64F__),1) -include $(APP_DIR)/Makefile.k64f +# Currently mbasic doesnt build on K64F - heap/stack overrides exceed the app CODE region. +# TODO: Rework memory layout to fit within K64F SRAM constraints. +#include $(APP_DIR)/Makefile.k64f +clean: + +all: + +install: + else # Currently mbasic doesnt build on the ZPU due to missing maths libraries. Once I can source them it should build. #include $(APP_DIR)/Makefile.zpu diff --git a/apps/tbasic/Makefile b/apps/tbasic/Makefile index 6021f2a..79d70a9 100755 --- a/apps/tbasic/Makefile +++ b/apps/tbasic/Makefile @@ -41,10 +41,14 @@ APP_COMMON_DIR = $(CURDIR)/../common BASEDIR = ../../.. # Override values given by parent make for this application as its memory usage differs from the standard app. +# Only apply for ZPU builds - these addresses are within the ZPU's unified BRAM address space. +# K64F uses the default heap/stack calculated by build.sh which fits within the Cortex-M4 SRAM regions. +ifeq ($(__ZPU__),1) override HEAPADDR = 0x1FFF5000 override HEAPSIZE = 0x00033000 override STACKADDR = 0x20028000 override STACKSIZE = 0x00000000 +endif # Modules making up Kilo. APP_C_SRC = basic_main.c basic_editor.c basic_exectoks.c basic_expr.c basic_tokens.c basic_utils.c $(APP_COMMON_DIR)/sysutils.c