Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate OPTIGA Trust M #3186

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/SConscript.firmware
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FEATURE_FLAGS = {
"SYSTEM_VIEW": False,
}

FEATURES_WANTED = ["input", "sbu", "sd_card", "rgb_led", "dma2d", "consumption_mask", "usb"]
FEATURES_WANTED = ["input", "sbu", "sd_card", "rgb_led", "dma2d", "consumption_mask", "usb" ,"optiga"]

CCFLAGS_MOD = ''
CPPPATH_MOD = []
Expand Down
9 changes: 9 additions & 0 deletions core/embed/firmware/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
#include "mpu.h"
#include "random_delays.h"

#include TREZOR_BOARD

#ifdef USE_RGB_LED
#include "rgb_led.h"
#endif
Expand All @@ -68,6 +70,9 @@
#ifdef USE_SD_CARD
#include "sdcard.h"
#endif
#ifdef USE_OPTIGA
#include "optiga_transport.h"
#endif
#include "unit_variant.h"

#ifdef SYSTEM_VIEW
Expand Down Expand Up @@ -155,6 +160,10 @@ int main(void) {
sdcard_init();
#endif

#ifdef USE_OPTIGA
optiga_init();
#endif

#if !defined TREZOR_MODEL_1
// jump to unprivileged mode
// http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/CHDBIBGJ.html
Expand Down
3 changes: 3 additions & 0 deletions core/embed/trezorhal/boards/trezor_r_v10.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define USE_SBU 1
#define USE_I2C 1
#define USE_CONSUMPTION_MASK 1
#define USE_OPTIGA 1

#include "displays/vg-2864ksweg01.h"

Expand Down Expand Up @@ -48,4 +49,6 @@
#define I2C_INSTANCE_1_SCL_CLK_EN __HAL_RCC_GPIOB_CLK_ENABLE
#define I2C_INSTANCE_1_RESET_FLG RCC_APB1RSTR_I2C2RST

#define OPTIGA_I2C_INSTANCE 0

#endif //_TREZOR_R_V10_H
Loading