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.
This commit is contained in:
Damien George
2018-04-24 12:01:49 +10:00
parent a60efa8202
commit 8a949ba599
4 changed files with 21 additions and 3 deletions

View File

@@ -244,8 +244,10 @@ def main():
print("")
with open(args.qstr_filename, 'wt') as qstr_file:
print('#if MICROPY_PY_STM', file=qstr_file)
for qstr in sorted(needed_qstrs):
print('Q({})'.format(qstr), file=qstr_file)
print('#endif // MICROPY_PY_STM', file=qstr_file)
with open(args.mpz_filename, 'wt') as mpz_file:
for mpz in sorted(needed_mpzs):