chore(core): simplify conditioning in Sconscript.firmware
What changed, and why it matters
This is a minor build-script cleanup. It removes a check that would stop the build if the microcontroller (MCU) type was not one of two explicitly known families. Now any other recognized MCU falls through to a default binary-generation path. There is no security-relevant change in behavior for supported devices, and no bug or vulnerability is introduced by the diff itself.
No security action required. Treat as normal build-maintenance refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes core/SConscript.firmware so that the previously explicit STM32U5G9xx/STM32U585xx branch becomes the default else branch, and the old else clause that raised ‘Unknown MCU’ is removed. The binary-generation actions for the U5 family are now used for any MCU that is not STM32F427xx/STM32F429xx. This is a refactoring/simplification of SCons build logic with no functional change for currently supported hardware.
Changed components
core/SConscript.firmwareInspect captured patch +1 / −3
diff --git a/core/SConscript.firmware b/core/SConscript.firmware
index a1280613..d4ef0896 100644
--- a/core/SConscript.firmware
+++ b/core/SConscript.firmware
@@ -1047,14 +1047,12 @@ if 'STM32F427xx' in CPPDEFINES_HAL or 'STM32F429xx' in CPPDEFINES_HAL:
'$DD if=$TARGET of=${TARGET}.p1 skip=0 bs=128k count=6',
'$CP $TARGET ' + BINARY_NAME,
]
-elif 'STM32U5G9xx' in CPPDEFINES_HAL or 'STM32U585xx' in CPPDEFINES_HAL:
+else:
action_bin=[
'$OBJCOPY -O binary -j .vendorheader -j .header -j .flash -j .data $SOURCE ${TARGET}',
'$HEADERTOOL -h $TARGET ' + ('-D' if not PRODUCTION else ''),
'$CP $TARGET ' + BINARY_NAME,
]
-else:
- raise Exception("Unknown MCU")
if STORAGE_INSECURE_TESTING_MODE:
INSECURE_TESTING_MODE_STR = """
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.