stmhal: Reduce size of ESPRUINO_PICO build so it fits in flash.

The default frozen modules are no longer included (but users can still
specify their own via FROZEN_MPY_DIR), complex numbers are disabled and so
are the native, viper and asm_thumb emitters.  Users needing these features
can tune the build to disable other things.
pull/1/head
Damien George 2017-07-12 12:51:37 +10:00
parent 12d4fa9b37
commit f1d260d878
3 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,9 @@
#define MICROPY_HW_BOARD_NAME "Espruino Pico"
#define MICROPY_HW_MCU_NAME "STM32F401CD"
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0)
#define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_USOCKET (0)
#define MICROPY_PY_NETWORK (0)

View File

@ -2,3 +2,6 @@ MCU_SERIES = f4
CMSIS_MCU = STM32F401xE
AF_FILE = boards/stm32f401_af.csv
LD_FILE = boards/stm32f401xd.ld
# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MPY_DIR ?=

View File

@ -39,8 +39,12 @@
// emitters
#define MICROPY_PERSISTENT_CODE_LOAD (1)
#ifndef MICROPY_EMIT_THUMB
#define MICROPY_EMIT_THUMB (1)
#endif
#ifndef MICROPY_EMIT_INLINE_THUMB
#define MICROPY_EMIT_INLINE_THUMB (1)
#endif
// compiler configuration
#define MICROPY_COMP_MODULE_CONST (1)