diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-13 04:02:56 +0200 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-13 04:02:56 +0200 |
| commit | 5ebabcda4134dfac94967e43e7791354202c5b45 (patch) | |
| tree | 0daec19a2b2e5655efe3a6d8f325f8d4f46595f6 /minimal/Makefile | |
| parent | d511a20a6ba28571b106e714eee8329288de7ba4 (diff) | |
minimal: Convert "bare-arm" port to "minimal" port.
This enable libc functions, GC, and line-editing function. Also, UART
emulation for POSIX systems is added. Emulation build is set as default.
Diffstat (limited to 'minimal/Makefile')
| -rw-r--r-- | minimal/Makefile | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/minimal/Makefile b/minimal/Makefile index a59bb9f89..65a40a250 100644 --- a/minimal/Makefile +++ b/minimal/Makefile @@ -1,19 +1,29 @@ include ../py/mkenv.mk +CROSS = 0 + # qstr definitions (must come before including py.mk) QSTR_DEFS = qstrdefsport.h # include py core make definitions include ../py/py.mk +ifeq ($(CROSS), 1) CROSS_COMPILE = arm-none-eabi- +endif INC = -I. INC += -I.. +INC += -I../lib/mp-readline +INC += -I$(PY_SRC) -I../stmhal INC += -I$(BUILD) +ifeq ($(CROSS), 1) 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 = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT) +else +CFLAGS = -m32 $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) +endif #Debugging/Optimization ifeq ($(DEBUG), 1) @@ -22,15 +32,22 @@ else CFLAGS += -Os -DNDEBUG endif +ifeq ($(CROSS), 1) LDFLAGS = -nostdlib -T stm32f405.ld -Map=$@.map --cref +else +LD = gcc +LDFLAGS = -m32 -Wl,-Map=$@.map,--cref +endif LIBS = SRC_C = \ main.c \ -# printf.c \ - string0.c \ - malloc0.c \ - gccollect.c \ + uart_core.c \ + uart_extra.c \ + stmhal/printf.c \ + stmhal/string0.c \ + stmhal/pyexec.c \ + lib/mp-readline/readline.c \ SRC_S = \ # startup_stm32f40xx.s \ |
