mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-17 19:00:58 +00:00
build(core): fix build for Rust unit tests on T3T1
This commit is contained in:
parent
67ac4078f7
commit
e62f0b507a
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
.PHONY: vendor
|
.PHONY: vendor
|
||||||
|
|
||||||
# get the number of CPU cores in a "portable" manner
|
# get the number of CPU cores in a "portable" manner
|
||||||
@ -61,6 +62,7 @@ else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T3T1))
|
|||||||
MCU = STM32U5
|
MCU = STM32U5
|
||||||
OPENOCD_TARGET = target/stm32u5x.cfg
|
OPENOCD_TARGET = target/stm32u5x.cfg
|
||||||
LAYOUT_FILE = embed/models/T3T1/model_T3T1.h
|
LAYOUT_FILE = embed/models/T3T1/model_T3T1.h
|
||||||
|
MODEL_FEATURE = model_mercury
|
||||||
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),DISC1))
|
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),DISC1))
|
||||||
MCU = STM32F4
|
MCU = STM32F4
|
||||||
LAYOUT_FILE = embed/models/D001/model_D001.h
|
LAYOUT_FILE = embed/models/D001/model_D001.h
|
||||||
|
@ -44,21 +44,22 @@ usb = []
|
|||||||
optiga = []
|
optiga = []
|
||||||
translations = ["crypto"]
|
translations = ["crypto"]
|
||||||
test = [
|
test = [
|
||||||
|
"backlight",
|
||||||
"button",
|
"button",
|
||||||
"cc",
|
"cc",
|
||||||
"crypto",
|
"crypto",
|
||||||
|
"dma2d",
|
||||||
"debug",
|
"debug",
|
||||||
"glob",
|
"glob",
|
||||||
"micropython",
|
"micropython",
|
||||||
|
"new_rendering",
|
||||||
|
"optiga",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
|
"touch",
|
||||||
|
"translations",
|
||||||
"ui",
|
"ui",
|
||||||
"ui_jpeg_decoder",
|
"ui_jpeg_decoder",
|
||||||
"ui_blurring",
|
"ui_blurring",
|
||||||
"dma2d",
|
|
||||||
"touch",
|
|
||||||
"backlight",
|
|
||||||
"optiga",
|
|
||||||
"translations",
|
|
||||||
"universal_fw",
|
"universal_fw",
|
||||||
]
|
]
|
||||||
universal_fw = []
|
universal_fw = []
|
||||||
|
@ -52,11 +52,23 @@ const DEFAULT_BINDGEN_MACROS_T2B1: &[&str] = &[
|
|||||||
#[cfg(not(feature = "model_tr"))]
|
#[cfg(not(feature = "model_tr"))]
|
||||||
const DEFAULT_BINDGEN_MACROS_T2B1: &[&str] = &[];
|
const DEFAULT_BINDGEN_MACROS_T2B1: &[&str] = &[];
|
||||||
|
|
||||||
|
#[cfg(feature = "model_mercury")]
|
||||||
|
const DEFAULT_BINDGEN_MACROS_T3T1: &[&str] = &[
|
||||||
|
"-DSTM32U5",
|
||||||
|
"-DTREZOR_MODEL_T3T1",
|
||||||
|
"-DFLASH_BIT_ACCESS=0",
|
||||||
|
"-DFLASH_BLOCK_WORDS=4",
|
||||||
|
"-DTREZOR_BOARD=\"T3T1/boards/t3t1-unix.h\"",
|
||||||
|
];
|
||||||
|
#[cfg(not(feature = "model_mercury"))]
|
||||||
|
const DEFAULT_BINDGEN_MACROS_T3T1: &[&str] = &[];
|
||||||
|
|
||||||
fn add_bindgen_macros<'a>(clang_args: &mut Vec<&'a str>, envvar: Option<&'a str>) {
|
fn add_bindgen_macros<'a>(clang_args: &mut Vec<&'a str>, envvar: Option<&'a str>) {
|
||||||
let default_macros = DEFAULT_BINDGEN_MACROS_COMMON
|
let default_macros = DEFAULT_BINDGEN_MACROS_COMMON
|
||||||
.iter()
|
.iter()
|
||||||
.chain(DEFAULT_BINDGEN_MACROS_T2T1)
|
.chain(DEFAULT_BINDGEN_MACROS_T2T1)
|
||||||
.chain(DEFAULT_BINDGEN_MACROS_T2B1);
|
.chain(DEFAULT_BINDGEN_MACROS_T2B1)
|
||||||
|
.chain(DEFAULT_BINDGEN_MACROS_T3T1);
|
||||||
|
|
||||||
match envvar {
|
match envvar {
|
||||||
Some(envvar) => clang_args.extend(envvar.split(',')),
|
Some(envvar) => clang_args.extend(envvar.split(',')),
|
||||||
|
Loading…
Reference in New Issue
Block a user