diff options
| author | Damien George | 2014-04-12 13:07:45 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-12 13:07:45 +0100 |
| commit | c55721582282f282d33e35e458a2944890210ebc (patch) | |
| tree | 368bf404d6919d1c3d48560da78510808a914bb1 /bare-arm/Makefile | |
| parent | f7e4e1c2b48789125d1c2b2cee05ae9c088baa77 (diff) | |
Add 'bare-arm' port: the bare minimum to get it running on an ARM MCU.
Diffstat (limited to 'bare-arm/Makefile')
| -rw-r--r-- | bare-arm/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/bare-arm/Makefile b/bare-arm/Makefile new file mode 100644 index 000000000..0e9f1f7c3 --- /dev/null +++ b/bare-arm/Makefile @@ -0,0 +1,44 @@ +include ../py/mkenv.mk + +# qstr definitions (must come before including py.mk) +QSTR_DEFS = qstrdefsport.h + +# include py core make definitions +include ../py/py.mk + +CROSS_COMPILE = arm-none-eabi- + +CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion +CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT) + +#Debugging/Optimization +ifeq ($(DEBUG), 1) +CFLAGS += -O0 -ggdb +else +CFLAGS += -Os -DNDEBUG +endif + +LDFLAGS = --nostdlib -T stm32f405.ld +LIBS = + +SRC_C = \ + main.c \ +# printf.c \ + string0.c \ + malloc0.c \ + gccollect.c \ + +SRC_S = \ +# startup_stm32f40xx.s \ + gchelper.s \ + +OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o) $(SRC_S:.s=.o)) + +all: $(BUILD)/flash.elf + +$(BUILD)/flash.elf: $(OBJ) + $(ECHO) "LINK $@" + $(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + $(Q)$(SIZE) $@ + +include ../py/mkrules.mk |
