minimal: Allow compiling on macOS.
Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
This commit is contained in:
parent
c27d304bed
commit
e3be70b5e8
|
@ -26,9 +26,14 @@ CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -msoft-float -fsingl
|
|||
CFLAGS += $(INC) -Wall -Werror -std=c99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
|
||||
LDFLAGS += -nostdlib -T stm32f405.ld -Map=$@.map --cref --gc-sections
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
LD = $(CC)
|
||||
CFLAGS += $(INC) -Wall -Werror -Wdouble-promotion -Wfloat-conversion -std=c99 $(COPT)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
LDFLAGS += -Wl,-Map=$@.map,--cref -Wl,--gc-sections
|
||||
else ifeq ($(UNAME_S),Darwin)
|
||||
LDFLAGS += -Wl,-map,$@.map -Wl,-dead_strip
|
||||
endif
|
||||
endif
|
||||
|
||||
CSUPEROPT = -Os # save some code space
|
||||
|
|
|
@ -33,7 +33,7 @@ typedef long mp_off_t;
|
|||
#define MICROPY_HW_BOARD_NAME "minimal"
|
||||
#define MICROPY_HW_MCU_NAME "unknown-cpu"
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#define MICROPY_MIN_USE_STDOUT (1)
|
||||
#define MICROPY_HEAP_SIZE (25600) // heap size 25 kilobytes
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue