mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-09 17:48:47 +00:00
refactor(core): move files out of extmod
[no changelog]
This commit is contained in:
parent
7a3ab389f8
commit
6ea68baf34
@ -53,10 +53,10 @@ CPPPATH_MOD += [
|
|||||||
'vendor/micropython/lib/uzlib',
|
'vendor/micropython/lib/uzlib',
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
SOURCE_STMHAL = [
|
SOURCE_STMHAL = [
|
||||||
@ -141,6 +141,7 @@ env.Replace(
|
|||||||
LINKFLAGS='-T embed/boardloader/memory.ld -Wl,--gc-sections -Wl,-Map=build/boardloader/boardloader.map -Wl,--warn-common -Wl,--print-memory-usage',
|
LINKFLAGS='-T embed/boardloader/memory.ld -Wl,--gc-sections -Wl,-Map=build/boardloader/boardloader.map -Wl,--warn-common -Wl,--print-memory-usage',
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
'embed/boardloader',
|
'embed/boardloader',
|
||||||
|
'embed/lib',
|
||||||
'embed/trezorhal',
|
'embed/trezorhal',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython/stmhal',
|
'vendor/micropython/stmhal',
|
||||||
|
@ -75,11 +75,11 @@ CPPPATH_MOD += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/buffers.c',
|
'embed/lib/buffers.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
'embed/extmod/modtrezorcrypto/rand.c',
|
'embed/extmod/modtrezorcrypto/rand.c',
|
||||||
'vendor/micropython/lib/uzlib/adler32.c',
|
'vendor/micropython/lib/uzlib/adler32.c',
|
||||||
'vendor/micropython/lib/uzlib/crc32.c',
|
'vendor/micropython/lib/uzlib/crc32.c',
|
||||||
@ -204,6 +204,7 @@ env.Replace(
|
|||||||
'embed/bootloader',
|
'embed/bootloader',
|
||||||
'embed/bootloader/nanopb',
|
'embed/bootloader/nanopb',
|
||||||
'embed/bootloader/protob',
|
'embed/bootloader/protob',
|
||||||
|
'embed/lib',
|
||||||
'embed/trezorhal',
|
'embed/trezorhal',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
||||||
|
@ -67,10 +67,10 @@ CPPPATH_MOD += [
|
|||||||
'vendor/micropython/lib/uzlib',
|
'vendor/micropython/lib/uzlib',
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
'embed/extmod/modtrezorcrypto/rand.c',
|
'embed/extmod/modtrezorcrypto/rand.c',
|
||||||
'vendor/micropython/lib/uzlib/adler32.c',
|
'vendor/micropython/lib/uzlib/adler32.c',
|
||||||
'vendor/micropython/lib/uzlib/crc32.c',
|
'vendor/micropython/lib/uzlib/crc32.c',
|
||||||
@ -181,6 +181,7 @@ env.Replace(
|
|||||||
'embed/bootloader_ci',
|
'embed/bootloader_ci',
|
||||||
'embed/bootloader_ci/nanopb',
|
'embed/bootloader_ci/nanopb',
|
||||||
'embed/bootloader_ci/protob',
|
'embed/bootloader_ci/protob',
|
||||||
|
'embed/lib',
|
||||||
'embed/trezorhal',
|
'embed/trezorhal',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
||||||
|
@ -177,11 +177,11 @@ CPPPATH_MOD += [
|
|||||||
'vendor/micropython/lib/uzlib',
|
'vendor/micropython/lib/uzlib',
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/buffers.c',
|
'embed/lib/buffers.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
'embed/extmod/modtrezorui/modtrezorui.c',
|
'embed/extmod/modtrezorui/modtrezorui.c',
|
||||||
'vendor/micropython/lib/uzlib/adler32.c',
|
'vendor/micropython/lib/uzlib/adler32.c',
|
||||||
'vendor/micropython/lib/uzlib/crc32.c',
|
'vendor/micropython/lib/uzlib/crc32.c',
|
||||||
@ -479,6 +479,7 @@ env.Replace(
|
|||||||
'.',
|
'.',
|
||||||
'embed/rust',
|
'embed/rust',
|
||||||
'embed/firmware',
|
'embed/firmware',
|
||||||
|
'embed/lib',
|
||||||
'embed/trezorhal',
|
'embed/trezorhal',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython',
|
'vendor/micropython',
|
||||||
|
@ -44,11 +44,11 @@ CPPPATH_MOD += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
'embed/extmod/modtrezorui/qr-code-generator/qrcodegen.c',
|
'embed/lib/qr-code-generator/qrcodegen.c',
|
||||||
'vendor/micropython/lib/uzlib/adler32.c',
|
'vendor/micropython/lib/uzlib/adler32.c',
|
||||||
'vendor/micropython/lib/uzlib/crc32.c',
|
'vendor/micropython/lib/uzlib/crc32.c',
|
||||||
'vendor/micropython/lib/uzlib/tinflate.c',
|
'vendor/micropython/lib/uzlib/tinflate.c',
|
||||||
@ -150,6 +150,7 @@ env.Replace(
|
|||||||
LINKFLAGS='-T embed/prodtest/memory.ld -Wl,--gc-sections -Wl,-Map=build/prodtest/prodtest.map -Wl,--warn-common',
|
LINKFLAGS='-T embed/prodtest/memory.ld -Wl,--gc-sections -Wl,-Map=build/prodtest/prodtest.map -Wl,--warn-common',
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
'embed/prodtest',
|
'embed/prodtest',
|
||||||
|
'embed/lib',
|
||||||
'embed/trezorhal',
|
'embed/trezorhal',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
||||||
|
@ -37,10 +37,10 @@ CPPPATH_MOD += [
|
|||||||
'vendor/micropython/lib/uzlib',
|
'vendor/micropython/lib/uzlib',
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
'vendor/micropython/lib/uzlib/adler32.c',
|
'vendor/micropython/lib/uzlib/adler32.c',
|
||||||
'vendor/micropython/lib/uzlib/crc32.c',
|
'vendor/micropython/lib/uzlib/crc32.c',
|
||||||
'vendor/micropython/lib/uzlib/tinflate.c',
|
'vendor/micropython/lib/uzlib/tinflate.c',
|
||||||
@ -141,6 +141,7 @@ env.Replace(
|
|||||||
LINKFLAGS='-T embed/reflash/memory.ld -Wl,--gc-sections -Wl,-Map=build/reflash/reflash.map -Wl,--warn-common',
|
LINKFLAGS='-T embed/reflash/memory.ld -Wl,--gc-sections -Wl,-Map=build/reflash/reflash.map -Wl,--warn-common',
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
'embed/reflash',
|
'embed/reflash',
|
||||||
|
'embed/lib',
|
||||||
'embed/trezorhal',
|
'embed/trezorhal',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
'vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc',
|
||||||
|
@ -170,11 +170,11 @@ CPPPATH_MOD += [
|
|||||||
'vendor/micropython/lib/uzlib',
|
'vendor/micropython/lib/uzlib',
|
||||||
]
|
]
|
||||||
SOURCE_MOD += [
|
SOURCE_MOD += [
|
||||||
'embed/extmod/modtrezorui/buffers.c',
|
'embed/lib/buffers.c',
|
||||||
'embed/extmod/modtrezorui/colors.c',
|
'embed/lib/colors.c',
|
||||||
'embed/extmod/modtrezorui/display.c',
|
'embed/lib/display.c',
|
||||||
'embed/extmod/modtrezorui/fonts/fonts.c',
|
'embed/lib/fonts/fonts.c',
|
||||||
'embed/extmod/modtrezorui/fonts/font_bitmap.c',
|
'embed/lib/fonts/font_bitmap.c',
|
||||||
'embed/extmod/modtrezorui/modtrezorui.c',
|
'embed/extmod/modtrezorui/modtrezorui.c',
|
||||||
'vendor/micropython/lib/uzlib/adler32.c',
|
'vendor/micropython/lib/uzlib/adler32.c',
|
||||||
'vendor/micropython/lib/uzlib/crc32.c',
|
'vendor/micropython/lib/uzlib/crc32.c',
|
||||||
@ -442,6 +442,7 @@ env.Replace(
|
|||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
'.',
|
'.',
|
||||||
'embed/rust',
|
'embed/rust',
|
||||||
|
'embed/lib',
|
||||||
'embed/unix',
|
'embed/unix',
|
||||||
'embed/extmod/modtrezorui',
|
'embed/extmod/modtrezorui',
|
||||||
'vendor/micropython',
|
'vendor/micropython',
|
||||||
|
@ -75,7 +75,7 @@ fn prepare_bindings() -> bindgen::Builder {
|
|||||||
"-I../../../storage",
|
"-I../../../storage",
|
||||||
"-I../../vendor/micropython",
|
"-I../../vendor/micropython",
|
||||||
"-I../../vendor/micropython/lib/uzlib",
|
"-I../../vendor/micropython/lib/uzlib",
|
||||||
"-I../extmod/modtrezorui", // for display.h
|
"-I../lib",
|
||||||
format!("-DTREZOR_MODEL_{}", model()).as_str(),
|
format!("-DTREZOR_MODEL_{}", model()).as_str(),
|
||||||
format!("-DTREZOR_BOARD=\"{}\"", board()).as_str(),
|
format!("-DTREZOR_BOARD=\"{}\"", board()).as_str(),
|
||||||
]);
|
]);
|
||||||
|
@ -15,7 +15,7 @@ def add_font(font_name, font, defines, sources):
|
|||||||
'TREZOR_FONT_' + font_name + '_ENABLE=' + font,
|
'TREZOR_FONT_' + font_name + '_ENABLE=' + font,
|
||||||
'TREZOR_FONT_' + font_name + '_INCLUDE=\\"' + font.lower() + '.h\\"',
|
'TREZOR_FONT_' + font_name + '_INCLUDE=\\"' + font.lower() + '.h\\"',
|
||||||
]
|
]
|
||||||
sourcefile = 'embed/extmod/modtrezorui/fonts/' + font.lower() + '.c'
|
sourcefile = 'embed/lib/fonts/' + font.lower() + '.c'
|
||||||
if sourcefile not in sources:
|
if sourcefile not in sources:
|
||||||
sources.append(sourcefile)
|
sources.append(sourcefile)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user