From 5c101ab8001c3926e0fe046131bfec89cc2c173f Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Tue, 5 Nov 2024 08:12:12 +0100 Subject: [PATCH] feat(core): switch DISC2 to use newer U5G variant [no changelog] --- core/SConscript.firmware | 2 +- .../models/D002/boards/{stm32u5a9j-dk.h => stm32u5g9j-dk.h} | 0 .../trezorhal/stm32u5/linker/{u5a => u5g}/boardloader.ld | 2 +- .../trezorhal/stm32u5/linker/{u5a => u5g}/bootloader.ld | 2 +- .../embed/trezorhal/stm32u5/linker/{u5a => u5g}/firmware.ld | 2 +- core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/kernel.ld | 2 +- core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/memory.ld | 2 +- .../embed/trezorhal/stm32u5/linker/{u5a => u5g}/prodtest.ld | 2 +- core/site_scons/models/D002/discovery2.py | 6 +++--- 9 files changed, 10 insertions(+), 10 deletions(-) rename core/embed/models/D002/boards/{stm32u5a9j-dk.h => stm32u5g9j-dk.h} (100%) rename core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/boardloader.ld (98%) rename core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/bootloader.ld (98%) rename core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/firmware.ld (97%) rename core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/kernel.ld (98%) rename core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/memory.ld (93%) rename core/embed/trezorhal/stm32u5/linker/{u5a => u5g}/prodtest.ld (98%) diff --git a/core/SConscript.firmware b/core/SConscript.firmware index 12db71c48..ad2a3b6ef 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -855,7 +855,7 @@ 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 'STM32U5A9xx' in CPPDEFINES_HAL or 'STM32U585xx' in CPPDEFINES_HAL: +elif 'STM32U5G9xx' in CPPDEFINES_HAL or 'STM32U585xx' in CPPDEFINES_HAL: action_bin=[ '$OBJCOPY -O binary -j .vendorheader -j .header -j .flash -j .data -j .confidential $SOURCE ${TARGET}', '$HEADERTOOL -h $TARGET ' + ('-D' if not PRODUCTION else ''), diff --git a/core/embed/models/D002/boards/stm32u5a9j-dk.h b/core/embed/models/D002/boards/stm32u5g9j-dk.h similarity index 100% rename from core/embed/models/D002/boards/stm32u5a9j-dk.h rename to core/embed/models/D002/boards/stm32u5g9j-dk.h diff --git a/core/embed/trezorhal/stm32u5/linker/u5a/boardloader.ld b/core/embed/trezorhal/stm32u5/linker/u5g/boardloader.ld similarity index 98% rename from core/embed/trezorhal/stm32u5/linker/u5a/boardloader.ld rename to core/embed/trezorhal/stm32u5/linker/u5g/boardloader.ld index c82487398..4a60939b9 100644 --- a/core/embed/trezorhal/stm32u5/linker/u5a/boardloader.ld +++ b/core/embed/trezorhal/stm32u5/linker/u5g/boardloader.ld @@ -1,4 +1,4 @@ -INCLUDE "./embed/trezorhal/stm32u5/linker/u5a/memory.ld"; +INCLUDE "./embed/trezorhal/stm32u5/linker/u5g/memory.ld"; ENTRY(reset_handler) diff --git a/core/embed/trezorhal/stm32u5/linker/u5a/bootloader.ld b/core/embed/trezorhal/stm32u5/linker/u5g/bootloader.ld similarity index 98% rename from core/embed/trezorhal/stm32u5/linker/u5a/bootloader.ld rename to core/embed/trezorhal/stm32u5/linker/u5g/bootloader.ld index 535652df5..c5e3fecf9 100644 --- a/core/embed/trezorhal/stm32u5/linker/u5a/bootloader.ld +++ b/core/embed/trezorhal/stm32u5/linker/u5g/bootloader.ld @@ -1,4 +1,4 @@ -INCLUDE "./embed/trezorhal/stm32u5/linker/u5a/memory.ld"; +INCLUDE "./embed/trezorhal/stm32u5/linker/u5g/memory.ld"; ENTRY(reset_handler) diff --git a/core/embed/trezorhal/stm32u5/linker/u5a/firmware.ld b/core/embed/trezorhal/stm32u5/linker/u5g/firmware.ld similarity index 97% rename from core/embed/trezorhal/stm32u5/linker/u5a/firmware.ld rename to core/embed/trezorhal/stm32u5/linker/u5g/firmware.ld index 2ca80fae5..5aa19afbc 100644 --- a/core/embed/trezorhal/stm32u5/linker/u5a/firmware.ld +++ b/core/embed/trezorhal/stm32u5/linker/u5g/firmware.ld @@ -1,4 +1,4 @@ -INCLUDE "./embed/trezorhal/stm32u5/linker/u5a/memory.ld"; +INCLUDE "./embed/trezorhal/stm32u5/linker/u5g/memory.ld"; ENTRY(reset_handler) diff --git a/core/embed/trezorhal/stm32u5/linker/u5a/kernel.ld b/core/embed/trezorhal/stm32u5/linker/u5g/kernel.ld similarity index 98% rename from core/embed/trezorhal/stm32u5/linker/u5a/kernel.ld rename to core/embed/trezorhal/stm32u5/linker/u5g/kernel.ld index 453c0706d..cdf7e71e6 100644 --- a/core/embed/trezorhal/stm32u5/linker/u5a/kernel.ld +++ b/core/embed/trezorhal/stm32u5/linker/u5g/kernel.ld @@ -1,4 +1,4 @@ -INCLUDE "./embed/trezorhal/stm32u5/linker/u5a/memory.ld"; +INCLUDE "./embed/trezorhal/stm32u5/linker/u5g/memory.ld"; ENTRY(reset_handler) diff --git a/core/embed/trezorhal/stm32u5/linker/u5a/memory.ld b/core/embed/trezorhal/stm32u5/linker/u5g/memory.ld similarity index 93% rename from core/embed/trezorhal/stm32u5/linker/u5a/memory.ld rename to core/embed/trezorhal/stm32u5/linker/u5g/memory.ld index 157833f96..ab00700ba 100644 --- a/core/embed/trezorhal/stm32u5/linker/u5a/memory.ld +++ b/core/embed/trezorhal/stm32u5/linker/u5g/memory.ld @@ -15,4 +15,4 @@ MCU_SRAM4_SIZE = 16K; MCU_SRAM5 = 0x301A0000; MCU_SRAM5_SIZE = 832K; MCU_SRAM6 = 0x30270000; -MCU_SRAM6_SIZE = 0K ; +MCU_SRAM6_SIZE = 512K ; diff --git a/core/embed/trezorhal/stm32u5/linker/u5a/prodtest.ld b/core/embed/trezorhal/stm32u5/linker/u5g/prodtest.ld similarity index 98% rename from core/embed/trezorhal/stm32u5/linker/u5a/prodtest.ld rename to core/embed/trezorhal/stm32u5/linker/u5g/prodtest.ld index 173c3deb8..da49ff23c 100644 --- a/core/embed/trezorhal/stm32u5/linker/u5a/prodtest.ld +++ b/core/embed/trezorhal/stm32u5/linker/u5g/prodtest.ld @@ -1,4 +1,4 @@ -INCLUDE "./embed/trezorhal/stm32u5/linker/u5a/memory.ld"; +INCLUDE "./embed/trezorhal/stm32u5/linker/u5g/memory.ld"; ENTRY(reset_handler) diff --git a/core/site_scons/models/D002/discovery2.py b/core/site_scons/models/D002/discovery2.py index 7fd7aeea3..0ad5625d6 100644 --- a/core/site_scons/models/D002/discovery2.py +++ b/core/site_scons/models/D002/discovery2.py @@ -12,12 +12,12 @@ def configure( paths: list[str], ) -> list[str]: features_available: list[str] = [] - board = "D002/boards/stm32u5a9j-dk.h" + board = "D002/boards/stm32u5g9j-dk.h" hw_model = get_hw_model_as_number("D002") hw_revision = 0 - mcu = "STM32U5A9xx" - linker_script = """embed/trezorhal/stm32u5/linker/u5a/{target}.ld""" + mcu = "STM32U5G9xx" + linker_script = """embed/trezorhal/stm32u5/linker/u5g/{target}.ld""" stm32u5_common_files(env, defines, sources, paths)