chore(core): enable debuglink compilation on touch models
What changed, and why it matters
This commit only changes build configuration files for Trezor hardware wallets. It adds the debug touch and button source files to the compilation when a debug USB interface is requested. There is no change to runtime behavior, user-facing functionality, or security logic. It is a build-system chore.
No security action required. Review as normal build maintenance if relevant to release engineering.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies SCons model files for T2T1, T3T1, and T3W1 variants (emulator and hardware) to include embed/io/touch/touch_debug.c and, for T3W1 revA/revB, embed/io/button/button_debug.c when usb_iface_debug is in features_wanted. This is purely enabling compilation of existing debug code under the existing debug feature flag. No source code logic is changed.
Changed components
core/site_scons/models/T2T1/emulator.pycore/site_scons/models/T2T1/trezor_t.pycore/site_scons/models/T3T1/emulator.pycore/site_scons/models/T3T1/trezor_t3t1_revE.pycore/site_scons/models/T3W1/emulator.pycore/site_scons/models/T3W1/trezor_t3w1_revA.pycore/site_scons/models/T3W1/trezor_t3w1_revB.pycore/site_scons/models/T3W1/trezor_t3w1_revC.pyInspect captured patch +24 / −0
diff --git a/core/site_scons/models/T2T1/emulator.py b/core/site_scons/models/T2T1/emulator.py
index 0aebb6e3..9bb469c9 100644
--- a/core/site_scons/models/T2T1/emulator.py
+++ b/core/site_scons/models/T2T1/emulator.py
@@ -67,6 +67,9 @@ def configure(
features_available.append("touch")
defines += [("USE_TOUCH", "1")]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+
features_available.append("backlight")
defines += [("USE_BACKLIGHT", "1")]
diff --git a/core/site_scons/models/T2T1/trezor_t.py b/core/site_scons/models/T2T1/trezor_t.py
index c2166c42..c56b2b70 100644
--- a/core/site_scons/models/T2T1/trezor_t.py
+++ b/core/site_scons/models/T2T1/trezor_t.py
@@ -80,6 +80,9 @@ def configure(
defines += [("USE_TOUCH", "1")]
defines += [("USE_I2C", "1")]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+
if "sd_card" in features_wanted:
sources += ["embed/io/sdcard/stm32f4/sdcard.c"]
sources += ["embed/upymod/modtrezorio/ff.c"]
diff --git a/core/site_scons/models/T3T1/emulator.py b/core/site_scons/models/T3T1/emulator.py
index 80677182..8ded3f53 100644
--- a/core/site_scons/models/T3T1/emulator.py
+++ b/core/site_scons/models/T3T1/emulator.py
@@ -82,6 +82,9 @@ def configure(
features_available.append("touch")
defines += [("USE_TOUCH", "1")]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+
features_available.append("backlight")
defines += [("USE_BACKLIGHT", "1")]
diff --git a/core/site_scons/models/T3T1/trezor_t3t1_revE.py b/core/site_scons/models/T3T1/trezor_t3t1_revE.py
index 005b5d01..4293168e 100644
--- a/core/site_scons/models/T3T1/trezor_t3t1_revE.py
+++ b/core/site_scons/models/T3T1/trezor_t3t1_revE.py
@@ -90,6 +90,9 @@ def configure(
defines += [("USE_TOUCH", "1")]
defines += [("USE_I2C", "1")]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+
if "haptic" in features_wanted:
sources += [
"embed/io/haptic/drv262x/drv262x.c",
diff --git a/core/site_scons/models/T3W1/emulator.py b/core/site_scons/models/T3W1/emulator.py
index 624945e0..044c4af6 100644
--- a/core/site_scons/models/T3W1/emulator.py
+++ b/core/site_scons/models/T3W1/emulator.py
@@ -120,6 +120,9 @@ def configure(
features_available.append("button")
defines += [("USE_BUTTON", "1")]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+
if "ble" in features_wanted:
sources += ["embed/io/ble/unix/ble.c"]
paths += ["embed/io/ble/inc"]
diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revA.py b/core/site_scons/models/T3W1/trezor_t3w1_revA.py
index d388554d..38866ae1 100644
--- a/core/site_scons/models/T3W1/trezor_t3w1_revA.py
+++ b/core/site_scons/models/T3W1/trezor_t3w1_revA.py
@@ -108,6 +108,10 @@ def configure(
("USE_BUTTON", "1"),
]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+ sources += ["embed/io/button/button_debug.c"]
+
sources += ["embed/sys/i2c_bus/stm32u5/i2c_bus.c"]
paths += ["embed/sys/i2c_bus/inc"]
defines += [("USE_I2C", "1")]
diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revB.py b/core/site_scons/models/T3W1/trezor_t3w1_revB.py
index 29645c82..79d59809 100644
--- a/core/site_scons/models/T3W1/trezor_t3w1_revB.py
+++ b/core/site_scons/models/T3W1/trezor_t3w1_revB.py
@@ -107,6 +107,9 @@ def configure(
("USE_TOUCH", "1"),
("USE_BUTTON", "1"),
]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
+ sources += ["embed/io/button/button_debug.c"]
sources += ["embed/sys/i2c_bus/stm32u5/i2c_bus.c"]
paths += ["embed/sys/i2c_bus/inc"]
diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revC.py b/core/site_scons/models/T3W1/trezor_t3w1_revC.py
index b0338dd6..8319d1a1 100644
--- a/core/site_scons/models/T3W1/trezor_t3w1_revC.py
+++ b/core/site_scons/models/T3W1/trezor_t3w1_revC.py
@@ -107,6 +107,8 @@ def configure(
("USE_TOUCH", "1"),
("USE_BUTTON", "1"),
]
+ if "usb_iface_debug" in features_wanted:
+ sources += ["embed/io/touch/touch_debug.c"]
sources += ["embed/sys/i2c_bus/stm32u5/i2c_bus.c"]
paths += ["embed/sys/i2c_bus/inc"]
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.