mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
firmware: use separate source tree (src1) for T1 app code for now
This commit is contained in:
parent
0ab0f9e418
commit
96ddcf39df
@ -276,14 +276,6 @@ SOURCE_TREZORHAL = [
|
||||
|
||||
SOURCE_QSTR = SOURCE_MOD + SOURCE_MICROPYTHON + SOURCE_MICROPYTHON_SPEED
|
||||
|
||||
# TODO: recursive Glob
|
||||
SOURCE_PY_DIR = 'src/'
|
||||
SOURCE_PY = Glob(SOURCE_PY_DIR + '*.py')
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*/*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR+'*/*/*/*/*.py'))
|
||||
|
||||
env = Environment(ENV=os.environ, CFLAGS='%s -DPRODUCTION=%s -DPYOPT=%s' % (ARGUMENTS.get('CFLAGS', ''), ARGUMENTS.get('PRODUCTION', '0'), PYOPT))
|
||||
|
||||
env.Tool('micropython')
|
||||
@ -385,6 +377,18 @@ env.Ignore(qstr_collected, qstr_generated)
|
||||
# Frozen modules
|
||||
#
|
||||
|
||||
if env.get('TREZOR_MODEL') == '1':
|
||||
SOURCE_PY_DIR = 'src1/'
|
||||
else:
|
||||
SOURCE_PY_DIR = 'src/'
|
||||
|
||||
# TODO: recursive Glob
|
||||
SOURCE_PY = Glob(SOURCE_PY_DIR + '*.py')
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + '*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + '*/*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + '*/*/*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + '*/*/*/*/*.py'))
|
||||
|
||||
source_mpy = env.FrozenModule(source=SOURCE_PY, source_dir=SOURCE_PY_DIR)
|
||||
|
||||
source_mpyc = env.FrozenCFile(
|
||||
|
18
src1/main.py
Normal file
18
src1/main.py
Normal file
@ -0,0 +1,18 @@
|
||||
import trezorio as io
|
||||
from trezorui import Display
|
||||
|
||||
d = Display()
|
||||
|
||||
d.clear()
|
||||
d.backlight(255)
|
||||
|
||||
i = 0
|
||||
|
||||
while True:
|
||||
d.print('Loop %d\n' % i)
|
||||
i += 1
|
||||
r = [0, 0]
|
||||
if io.poll([io.TOUCH], r, 1000000):
|
||||
print('TOUCH', r)
|
||||
else:
|
||||
print('NOTOUCH')
|
Loading…
Reference in New Issue
Block a user