aboutsummaryrefslogtreecommitdiff
path: root/stm/Makefile
diff options
context:
space:
mode:
authorDamien2013-10-16 00:46:39 +0100
committerDamien2013-10-16 00:46:39 +0100
commit152568bcb61e65b700ca2b963534f2632d080345 (patch)
tree4abdf60b47a166c7cca0c629caf6afc137c029a8 /stm/Makefile
parentc9f91976e19e07f2cf9e4b5b348eedd3e473419a (diff)
NLR and Python exceptions work on the board.
Diffstat (limited to 'stm/Makefile')
-rw-r--r--stm/Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/stm/Makefile b/stm/Makefile
index 23bcffc13..ee1453da6 100644
--- a/stm/Makefile
+++ b/stm/Makefile
@@ -8,7 +8,6 @@ CC = arm-none-eabi-gcc
LD = arm-none-eabi-ld
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfloat-abi=hard -DSTM32F40XX -DHSE_VALUE=8000000
CFLAGS = -I. -I$(PYSRC) -I$(FATFSSRC) -I$(STMSRC) -Wall -ansi -std=gnu99 -Os -DNDEBUG $(CFLAGS_CORTEX_M4)
-CFLAGS_PY = -DEMIT_ENABLE_THUMB
LDFLAGS = --nostdlib -T stm32f405.ld
SRC_C = \
@@ -27,7 +26,8 @@ SRC_S = \
startup_stm32f40xx.s \
PY_O = \
-# malloc.o \
+ nlrthumb.o \
+ malloc.o \
qstr.o \
misc.o \
lexer.o \
@@ -109,15 +109,18 @@ $(BUILD)/%.o: $(FATFSSRC)/%.c
$(BUILD)/%.o: $(STMSRC)/%.c
$(CC) $(CFLAGS) -c -o $@ $<
+$(BUILD)/%.o: $(PYSRC)/%.s
+ $(AS) -c -o $@ $<
+
$(BUILD)/%.o: $(PYSRC)/%.c mpyconfig.h
- $(CC) $(CFLAGS) $(CFLAGS_PY) -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
$(BUILD)/emitnthumb.o: $(PYSRC)/emitnative.c $(PYSRC)/emit.h
- $(CC) $(CFLAGS) $(CFLAGS_PY) -DN_THUMB -c -o $@ $<
+ $(CC) $(CFLAGS) -DN_THUMB -c -o $@ $<
# optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
$(BUILD)/vm.o: $(PYSRC)/vm.c
- $(CC) $(CFLAGS) $(CFLAGS_PY) -O3 -c -o $@ $<
+ $(CC) $(CFLAGS) -O3 -c -o $@ $<
$(BUILD)/parse.o: $(PYSRC)/grammar.h
$(BUILD)/compile.o: $(PYSRC)/grammar.h