aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/mpconfigboard_common.h
diff options
context:
space:
mode:
authorDamien George2018-04-24 12:01:49 +1000
committerDamien George2018-04-24 12:01:49 +1000
commit8a949ba599df740e6d0c9154619c6f83f2949924 (patch)
tree7a67901d0253a60cc5df4bdd98eaa777d793ba96 /ports/stm32/mpconfigboard_common.h
parenta60efa8202d84a2d3efe522009d700dac289538e (diff)
stm32: Introduce MICROPY_PY_STM config to include or not the stm module.
By default the stm module is included in the build, but a board can now define MICROPY_PY_STM to 0 to not include this module. This reduces the firmware by about 7k.
Diffstat (limited to 'ports/stm32/mpconfigboard_common.h')
-rw-r--r--ports/stm32/mpconfigboard_common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h
index 97c21d022..2ed8609e7 100644
--- a/ports/stm32/mpconfigboard_common.h
+++ b/ports/stm32/mpconfigboard_common.h
@@ -32,6 +32,11 @@
/*****************************************************************************/
// Feature settings with defaults
+// Whether to include the stm module, with peripheral register constants
+#ifndef MICROPY_PY_STM
+#define MICROPY_PY_STM (1)
+#endif
+
// Whether to enable storage on the internal flash of the MCU
#ifndef MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)