Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move model specific settings to correct place #4505

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor(core): extract model specific definitions from Makefile
[no changelog]
TychoVrahe committed Jan 20, 2025
commit d34a863406b940dc50be394856603ca1b1b7c6e0
31 changes: 2 additions & 29 deletions core/Makefile
Original file line number Diff line number Diff line change
@@ -50,35 +50,8 @@ OPENOCD_INTERFACE ?= stlink
# OpenOCD transport default. Alternative: jtag
OPENOCD_TRANSPORT ?= hla_swd

ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T2T1))
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
LAYOUT_FEATURE = layout_bolt
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T2B1))
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
LAYOUT_FEATURE = layout_caesar
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T3T1))
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_delizia
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T3B1))
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_caesar
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T3W1))
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_bolt
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),D001))
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),D002))
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
else
$(error Unknown TREZOR_MODEL: $(TREZOR_MODEL))
endif
# Include the device-specific definitions.
include embed/models/$(TREZOR_MODEL)/config.mk


FLASH_START = $(shell layout_parser ${TREZOR_MODEL} FLASH_START)
3 changes: 3 additions & 0 deletions core/embed/models/D001/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
LAYOUT_FEATURE = layout_bolt
3 changes: 3 additions & 0 deletions core/embed/models/D002/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_bolt
3 changes: 3 additions & 0 deletions core/embed/models/T2B1/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
LAYOUT_FEATURE = layout_caesar
3 changes: 3 additions & 0 deletions core/embed/models/T2T1/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
LAYOUT_FEATURE = layout_bolt
3 changes: 3 additions & 0 deletions core/embed/models/T3B1/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_caesar
3 changes: 3 additions & 0 deletions core/embed/models/T3T1/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_delizia
3 changes: 3 additions & 0 deletions core/embed/models/T3W1/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MCU = STM32U5
OPENOCD_TARGET = target/stm32u5x.cfg
LAYOUT_FEATURE = layout_bolt