1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

tools: move code generating tools to tools/codegen

This commit is contained in:
Pavol Rusnak 2017-10-01 19:52:43 +02:00
parent 98bdd99b97
commit da8cc37a54
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 11 additions and 2 deletions

View File

@ -14,7 +14,7 @@ fields = [
'segwit',
]
coins = json.load(open('../../trezor-common/coins.json', 'r'))
coins = json.load(open('../../../trezor-common/coins.json', 'r'))
print('COINS = [')
for c in coins:

View File

@ -1,4 +1,8 @@
#!/usr/bin/env python3
# script used to generate /embed/extmod/modtrezorui/font_*_*.c
import freetype
MIN_GLYPH = ord(' ')

View File

@ -3,9 +3,11 @@
import binascii
import ed25519raw
def hex_to_c(s):
return '"\\x' + '\\x'.join([s[i:i + 2] for i in range(0, len(s), 2)]) + '"'
for c in 'ABCDEFGHI':
print()
seckey = c.encode() * 32

View File

@ -1,4 +1,7 @@
#!/usr/bin/python3
# script used to generate /embed/extmod/modtrezorui/loader.h
import math
import sys
@ -15,7 +18,7 @@ with open('loader.h', 'wt') as f:
c = {}
for i in [5, 15]:
if (inner - 0.5 <= d) and (d <= inner + 0.5):
c[i] = 15 * (d - inner + 0.5);
c[i] = 15 * (d - inner + 0.5)
elif (inner + 0.5 <= d) and (d <= inner + 1.5):
c[i] = 15
elif (inner + 1.5 <= d) and (d <= inner + 2.5):