diff --git a/Makefile.bootloader b/Makefile.bootloader index 6a6a171784..f432f519f9 100644 --- a/Makefile.bootloader +++ b/Makefile.bootloader @@ -18,9 +18,12 @@ BUILD_HDR = $(BUILD)/genhdr # OBJ vendor/micropython OBJ_MP += $(addprefix $(BUILD_MP)/,\ - \ lib/libc/string0.o \ - \ + stmhal/startup_stm32.o \ + ) + +# OBJ vendor/micropython +OBJ_HAL += $(addprefix $(BUILD_MP)/,\ stmhal/hal/f4/src/stm32f4xx_hal_adc_ex.o \ stmhal/hal/f4/src/stm32f4xx_hal_adc.o \ stmhal/hal/f4/src/stm32f4xx_hal_can.o \ @@ -49,8 +52,6 @@ OBJ_MP += $(addprefix $(BUILD_MP)/,\ stmhal/hal/f4/src/stm32f4xx_hal.o \ stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \ stmhal/hal/f4/src/stm32f4xx_ll_usb.o \ - \ - stmhal/startup_stm32.o \ ) # OBJ micropython/ @@ -86,7 +87,7 @@ OBJ_MOD += \ $(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/blake2s.o \ $(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/sha2.o \ -OBJ = $(OBJ_MOD) $(OBJ_MP) $(OBJ_FW) +OBJ = $(OBJ_MOD) $(OBJ_MP) $(OBJ_HAL) $(OBJ_FW) SRC_MP = $(patsubst $(BUILD_MP)%.o, $(SRCDIR_MP)%.c, $(OBJ_MP)) SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW)) SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD)) diff --git a/Makefile.firmware b/Makefile.firmware index 1215136237..c175184f0c 100644 --- a/Makefile.firmware +++ b/Makefile.firmware @@ -262,6 +262,20 @@ OBJ_MP += $(addprefix $(BUILD_MP)/,\ py/vstr.o \ py/warning.o \ \ + stmhal/gccollect.o \ + stmhal/gchelper.o \ + stmhal/pendsv.o \ + stmhal/startup_stm32.o \ + stmhal/systick.o \ + \ + stmhal/usbd_cdc_interface.o \ + stmhal/usbd_conf.o \ + stmhal/usbd_desc.o \ + stmhal/usbd_hid_interface.o \ + ) + +# OBJ vendor/micropython +OBJ_HAL += $(addprefix $(BUILD_MP)/,\ stmhal/hal/f4/src/stm32f4xx_hal_adc_ex.o \ stmhal/hal/f4/src/stm32f4xx_hal_adc.o \ stmhal/hal/f4/src/stm32f4xx_hal_can.o \ @@ -291,17 +305,6 @@ OBJ_MP += $(addprefix $(BUILD_MP)/,\ stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \ stmhal/hal/f4/src/stm32f4xx_ll_usb.o \ \ - stmhal/gccollect.o \ - stmhal/gchelper.o \ - stmhal/pendsv.o \ - stmhal/startup_stm32.o \ - stmhal/systick.o \ - \ - stmhal/usbd_cdc_interface.o \ - stmhal/usbd_conf.o \ - stmhal/usbd_desc.o \ - stmhal/usbd_hid_interface.o \ - \ stmhal/usbdev/class/src/usbd_cdc_msc_hid.o \ stmhal/usbdev/class/src/usbd_msc_bot.o \ stmhal/usbdev/class/src/usbd_msc_data.o \ @@ -331,7 +334,7 @@ OBJ_FW += $(addprefix $(BUILD_FW)/, \ FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py' | $(SED) -e 's=^$(FROZEN_MPY_DIR)/==') FROZEN_MPY_MPY_FILES := $(addprefix $(BUILD)/frozen_mpy/,$(FROZEN_MPY_PY_FILES:.py=.mpy)) -OBJ = $(OBJ_MOD) $(OBJ_MP) $(OBJ_FW) $(BUILD)/frozen_mpy.o +OBJ = $(OBJ_MOD) $(OBJ_MP) $(OBJ_FW) $(OBJ_HAL) $(BUILD)/frozen_mpy.o SRC_MP = $(patsubst $(BUILD_MP)%.o, $(SRCDIR_MP)%.c, $(OBJ_MP)) SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW)) SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD)) diff --git a/Makefile.loader b/Makefile.loader index 06cf600b23..a8d81a7f44 100644 --- a/Makefile.loader +++ b/Makefile.loader @@ -18,9 +18,12 @@ BUILD_HDR = $(BUILD)/genhdr # OBJ vendor/micropython OBJ_MP += $(addprefix $(BUILD_MP)/,\ - \ lib/libc/string0.o \ - \ + stmhal/startup_stm32.o \ + ) + +# OBJ vendor/micropython +OBJ_HAL += $(addprefix $(BUILD_MP)/,\ stmhal/hal/f4/src/stm32f4xx_hal_adc_ex.o \ stmhal/hal/f4/src/stm32f4xx_hal_adc.o \ stmhal/hal/f4/src/stm32f4xx_hal_can.o \ @@ -49,8 +52,6 @@ OBJ_MP += $(addprefix $(BUILD_MP)/,\ stmhal/hal/f4/src/stm32f4xx_hal.o \ stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \ stmhal/hal/f4/src/stm32f4xx_ll_usb.o \ - \ - stmhal/startup_stm32.o \ ) # OBJ micropython/ @@ -84,7 +85,7 @@ OBJ_MOD += \ $(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/blake2s.o \ $(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/sha2.o \ -OBJ = $(OBJ_MOD) $(OBJ_MP) $(OBJ_FW) +OBJ = $(OBJ_MOD) $(OBJ_MP) $(OBJ_HAL) $(OBJ_FW) SRC_MP = $(patsubst $(BUILD_MP)%.o, $(SRCDIR_MP)%.c, $(OBJ_MP)) SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW)) SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD))