chore(core): reorganize Cargo.toml feature sections
What changed, and why it matters
This commit is a housekeeping change that reorganizes the feature sections inside 14 Cargo.toml build configuration files. It reorders, renames, and groups feature flags (such as MCU selection, privilege mode, build options, and selectable components) without changing the actual feature names, their meanings, or the underlying source code. There is no indication this affects device behavior or security.
No security action required. Treat as normal build-system maintenance. If desired, verify that the resulting feature sets are equivalent by comparing the resolved Cargo feature graphs before and after the change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch is a pure refactor of Cargo.toml files in core/embed. It changes comments, section headers, and the order of feature definitions. A few dependency lists are alphabetized, and some features are moved between sections (e.g., moving default/derived features to the bottom, adding ‘MCU selection’ and ‘Layout selection’ headings). No feature values, dependency versions, or source code are modified. The commit message is ‘chore(core): reorganize Cargo.toml feature sections’ and explicitly includes ‘[no changelog]’.
Changed components
core/embed/io/Cargo.tomlcore/embed/models/Cargo.tomlcore/embed/projects/boardloader/Cargo.tomlcore/embed/projects/bootloader/Cargo.tomlcore/embed/projects/bootloader_ci/Cargo.tomlcore/embed/projects/firmware/Cargo.tomlcore/embed/projects/kernel/Cargo.tomlcore/embed/projects/prodtest/Cargo.tomlcore/embed/projects/secmon/Cargo.tomlcore/embed/projects/unix/Cargo.tomlcore/embed/rtl/Cargo.tomlcore/embed/sec/Cargo.tomlcore/embed/sys/Cargo.tomlcore/embed/upymod/Cargo.tomlInspect captured patch +428 / −336
diff --git a/core/embed/io/Cargo.toml b/core/embed/io/Cargo.toml
index 8eac808f..c739f4d4 100644
--- a/core/embed/io/Cargo.toml
+++ b/core/embed/io/Cargo.toml
@@ -4,7 +4,6 @@ version = "0.0.0"
edition = "2024"
links = "io"
-
[build-dependencies]
color-eyre.workspace = true
xbuild.workspace = true
@@ -17,7 +16,7 @@ sys.workspace = true
[features]
# --------------------------------------------------------------------------
-# MCU features
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
mcu_stm32f427 = ["sec/mcu_stm32f427", "mcu_stm32f4"]
@@ -27,7 +26,7 @@ mcu_stm32u5g = ["sec/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["sec/mcu_stm32u5a", "mcu_stm32u5"]
# --------------------------------------------------------------------------
-# Privilege mode features
+# Privilege mode
# --------------------------------------------------------------------------
kernel_mode = ["sec/kernel_mode"]
@@ -46,17 +45,16 @@ dma2d = []
emulator = ["sec/emulator"]
fancy_fatal_error = []
haptic = ["sys/i2c_bus"]
+hw_jpeg_decoder = []
ipc = ["sys/ipc"]
+lockable_bootloader = ["sec/lockable_bootloader"]
nfc = []
nrf = []
nrf_auth = ["sec/nrf_auth"]
-hw_jpeg_decoder = []
-lockable_bootloader = ["sec/lockable_bootloader"]
pmic = []
pmic_npm1300 = ["pmic", "sys/i2c_bus"]
power_manager = []
power_manager_npm1300 = ["pmic_npm1300"]
-wireless_stwlc38 = ["sys/i2c_bus"]
production = ["sec/production"]
raspi_emulator = []
rgb_led = []
@@ -70,27 +68,12 @@ usb_iface_debug = ["usb"]
usb_iface_vcp = ["usb"]
usb_iface_webauthn = ["usb"]
usb_iface_wire = ["usb"]
-
-test = [
- "mcu_stm32u5g",
- "models/model_t3w1",
- "emulator",
- "kernel_mode",
- "secure_mode",
- "sec/secret",
-]
+wireless_stwlc38 = ["sys/i2c_bus"]
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# Driver implementation options
# --------------------------------------------------------------------------
-mcu_stm32u5 = ["mcu_stm32"]
-mcu_stm32f4 = ["mcu_stm32"]
-mcu_stm32 = []
-usb = []
-
-# Features for selecting driver implementations
-
backlight_tps61043 = []
backlight_tps61062 = []
backlight_pin = []
@@ -108,8 +91,6 @@ touch_panel_t2t1 = []
touch_panel_lx154a2422cpt23 = []
touch_panel_lx250a2410a = []
-framebuffer = []
-
# Drivers below that always need framebuffer pull it in implicitly,
# so any project selecting them via the board peripheral chain doesn't have
# to also advertise `framebuffer` in its project.toml. display_st7789 supports
@@ -128,3 +109,26 @@ display_panel_lx154a2482 = []
display_panel_dem240320b1 = []
display_panel_vg2864 = []
+# --------------------------------------------------------------------------
+# Unit test configuration
+# --------------------------------------------------------------------------
+
+test = [
+ "mcu_stm32u5g",
+ "models/model_t3w1",
+ "emulator",
+ "kernel_mode",
+ "secure_mode",
+ "sec/secret",
+]
+
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
+
+mcu_stm32u5 = ["mcu_stm32"]
+mcu_stm32f4 = ["mcu_stm32"]
+mcu_stm32 = []
+
+framebuffer = []
+usb = []
diff --git a/core/embed/models/Cargo.toml b/core/embed/models/Cargo.toml
index 4be1d5b6..32f87d96 100644
--- a/core/embed/models/Cargo.toml
+++ b/core/embed/models/Cargo.toml
@@ -28,7 +28,7 @@ model_t3t2 = []
model_t3w1 = []
# --------------------------------------------------------------------------
-# MCU features
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
mcu_stm32f427 = ["mcu_stm32f4"]
@@ -38,7 +38,7 @@ mcu_stm32u5g = ["mcu_stm32u5"]
mcu_stm32u5a = ["mcu_stm32u5"]
# --------------------------------------------------------------------------
-# Privilege mode features
+# Privilege mode
# --------------------------------------------------------------------------
kernel_mode = []
@@ -46,7 +46,7 @@ secure_mode = []
secmon_layout = []
# --------------------------------------------------------------------------
-# Executable type featurs (for legacy C definitions)
+# Executable type features (for legacy C definitions)
# --------------------------------------------------------------------------
boardloader = []
@@ -56,13 +56,17 @@ kernel = []
prodtest = []
# --------------------------------------------------------------------------
-# Selectable features
+# Selectable components
# --------------------------------------------------------------------------
asan = []
emulator = []
production = []
+# --------------------------------------------------------------------------
+# Unit test configuration
+# --------------------------------------------------------------------------
+
test = [
"emulator",
"mcu_stm32u5g",
@@ -76,6 +80,3 @@ test = [
mcu_stm32f4 = ["mcu_stm32"]
mcu_stm32u5 = ["mcu_stm32"]
mcu_stm32 = []
-
-
-
diff --git a/core/embed/projects/boardloader/Cargo.toml b/core/embed/projects/boardloader/Cargo.toml
index 2410f370..99feaae7 100644
--- a/core/embed/projects/boardloader/Cargo.toml
+++ b/core/embed/projects/boardloader/Cargo.toml
@@ -14,19 +14,18 @@ bench = false
color-eyre.workspace = true
xbuild.workspace = true
-
[dependencies]
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
bootloader_devel = ["sec/bootloader_devel"]
@@ -37,35 +36,29 @@ dbg_console_system_view = ["dbg_console", "sys/system_view"]
production = ["io/production"]
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "io/display",
- "io/kernel_mode",
- "io/secure_mode",
- "models/boardloader",
- "crypto/ed25519_no_precomp",
- ]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = []
mcu_stm32u58 = ["io/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
backlight = ["io/backlight"]
boot_ucb = ["sec/boot_ucb"]
-display = ["io/display"]
-framebuffer = ["io/framebuffer"]
-power_manager = ["pmic"]
dbg_console = ["sys/dbg_console"]
+display = ["io/display"]
dma2d = ["io/dma2d"]
+framebuffer = ["io/framebuffer"]
hash_processor = ["sec/hash_processor"]
lockable_bootloader = ["io/lockable_bootloader"]
pmic = ["io/pmic"]
+power_manager = ["pmic"]
pvd = ["sys/pvd"]
sd_card = ["sd_card_update"]
sd_card_update = ["io/sd_card"]
@@ -74,3 +67,17 @@ secret = ["sec/secret"]
secure_aes = ["sec/secure_aes"]
tamper = ["sec/tamper"]
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
+
+default = [
+ "io/display",
+ "io/kernel_mode",
+ "io/secure_mode",
+ "models/boardloader",
+ "crypto/ed25519_no_precomp",
+ ]
+
+mcu_stm32f4 = []
+mcu_stm32u5 = ["sec/trustzone"]
diff --git a/core/embed/projects/bootloader/Cargo.toml b/core/embed/projects/bootloader/Cargo.toml
index 2da57e79..2cce41b8 100644
--- a/core/embed/projects/bootloader/Cargo.toml
+++ b/core/embed/projects/bootloader/Cargo.toml
@@ -9,68 +9,64 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
-trezor_lib.workspace = true
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
+trezor_lib.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
bootloader_devel = ["sec/bootloader_devel"]
-emulator = ["io/emulator"]
clippy = ["trezor_lib/clippy"]
dbg_console_swo = ["dbg_console", "sys/dbg_console_swo"]
-dbg_console_vcp = ["dbg_console", "sys/dbg_console_vcp", "io/usb_iface_vcp"]
dbg_console_system_view = ["dbg_console", "sys/dbg_console_system_view"]
+dbg_console_vcp = ["dbg_console", "sys/dbg_console_vcp", "io/usb_iface_vcp"]
debug = ["trezor_lib/debug"]
debuglink = ["trezor_lib/debuglink", "io/usb_iface_debug"]
disable_animation = []
+emulator = ["io/emulator"]
production = ["io/production"]
ui_debug = ["trezor_lib/ui_debug"]
ui_debug_overlay = ["trezor_lib/ui_debug_overlay"]
ui_performance_overlay = ["trezor_lib/ui_performance_overlay"]
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "io/display",
- "io/fancy_fatal_error",
- "io/kernel_mode",
- "io/secure_mode",
- "io/usb_iface_wire",
- "models/bootloader",
- "crypto/ed25519_no_precomp",
-
- "trezor_lib/with_new_crates", # only for transitional period
-
- "trezor_lib/crypto",
- "trezor_lib/ui",
- "trezor_lib/bootloader",
- "trezor_lib/usb",
- ]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = []
mcu_stm32u58 = ["io/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone"]
+
+# --------------------------------------------------------------------------
+# Layout selection - only enable one of these at a time
+# --------------------------------------------------------------------------
+
+layout_bolt = ["trezor_lib/layout_bolt"]
+layout_caesar = ["trezor_lib/layout_caesar"]
+layout_delizia = ["trezor_lib/layout_delizia"]
+layout_eckhart = ["trezor_lib/layout_eckhart"]
+
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
backlight = ["io/backlight", "trezor_lib/backlight"]
backup_ram = ["sec/backup_ram"]
ble = ["io/ble", "trezor_lib/ble", "nrf", "nrf_auth"]
-nrf = ["io/nrf", "trezor_lib/nrf"]
-nrf_auth = ["io/nrf_auth"]
boot_ucb = ["sec/boot_ucb", "trezor_lib/boot_ucb"]
button = ["io/button", "trezor_lib/button"]
consumption_mask = ["sec/consumption_mask"]
@@ -83,6 +79,8 @@ hash_processor = ["sec/hash_processor"]
iwdg = ["sec/iwdg"]
lockable_bootloader = ["io/lockable_bootloader"]
mcu_attestation = ["sec/mcu_attestation"]
+nrf = ["io/nrf", "trezor_lib/nrf"]
+nrf_auth = ["io/nrf_auth"]
power_manager = ["io/power_manager", "trezor_lib/power_manager", "trezor_lib/pmic"]
pvd = ["sys/pvd"]
rgb_led = ["io/rgb_led", "trezor_lib/rgb_led"]
@@ -98,11 +96,26 @@ touch = ["io/touch", "trezor_lib/touch"]
touch_wakeup = ["io/touch_wakeup", "trezor_lib/touch_wakeup"]
ui_empty_lock = ["trezor_lib/ui_empty_lock"]
-display_mono = ["trezor_lib/display_mono"]
-display_rgb565 = ["trezor_lib/display_rgb565"]
-display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
-layout_bolt = ["trezor_lib/layout_bolt"]
-layout_caesar = ["trezor_lib/layout_caesar"]
-layout_delizia = ["trezor_lib/layout_delizia"]
-layout_eckhart = ["trezor_lib/layout_eckhart"]
+default = [
+ "io/display",
+ "io/fancy_fatal_error",
+ "io/kernel_mode",
+ "io/secure_mode",
+ "io/usb_iface_wire",
+ "models/bootloader",
+ "crypto/ed25519_no_precomp",
+
+ "trezor_lib/with_new_crates", # only for transitional period
+
+ "trezor_lib/crypto",
+ "trezor_lib/ui",
+ "trezor_lib/bootloader",
+ "trezor_lib/usb",
+ ]
+
+mcu_stm32f4 = []
+mcu_stm32u5 = ["sec/trustzone"]
diff --git a/core/embed/projects/bootloader_ci/Cargo.toml b/core/embed/projects/bootloader_ci/Cargo.toml
index 3236ad02..440f23be 100644
--- a/core/embed/projects/bootloader_ci/Cargo.toml
+++ b/core/embed/projects/bootloader_ci/Cargo.toml
@@ -15,47 +15,40 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
bootloader_devel = ["sec/bootloader_devel"]
clippy = []
+dbg_console_swo = ["dbg_console", "sys/dbg_console_swo"]
+dbg_console_system_view = ["dbg_console", "sys/dbg_console_system_view"]
+dbg_console_vcp = ["dbg_console", "sys/dbg_console_vcp", "io/usb_iface_vcp"]
emulator = ["io/emulator"]
-dbg_console_swo = ["dbg_console"]
-dbg_console_vcp = ["dbg_console", "io/usb_iface_vcp"]
-dbg_console_system_view = ["dbg_console", "sys/system_view"]
production = ["io/production"]
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "io/display",
- "io/kernel_mode",
- "io/secure_mode",
- "io/usb_iface_wire",
- "models/bootloader",
- "crypto/ed25519_no_precomp",
-]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = ["io/mcu_stm32f4"]
mcu_stm32u58 = ["io/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
backlight = ["io/backlight"]
backup_ram = ["sec/backup_ram"]
@@ -74,10 +67,26 @@ power_manager = ["io/power_manager"]
pvd = ["sys/pvd"]
rgb_led = ["io/rgb_led"]
sdram = ["sys/sdram"]
-secret = ["sec/secret"]
secmon_verification = ["sec/secmon_verification"]
+secret = ["sec/secret"]
secure_aes = ["sec/secure_aes"]
suspend = ["io/suspend"]
tamper = ["sec/tamper"]
telemetry = ["sec/telemetry"]
touch = ["io/touch"]
+
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
+
+default = [
+ "io/display",
+ "io/kernel_mode",
+ "io/secure_mode",
+ "io/usb_iface_wire",
+ "models/bootloader",
+ "crypto/ed25519_no_precomp",
+]
+
+mcu_stm32f4 = ["io/mcu_stm32f4"]
+mcu_stm32u5 = ["sec/trustzone"]
diff --git a/core/embed/projects/firmware/Cargo.toml b/core/embed/projects/firmware/Cargo.toml
index 875fa986..4d6deee5 100644
--- a/core/embed/projects/firmware/Cargo.toml
+++ b/core/embed/projects/firmware/Cargo.toml
@@ -9,24 +9,24 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
-trezor_lib.workspace = true
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
+trezor_lib.workspace = true
upymod.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
+benchmark = ["upymod/benchmark", "crypto/aes_gcm"]
block_on_vcp = ["sys/block_on_vcp"]
bootloader_devel = ["sec/bootloader_devel"]
-benchmark = ["upymod/benchmark", "crypto/aes_gcm"]
clippy = ["trezor_lib/clippy"]
dbg_console = ["sys/dbg_console", "trezor_lib/dbg_console"]
debug = ["trezor_lib/debug"]
@@ -35,10 +35,10 @@ dev_keys = ["trezor_lib/dev_keys"]
disable_animation = ["upymod/disable_animation"]
emulator = ["io/emulator", "upymod/emulator"]
force_bootloader_upgrade = []
-micropy_enable_source_lines = ["upymod/enable_source_lines"]
-n4w1 = ["upymod/n4w1"]
frozen = ["upymod/frozen"]
log_stack_usage = ["upymod/log_stack_usage"]
+micropy_enable_source_lines = ["upymod/enable_source_lines"]
+n4w1 = ["upymod/n4w1"]
optiga_testing = ["sec/optiga_testing"]
production = ["io/production"]
pyopt = ["upymod/pyopt"]
@@ -50,35 +50,60 @@ universal_fw = ["trezor_lib/universal_fw", "upymod/universal_fw"]
unsafe_fw = []
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "io/display",
- "io/fancy_fatal_error",
- "io/usb_iface_wire",
- "crypto/secp256k1_zkp",
-
- "trezor_lib/with_new_crates", # only for transitional period
- "trezor_lib/with_upymod", # only for transitional period
-
- "trezor_lib/crypto",
- "trezor_lib/micropython",
- "trezor_lib/protobuf",
- "trezor_lib/ui",
- "trezor_lib/storage",
- "trezor_lib/translations",
- "trezor_lib/usb",
-]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "upymod/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "upymod/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = ["mcu_stm32"]
mcu_stm32u58 = ["io/mcu_stm32u58", "upymod/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "upymod/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "upymod/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone", "mcu_stm32"]
-mcu_stm32 = []
+
+# --------------------------------------------------------------------------
+# Layout selection - only enable one of these at a time
+# --------------------------------------------------------------------------
+
+layout_bolt = [
+ "trezor_lib/layout_bolt",
+ "upymod/layout_bolt",
+ "trezor_lib/ui_blurring",
+ "trezor_lib/ui_jpeg",
+]
+
+layout_caesar = [
+ "trezor_lib/layout_caesar",
+ "upymod/layout_caesar",
+]
+
+layout_delizia = [
+ "trezor_lib/layout_delizia",
+ "upymod/layout_delizia",
+ "trezor_lib/ui_blurring",
+ "trezor_lib/ui_image_buffer",
+ "trezor_lib/ui_overlay",
+ "trezor_lib/ui_jpeg",
+ "trezor_lib/ui_font_kerning",
+]
+
+layout_eckhart = [
+ "trezor_lib/layout_eckhart",
+ "upymod/layout_eckhart",
+ "trezor_lib/ui_blurring",
+ "trezor_lib/ui_image_buffer",
+ "trezor_lib/ui_overlay",
+ "trezor_lib/ui_jpeg",
+ "trezor_lib/ui_font_kerning",
+ "trezor_lib/hw_jpeg_decoder",
+ "io/hw_jpeg_decoder",
+]
+
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
app_loading = ["upymod/app_loading", "trezor_lib/app_loading", "io/ipc"]
backlight = ["io/backlight", "upymod/backlight", "trezor_lib/backlight"]
@@ -111,9 +136,9 @@ secret = ["sec/secret"]
secure_aes = ["sec/secure_aes"]
serial_number = ["upymod/serial_number", "trezor_lib/serial_number"]
suspend = ["io/suspend"]
-thp = ["upymod/thp", "crypto/aes_gcm", "trezor_lib/thp"]
tamper = ["sec/tamper"]
telemetry = ["sec/telemetry", "upymod/telemetry", "trezor_lib/telemetry"]
+thp = ["upymod/thp", "crypto/aes_gcm", "trezor_lib/thp"]
touch = ["io/touch", "upymod/touch", "trezor_lib/touch"]
touch_wakeup = ["io/touch_wakeup", "upymod/touch_wakeup", "trezor_lib/touch_wakeup"]
tropic = ["sec/tropic", "upymod/tropic", "trezor_lib/tropic"]
@@ -123,40 +148,28 @@ decred = ["upymod/decred"]
eos = ["crypto/eos", "upymod/eos"]
nem = ["crypto/nem", "upymod/nem"]
-display_mono = ["trezor_lib/display_mono"]
-display_rgb565 = ["trezor_lib/display_rgb565"]
-display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
-layout_bolt = [
- "trezor_lib/layout_bolt",
- "upymod/layout_bolt",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_jpeg",
-]
+default = [
+ "io/display",
+ "io/fancy_fatal_error",
+ "io/usb_iface_wire",
+ "crypto/secp256k1_zkp",
-layout_caesar = [
- "trezor_lib/layout_caesar",
- "upymod/layout_caesar",
-]
+ "trezor_lib/with_new_crates", # only for transitional period
+ "trezor_lib/with_upymod", # only for transitional period
-layout_delizia = [
- "trezor_lib/layout_delizia",
- "upymod/layout_delizia",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_image_buffer",
- "trezor_lib/ui_overlay",
- "trezor_lib/ui_jpeg",
- "trezor_lib/ui_font_kerning",
+ "trezor_lib/crypto",
+ "trezor_lib/micropython",
+ "trezor_lib/protobuf",
+ "trezor_lib/ui",
+ "trezor_lib/storage",
+ "trezor_lib/translations",
+ "trezor_lib/usb",
]
-layout_eckhart = [
- "trezor_lib/layout_eckhart",
- "upymod/layout_eckhart",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_image_buffer",
- "trezor_lib/ui_overlay",
- "trezor_lib/ui_jpeg",
- "trezor_lib/ui_font_kerning",
- "trezor_lib/hw_jpeg_decoder",
- "io/hw_jpeg_decoder",
-]
+mcu_stm32f4 = ["mcu_stm32"]
+mcu_stm32u5 = ["sec/trustzone", "mcu_stm32"]
+mcu_stm32 = []
diff --git a/core/embed/projects/kernel/Cargo.toml b/core/embed/projects/kernel/Cargo.toml
index 213badc6..620f4e81 100644
--- a/core/embed/projects/kernel/Cargo.toml
+++ b/core/embed/projects/kernel/Cargo.toml
@@ -9,18 +9,18 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
trezor_lib.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
app_loading = ["io/app_loading", "io/ipc"]
@@ -40,35 +40,23 @@ universal_fw = ["io/usb_iface_webauthn"]
unsafe_fw = []
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "sys/applets",
- "io/display",
- "io/kernel_mode",
- "io/usb_iface_wire",
- "sec/rdi",
- "sec/storage",
- "models/kernel",
- "crypto/aes_gcm",
- "trezor_lib/with_new_crates", # only for transitional period
- ]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = []
mcu_stm32u58 = ["io/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone"]
-secure_mode = ["io/secure_mode"]
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
backlight = ["io/backlight"]
backup_ram = ["sec/backup_ram"]
-boot_ucb = ["sec/boot_ucb"]
ble = ["io/ble", "nrf", "nrf_auth"]
+boot_ucb = ["sec/boot_ucb"]
button = ["io/button"]
consumption_mask = ["sec/consumption_mask"]
dbg_console = ["sys/dbg_console"]
@@ -92,6 +80,7 @@ sdram = ["sys/sdram"]
secmon_layout = ["models/secmon_layout"]
secret = ["sec/secret"]
secure_aes = ["sec/secure_aes"]
+secure_mode = ["io/secure_mode"]
smp = ["io/smp", "trezor_lib/smp", "trezor_lib/nrf"]
suspend = ["io/suspend"]
tamper = ["sec/tamper"]
@@ -99,3 +88,22 @@ telemetry = ["sec/telemetry"]
touch = ["io/touch"]
touch_wakeup = ["io/touch_wakeup"]
tropic = ["sec/tropic"]
+
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
+
+default = [
+ "sys/applets",
+ "io/display",
+ "io/kernel_mode",
+ "io/usb_iface_wire",
+ "sec/rdi",
+ "sec/storage",
+ "models/kernel",
+ "crypto/aes_gcm",
+ "trezor_lib/with_new_crates", # only for transitional period
+ ]
+
+mcu_stm32f4 = []
+mcu_stm32u5 = ["sec/trustzone"]
diff --git a/core/embed/projects/prodtest/Cargo.toml b/core/embed/projects/prodtest/Cargo.toml
index 02a1744e..d1a0f5a3 100644
--- a/core/embed/projects/prodtest/Cargo.toml
+++ b/core/embed/projects/prodtest/Cargo.toml
@@ -8,63 +8,59 @@ links = "prodtest"
xbuild.workspace = true
[dependencies]
-trezor_lib.workspace = true
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
+trezor_lib.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
bootloader_devel = ["sec/bootloader_devel"]
clippy = ["trezor_lib/clippy"]
-emulator = ["io/emulator"]
-dbg_console_swo = ["dbg_console"]
-dbg_console_system_view = ["dbg_console", "sys/system_view"]
+dbg_console_swo = ["dbg_console", "sys/dbg_console_swo"]
+dbg_console_system_view = ["dbg_console", "sys/dbg_console_system_view"]
debug = ["trezor_lib/debug"]
debuglink = ["trezor_lib/debuglink", "io/usb_iface_debug"]
+emulator = ["io/emulator"]
production = ["io/production"]
ui_debug = ["trezor_lib/ui_debug"]
ui_debug_overlay = ["trezor_lib/ui_debug_overlay"]
ui_performance_overlay = ["trezor_lib/ui_performance_overlay"]
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "io/display",
- # "io/fancy_fatal_error", # switched off in prodtest
- "io/kernel_mode",
- "io/secure_mode",
- "io/usb_iface_vcp",
- "models/prodtest",
- "rtl/sprintf",
- "crypto/aes_gcm",
- "crypto/mldsa",
- "crypto/noise",
-
- "trezor_lib/with_new_crates", # only for transitional period
-
- "trezor_lib/crypto",
- "trezor_lib/ui",
- "trezor_lib/prodtest",
- "trezor_lib/usb",
-]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = []
mcu_stm32u58 = ["io/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone"]
+
+# --------------------------------------------------------------------------
+# Layout selection - only enable one of these at a time
+# --------------------------------------------------------------------------
+
+layout_bolt = ["trezor_lib/layout_bolt"]
+layout_caesar = ["trezor_lib/layout_caesar"]
+# "trezor_lib/layout_delizia" is not implemented for prodtest; reuse bolt
+layout_delizia = ["trezor_lib/layout_bolt", "trezor_lib/ui_font_kerning"]
+layout_eckhart = ["trezor_lib/layout_eckhart", "trezor_lib/ui_font_kerning"]
+
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
backlight = ["io/backlight", "trezor_lib/backlight"]
backup_ram = ["sec/backup_ram"]
@@ -73,8 +69,8 @@ boot_ucb = ["sec/boot_ucb", "trezor_lib/boot_ucb"]
button = ["io/button", "trezor_lib/button"]
consumption_mask = ["sec/consumption_mask"]
dbg_console = ["sys/dbg_console", "trezor_lib/dbg_console"]
-dma2d = ["io/dma2d", "trezor_lib/dma2d"]
display = ["io/display"]
+dma2d = ["io/dma2d", "trezor_lib/dma2d"]
framebuffer = ["io/framebuffer", "trezor_lib/framebuffer"]
haptic = ["io/haptic", "trezor_lib/haptic"]
hash_processor = ["sec/hash_processor"]
@@ -98,8 +94,8 @@ power_manager = [
pvd = ["sys/pvd"]
rgb_led = ["io/rgb_led", "trezor_lib/rgb_led"]
rtc = ["sys/rtc"]
-sd_card = ["io/sd_card", "trezor_lib/sd_card"]
sbu = ["io/sbu", "trezor_lib/sbu"]
+sd_card = ["io/sd_card", "trezor_lib/sd_card"]
sdram = ["sys/sdram"]
secmon_header = []
secret = ["sec/secret"]
@@ -112,13 +108,29 @@ touch = ["io/touch", "trezor_lib/touch"]
touch_wakeup = ["io/touch_wakeup", "trezor_lib/touch_wakeup"]
tropic = ["sec/tropic", "trezor_lib/tropic"]
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
-display_mono = ["trezor_lib/display_mono"]
-display_rgb565 = ["trezor_lib/display_rgb565"]
-display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+default = [
+ "io/display",
+ # "io/fancy_fatal_error", # switched off in prodtest
+ "io/kernel_mode",
+ "io/secure_mode",
+ "io/usb_iface_vcp",
+ "models/prodtest",
+ "rtl/sprintf",
+ "crypto/aes_gcm",
+ "crypto/mldsa",
+ "crypto/noise",
-layout_bolt = ["trezor_lib/layout_bolt"]
-layout_caesar = ["trezor_lib/layout_caesar"]
-# "trezor_lib/layout_delizia" is not implemented for prodtest; reuse bolt
-layout_delizia = ["trezor_lib/layout_bolt", "trezor_lib/ui_font_kerning"]
-layout_eckhart = ["trezor_lib/layout_eckhart", "trezor_lib/ui_font_kerning"]
+ "trezor_lib/with_new_crates", # only for transitional period
+
+ "trezor_lib/crypto",
+ "trezor_lib/ui",
+ "trezor_lib/prodtest",
+ "trezor_lib/usb",
+]
+
+mcu_stm32f4 = []
+mcu_stm32u5 = ["sec/trustzone"]
diff --git a/core/embed/projects/secmon/Cargo.toml b/core/embed/projects/secmon/Cargo.toml
index 35264f9a..3bb1e927 100644
--- a/core/embed/projects/secmon/Cargo.toml
+++ b/core/embed/projects/secmon/Cargo.toml
@@ -15,16 +15,16 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
-sec.workspace = true
-sys.workspace = true
crypto.workspace = true
-rtl.workspace = true
models.workspace = true
+rtl.workspace = true
+sec.workspace = true
+sys.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
bootloader_devel = ["sec/bootloader_devel"]
@@ -40,23 +40,16 @@ universal_fw = []
unsafe_fw = []
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "secmon_layout",
- "models/secmon",
- "sec/kernel_mode",
- "sec/secure_mode",
- "sec/storage",
- "sec/rdi",
- "crypto/aes_gcm",
- ]
-
mcu_stm32u58 = ["sec/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["sec/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["sec/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
backup_ram = ["sec/backup_ram"]
boot_ucb = ["sec/boot_ucb"]
@@ -75,3 +68,18 @@ tamper = ["sec/tamper"]
telemetry = ["sec/telemetry"]
tropic = ["sec/tropic"]
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
+
+default = [
+ "secmon_layout",
+ "models/secmon",
+ "sec/kernel_mode",
+ "sec/secure_mode",
+ "sec/storage",
+ "sec/rdi",
+ "crypto/aes_gcm",
+ ]
+
+mcu_stm32u5 = ["sec/trustzone"]
diff --git a/core/embed/projects/unix/Cargo.toml b/core/embed/projects/unix/Cargo.toml
index 2bc0df1f..2f1c136b 100644
--- a/core/embed/projects/unix/Cargo.toml
+++ b/core/embed/projects/unix/Cargo.toml
@@ -9,19 +9,19 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
-trezor_lib.workspace = true
+crypto.workspace = true
io.workspace = true
+models.workspace = true
+rtl.workspace = true
sec.workspace = true
sys.workspace = true
-crypto.workspace = true
-rtl.workspace = true
-models.workspace = true
+trezor_lib.workspace = true
upymod.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Build options
# --------------------------------------------------------------------------
asan = ["models/asan"]
@@ -32,11 +32,11 @@ debug = ["trezor_lib/debug"]
debuglink = ["trezor_lib/debuglink", "io/usb_iface_debug"]
disable_animation = ["upymod/disable_animation"]
emulator = ["io/emulator", "upymod/emulator"]
+frozen = ["upymod/frozen"]
log_stack_usage = ["upymod/log_stack_usage"]
memperf = ["upymod/memperf"]
micropy_enable_source_lines = ["upymod/enable_source_lines"]
n4w1 = ["upymod/n4w1"]
-frozen = ["upymod/frozen"]
optiga_testing = ["sec/optiga_testing"]
pyopt = ["upymod/pyopt"]
ui_debug = ["trezor_lib/ui_debug"]
@@ -46,47 +46,67 @@ universal_fw = ["trezor_lib/universal_fw", "upymod/universal_fw", "io/usb_iface_
unsafe_fw = []
# --------------------------------------------------------------------------
-# Automatically derived features (do not enable from outside)
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
-default = [
- "sys/applets",
- "io/display",
- "io/fancy_fatal_error",
- "io/kernel_mode",
- "io/secure_mode",
- "io/usb_iface_wire",
- "sec/rdi",
- "crypto/aes_gcm",
- "crypto/secp256k1_zkp",
-
- "trezor_lib/with_new_crates", # only for transitional period
- "trezor_lib/with_upymod", # only for transitional period
-
- "trezor_lib/crypto",
- "trezor_lib/micropython",
- "trezor_lib/protobuf",
- "trezor_lib/ui",
- "trezor_lib/storage",
- "trezor_lib/translations",
- "trezor_lib/usb",
- ]
-
mcu_stm32f427 = ["io/mcu_stm32f427", "upymod/mcu_stm32f427", "mcu_stm32f4"]
mcu_stm32f429 = ["io/mcu_stm32f429", "upymod/mcu_stm32f429", "mcu_stm32f4"]
-mcu_stm32f4 = ["mcu_stm32"]
mcu_stm32u58 = ["io/mcu_stm32u58", "upymod/mcu_stm32u58", "mcu_stm32u5"]
mcu_stm32u5g = ["io/mcu_stm32u5g", "upymod/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["io/mcu_stm32u5a", "upymod/mcu_stm32u5a", "mcu_stm32u5"]
-mcu_stm32u5 = ["sec/trustzone", "mcu_stm32"]
-mcu_stm32 = []
+
+# --------------------------------------------------------------------------
+# Layout selection - only enable one of these at a time
+# --------------------------------------------------------------------------
+
+layout_bolt = [
+ "trezor_lib/layout_bolt",
+ "upymod/layout_bolt",
+ "trezor_lib/ui_blurring",
+ "trezor_lib/ui_jpeg",
+]
+
+layout_caesar = [
+ "trezor_lib/layout_caesar",
+ "upymod/layout_caesar",
+]
+
+layout_delizia = [
+ "trezor_lib/layout_delizia",
+ "upymod/layout_delizia",
+ "trezor_lib/ui_blurring",
+ "trezor_lib/ui_image_buffer",
+ "trezor_lib/ui_overlay",
+ "trezor_lib/ui_jpeg",
+ "trezor_lib/ui_font_kerning",
+]
+
+layout_eckhart = [
+ "trezor_lib/layout_eckhart",
+ "upymod/layout_eckhart",
+ "trezor_lib/ui_blurring",
+ "trezor_lib/ui_image_buffer",
+ "trezor_lib/ui_overlay",
+ "trezor_lib/ui_jpeg",
+ "trezor_lib/ui_font_kerning",
+ "trezor_lib/hw_jpeg_decoder",
+ "io/hw_jpeg_decoder",
+]
+
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+
+# --------------------------------------------------------------------------
+# Selectable components
+# --------------------------------------------------------------------------
app_loading = ["io/app_loading", "upymod/app_loading", "trezor_lib/app_loading", "io/ipc"]
backlight = ["io/backlight", "upymod/backlight", "trezor_lib/backlight"]
backup_ram = ["sec/backup_ram"]
ble = ["io/ble", "upymod/ble", "trezor_lib/ble", "nrf", "nrf_auth"]
boot_ucb = ["sec/boot_ucb", "trezor_lib/boot_ucb"]
-button = ["io/button", "upymod/button","trezor_lib/button"]
+button = ["io/button", "upymod/button", "trezor_lib/button"]
consumption_mask = ["sec/consumption_mask"]
dev_keys = ["trezor_lib/dev_keys"]
display = ["io/display"]
@@ -120,40 +140,33 @@ decred = ["upymod/decred"]
eos = ["crypto/eos", "upymod/eos"]
nem = ["crypto/nem", "upymod/nem"]
-display_mono = ["trezor_lib/display_mono"]
-display_rgb565 = ["trezor_lib/display_rgb565"]
-display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
+# --------------------------------------------------------------------------
+# Automatically derived features (do not enable from outside)
+# --------------------------------------------------------------------------
-layout_bolt = [
- "trezor_lib/layout_bolt",
- "upymod/layout_bolt",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_jpeg",
-]
+default = [
+ "sys/applets",
+ "io/display",
+ "io/fancy_fatal_error",
+ "io/kernel_mode",
+ "io/secure_mode",
+ "io/usb_iface_wire",
+ "sec/rdi",
+ "crypto/secp256k1_zkp",
+ "crypto/aes_gcm",
-layout_caesar = [
- "trezor_lib/layout_caesar",
- "upymod/layout_caesar",
-]
+ "trezor_lib/with_new_crates", # only for transitional period
+ "trezor_lib/with_upymod", # only for transitional period
-layout_delizia = [
- "trezor_lib/layout_delizia",
- "upymod/layout_delizia",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_image_buffer",
- "trezor_lib/ui_overlay",
- "trezor_lib/ui_jpeg",
- "trezor_lib/ui_font_kerning",
-]
+ "trezor_lib/crypto",
+ "trezor_lib/micropython",
+ "trezor_lib/protobuf",
+ "trezor_lib/ui",
+ "trezor_lib/storage",
+ "trezor_lib/translations",
+ "trezor_lib/usb",
+ ]
-layout_eckhart = [
- "trezor_lib/layout_eckhart",
- "upymod/layout_eckhart",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_image_buffer",
- "trezor_lib/ui_overlay",
- "trezor_lib/ui_jpeg",
- "trezor_lib/ui_font_kerning",
- "trezor_lib/hw_jpeg_decoder",
- "io/hw_jpeg_decoder",
-]
+mcu_stm32f4 = ["mcu_stm32"]
+mcu_stm32u5 = ["sec/trustzone", "mcu_stm32"]
+mcu_stm32 = []
diff --git a/core/embed/rtl/Cargo.toml b/core/embed/rtl/Cargo.toml
index d0412256..13f46fcf 100644
--- a/core/embed/rtl/Cargo.toml
+++ b/core/embed/rtl/Cargo.toml
@@ -16,7 +16,7 @@ models.workspace = true
[features]
# --------------------------------------------------------------------------
-# Selectable features
+# Selectable components
# --------------------------------------------------------------------------
emulator = ["models/emulator"]
diff --git a/core/embed/sec/Cargo.toml b/core/embed/sec/Cargo.toml
index fd3a9447..54f46b50 100644
--- a/core/embed/sec/Cargo.toml
+++ b/core/embed/sec/Cargo.toml
@@ -9,15 +9,15 @@ color-eyre.workspace = true
xbuild.workspace = true
[dependencies]
-sys.workspace = true
crypto.workspace = true
-rtl.workspace = true
models.workspace = true
+rtl.workspace = true
+sys.workspace = true
[features]
# --------------------------------------------------------------------------
-# MCU features
+# MCU selection
# --------------------------------------------------------------------------
mcu_stm32f427 = ["sys/mcu_stm32f427", "mcu_stm32f4"]
@@ -27,7 +27,7 @@ mcu_stm32u5g = ["sys/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["sys/mcu_stm32u5a", "mcu_stm32u5"]
# --------------------------------------------------------------------------
-# Privilege mode features
+# Privilege mode
# --------------------------------------------------------------------------
kernel_mode = ["sys/kernel_mode"]
@@ -38,8 +38,8 @@ secure_mode = ["sys/secure_mode"]
# --------------------------------------------------------------------------
backup_ram = []
-bootloader_devel = []
boot_ucb = ["sys/boot_ucb", "crypto/sphincsplus"]
+bootloader_devel = []
consumption_mask = []
emulator = ["sys/emulator"]
hash_processor = []
@@ -64,6 +64,10 @@ time_estimate = []
tropic = []
trustzone = ["sys/trustzone"]
+# --------------------------------------------------------------------------
+# Unit test configuration
+# --------------------------------------------------------------------------
+
test = [
"mcu_stm32u5g",
"models/model_t3w1",
@@ -80,5 +84,3 @@ test = [
mcu_stm32u5 = ["mcu_stm32"]
mcu_stm32f4 = ["mcu_stm32"]
mcu_stm32 = []
-
-
diff --git a/core/embed/sys/Cargo.toml b/core/embed/sys/Cargo.toml
index 38dc52ff..f184592a 100644
--- a/core/embed/sys/Cargo.toml
+++ b/core/embed/sys/Cargo.toml
@@ -19,7 +19,7 @@ ufmt.workspace = true
[features]
# --------------------------------------------------------------------------
-# MCU features
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
mcu_stm32f427 = ["models/mcu_stm32f427", "mcu_stm32f4"]
@@ -29,7 +29,7 @@ mcu_stm32u5g = ["models/mcu_stm32u5g", "mcu_stm32u5"]
mcu_stm32u5a = ["models/mcu_stm32u5a", "mcu_stm32u5"]
# --------------------------------------------------------------------------
-# Privilege mode features
+# Privilege mode
# --------------------------------------------------------------------------
kernel_mode = ["models/kernel_mode"]
@@ -39,26 +39,29 @@ secure_mode = ["models/secure_mode"]
# Selectable components
# --------------------------------------------------------------------------
-applets = []
app_loading = ["applets"]
+applets = []
block_on_vcp = []
boot_ucb = []
+dbg_console = []
+dbg_console_swo = ["dbg_console"]
+dbg_console_system_view = ["dbg_console", "system_view"]
+dbg_console_vcp = ["dbg_console"]
emulator = ["rtl/emulator", "crypto/emulator"]
i2c_bus = []
ipc = []
lockable_bootloader = []
-production = ["rtl/production", "crypto/production"]
+production = ["rtl/production"]
pvd = []
rtc = []
-trustzone = []
-dbg_console = []
-dbg_console_swo = ["dbg_console"]
-dbg_console_vcp = ["dbg_console"]
-dbg_console_system_view = ["dbg_console", "system_view"]
sdram = []
sdram_stm32f429i_disc1 = []
system_view = []
+trustzone = []
+# --------------------------------------------------------------------------
+# Unit test configuration
+# --------------------------------------------------------------------------
test = [
"mcu_stm32u5g",
@@ -75,4 +78,3 @@ test = [
mcu_stm32f4 = ["mcu_stm32"]
mcu_stm32u5 = ["mcu_stm32"]
mcu_stm32 = []
-
diff --git a/core/embed/upymod/Cargo.toml b/core/embed/upymod/Cargo.toml
index f3c3d1fd..6eedc9da 100644
--- a/core/embed/upymod/Cargo.toml
+++ b/core/embed/upymod/Cargo.toml
@@ -18,7 +18,7 @@ io.workspace = true
[features]
# --------------------------------------------------------------------------
-# MCU features
+# MCU selection - only enable one of these at a time
# --------------------------------------------------------------------------
mcu_stm32f427 = ["io/mcu_stm32f427", "mcu_stm32f4"]
@@ -38,8 +38,8 @@ ble = ["io/ble"]
button = ["io/button"]
decred = []
disable_animation = []
-enable_source_lines = []
emulator = ["io/emulator"]
+enable_source_lines = []
eos = []
frozen = []
haptic = ["io/haptic"]
@@ -56,8 +56,8 @@ optiga = ["sec/optiga"]
power_manager = ["io/power_manager"]
pyopt = []
rgb_led = ["io/rgb_led"]
-serial_number = []
sd_card = ["io/sd_card"]
+serial_number = []
telemetry = ["sec/telemetry"]
thp = []
touch = ["io/touch"]
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.