diff --git a/core/SConscript.bootloader_emu b/core/SConscript.bootloader_emu index af36760f74..37fcd39f8c 100644 --- a/core/SConscript.bootloader_emu +++ b/core/SConscript.bootloader_emu @@ -131,9 +131,6 @@ SOURCE_TREZORHAL = [ ] if TREZOR_MODEL in ('R', ): - CPPDEFINES_MOD += [ - ('USE_OPTIGA', '1'), - ] SOURCE_TREZORHAL += [ 'embed/trezorhal/unix/secret.c', 'embed/trezorhal/unix/optiga_hal.c', diff --git a/core/SConscript.unix b/core/SConscript.unix index 0ee5bf3f9d..7be0f694dd 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -390,9 +390,6 @@ if TREZOR_MODEL in ('T', 'R'): ] if TREZOR_MODEL == 'R': - CPPDEFINES_MOD += [ - ('USE_OPTIGA', '1'), - ] SOURCE_UNIX += [ 'embed/trezorhal/unix/optiga.c', ] diff --git a/core/embed/bootloader/emulator.c b/core/embed/bootloader/emulator.c index 952fde585c..0a82e800d8 100644 --- a/core/embed/bootloader/emulator.c +++ b/core/embed/bootloader/emulator.c @@ -1,6 +1,7 @@ #include #include +#include TREZOR_BOARD #include "bootui.h" #include "common.h" #include "display.h" diff --git a/core/embed/extmod/modtrezorconfig/norcow_config.h b/core/embed/extmod/modtrezorconfig/norcow_config.h index 5104f10235..65cebdcf07 100644 --- a/core/embed/extmod/modtrezorconfig/norcow_config.h +++ b/core/embed/extmod/modtrezorconfig/norcow_config.h @@ -20,6 +20,7 @@ #ifndef __NORCOW_CONFIG_H__ #define __NORCOW_CONFIG_H__ +#include TREZOR_BOARD #include "flash.h" #include "model.h" diff --git a/core/embed/extmod/modtrezorcrypto/modtrezorcrypto.c b/core/embed/extmod/modtrezorcrypto/modtrezorcrypto.c index 78357644b5..f89b708c0f 100644 --- a/core/embed/extmod/modtrezorcrypto/modtrezorcrypto.c +++ b/core/embed/extmod/modtrezorcrypto/modtrezorcrypto.c @@ -25,6 +25,8 @@ #include "py/runtime.h" +#include TREZOR_BOARD + #if MICROPY_PY_TREZORCRYPTO static mp_obj_t ui_wait_callback = mp_const_none; diff --git a/core/embed/trezorhal/boards/board-unix.h b/core/embed/trezorhal/boards/board-unix.h index 99fa6b8aee..ec16dd4ad5 100644 --- a/core/embed/trezorhal/boards/board-unix.h +++ b/core/embed/trezorhal/boards/board-unix.h @@ -16,6 +16,7 @@ #ifdef TREZOR_MODEL_R #define USE_BUTTON 1 #define USE_SBU 1 +#define USE_OPTIGA 1 #endif #include "display-unix.h"