mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
scons: cleanup defines
This commit is contained in:
parent
3a7277788f
commit
3dab5e7797
@ -1,5 +1,7 @@
|
|||||||
# pylint: disable=E0602
|
# pylint: disable=E0602
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
CCFLAGS_MOD = ''
|
CCFLAGS_MOD = ''
|
||||||
CPPPATH_MOD = []
|
CPPPATH_MOD = []
|
||||||
CPPDEFINES_MOD = []
|
CPPDEFINES_MOD = []
|
||||||
@ -299,7 +301,7 @@ SOURCE_PY.extend(Glob('src/*/*/*/*.py'))
|
|||||||
SOURCE_PY.extend(Glob('src/*/*/*/*/*.py'))
|
SOURCE_PY.extend(Glob('src/*/*/*/*/*.py'))
|
||||||
SOURCE_PY_DIR = 'src/'
|
SOURCE_PY_DIR = 'src/'
|
||||||
|
|
||||||
env = Environment()
|
env = Environment(ENV=os.environ)
|
||||||
|
|
||||||
env.Tool('micropython')
|
env.Tool('micropython')
|
||||||
|
|
||||||
@ -336,12 +338,10 @@ env.Replace(
|
|||||||
'vendor/micropython/lib/cmsis/inc',
|
'vendor/micropython/lib/cmsis/inc',
|
||||||
] + CPPPATH_MOD,
|
] + CPPPATH_MOD,
|
||||||
CPPDEFINES=[
|
CPPDEFINES=[
|
||||||
'MICROPY_MODULE_FROZEN_MPY',
|
|
||||||
('MICROPY_QSTR_EXTRA_POOL', 'mp_qstr_frozen_const_pool'),
|
|
||||||
('STM32_HAL_H', '"<stm32f4xx_hal.h>"'),
|
|
||||||
'STM32F405xx',
|
|
||||||
'TREZOR_STM32',
|
'TREZOR_STM32',
|
||||||
'MCU_SERIES_F4',
|
'MCU_SERIES_F4',
|
||||||
|
'STM32F405xx',
|
||||||
|
('STM32_HAL_H', '"<stm32f4xx_hal.h>"'),
|
||||||
] + CPPDEFINES_MOD,
|
] + CPPDEFINES_MOD,
|
||||||
ASPPFLAGS='$CFLAGS $CCFLAGS', )
|
ASPPFLAGS='$CFLAGS $CCFLAGS', )
|
||||||
|
|
||||||
|
@ -251,22 +251,19 @@ env.Replace(
|
|||||||
'vendor/micropython/lib/mp-readline',
|
'vendor/micropython/lib/mp-readline',
|
||||||
] + CPPPATH_MOD,
|
] + CPPPATH_MOD,
|
||||||
CPPDEFINES=[
|
CPPDEFINES=[
|
||||||
'MICROPY_USE_READLINE',
|
|
||||||
'TREZOR_UNIX',
|
|
||||||
'UNIX',
|
'UNIX',
|
||||||
|
'TREZOR_UNIX',
|
||||||
|
'MICROPY_USE_READLINE',
|
||||||
('MP_CONFIGFILE', '\\"embed/unix/mpconfigport.h\\"'),
|
('MP_CONFIGFILE', '\\"embed/unix/mpconfigport.h\\"'),
|
||||||
] + CPPDEFINES_MOD,
|
] + CPPDEFINES_MOD,
|
||||||
ASPPFLAGS='$CFLAGS $CCFLAGS', )
|
ASPPFLAGS='$CFLAGS $CCFLAGS', )
|
||||||
|
|
||||||
env.Replace(
|
env.Replace(
|
||||||
PYTHON='python',
|
PYTHON='python',
|
||||||
PYTHONPATH='vendor/micropython/py',
|
|
||||||
MAKEQSTRDEFS='$PYTHON vendor/micropython/py/makeqstrdefs.py',
|
|
||||||
MAKEQSTRDATA='$PYTHON vendor/micropython/py/makeqstrdata.py',
|
MAKEQSTRDATA='$PYTHON vendor/micropython/py/makeqstrdata.py',
|
||||||
MAKEVERSIONHDR='$PYTHON vendor/micropython/py/makeversionhdr.py',
|
MAKEVERSIONHDR='$PYTHON vendor/micropython/py/makeversionhdr.py',
|
||||||
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross',
|
|
||||||
MPY_TOOL='$PYTHON vendor/micropython/tools/mpy-tool.py',
|
MPY_TOOL='$PYTHON vendor/micropython/tools/mpy-tool.py',
|
||||||
MAKE_FROZEN='$PYTHON vendor/micropython/tools/make-frozen.py', )
|
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross', )
|
||||||
|
|
||||||
#
|
#
|
||||||
# Micropython version
|
# Micropython version
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
#ifndef __INCLUDED_MPCONFIGPORT_H
|
#ifndef __INCLUDED_MPCONFIGPORT_H
|
||||||
#define __INCLUDED_MPCONFIGPORT_H
|
#define __INCLUDED_MPCONFIGPORT_H
|
||||||
|
|
||||||
|
// frozen modules
|
||||||
|
#define MICROPY_MODULE_FROZEN_MPY (1)
|
||||||
|
#define MICROPY_QSTR_EXTRA_POOL (mp_qstr_frozen_const_pool)
|
||||||
|
|
||||||
// memory allocation policies
|
// memory allocation policies
|
||||||
#define MICROPY_ALLOC_PATH_MAX (128)
|
#define MICROPY_ALLOC_PATH_MAX (128)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user