Skip to content

Commit 8486e28

Browse files
committed
stm32: Disable qstr hashing on small boards.
Sets MICROPY_QSTR_BYTES_IN_HASH==0 on stm32x0 boards. This saves e.g. 2kiB on NUCLEO_F091. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <[email protected]>
1 parent 7ea5039 commit 8486e28

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.h

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES)
99

10+
#define MICROPY_QSTR_BYTES_IN_HASH (0)
11+
1012
#define MICROPY_HELPER_REPL (1)
1113
#define MICROPY_KBD_EXCEPTION (1)
1214
#define MICROPY_EMIT_THUMB (0)

ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#define MICROPY_HW_BOARD_NAME "NUCLEO-F091RC"
22
#define MICROPY_HW_MCU_NAME "STM32F091RCT6"
33

4+
#define MICROPY_QSTR_BYTES_IN_HASH (0)
5+
46
#define MICROPY_EMIT_THUMB (0)
57
#define MICROPY_EMIT_INLINE_THUMB (0)
68
#define MICROPY_OPT_COMPUTED_GOTO (0)

ports/stm32/boards/NUCLEO_L073RZ/mpconfigboard.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#define MICROPY_HW_BOARD_NAME "NUCLEO-L073RZ"
66
#define MICROPY_HW_MCU_NAME "STM32L073RZT6"
77

8+
#define MICROPY_QSTR_BYTES_IN_HASH (0)
9+
810
#define MICROPY_EMIT_THUMB (0)
911
#define MICROPY_EMIT_INLINE_THUMB (0)
1012
#define MICROPY_OPT_COMPUTED_GOTO (0)

0 commit comments

Comments
 (0)