mirror of
https://github.com/micropython/micropython.git
synced 2025-08-30 22:40:40 +02:00
stm32/modstm: Add MICROPY_PY_STM_CONST flag, clear it for STM32WL5.
MICROPY_PY_STM_CONST defaults to 1 if MICROPY_PY_STM is set. Overriding to 0 disables the named register peripheral constants being including in the stm32 module. This saves about 7.5KB of code size for the STM32WL55, which is significant as this SoC doesn't have a lot of flash. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
02620c2236
commit
2919a9fbf3
@@ -319,10 +319,10 @@ def main():
|
||||
print("")
|
||||
|
||||
with open(args.qstr_filename, "wt") as qstr_file:
|
||||
print("#if MICROPY_PY_STM", file=qstr_file)
|
||||
print("#if MICROPY_PY_STM_CONST", file=qstr_file)
|
||||
for qstr in sorted(needed_qstrs):
|
||||
print("Q({})".format(qstr), file=qstr_file)
|
||||
print("#endif // MICROPY_PY_STM", file=qstr_file)
|
||||
print("#endif // MICROPY_PY_STM_CONST", file=qstr_file)
|
||||
|
||||
with open(args.mpz_filename, "wt") as mpz_file:
|
||||
for mpz in sorted(needed_mpzs):
|
||||
|
Reference in New Issue
Block a user