1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 03:48:09 +00:00

firmware: extract stmhal objects to OBJ_HAL

This commit is contained in:
Pavol Rusnak 2017-03-23 17:27:32 +01:00
parent a9d16aa7fa
commit 541d89cff7
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 27 additions and 22 deletions

View File

@ -18,9 +18,12 @@ BUILD_HDR = $(BUILD)/genhdr
# OBJ vendor/micropython # OBJ vendor/micropython
OBJ_MP += $(addprefix $(BUILD_MP)/,\ OBJ_MP += $(addprefix $(BUILD_MP)/,\
\
lib/libc/string0.o \ 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_ex.o \
stmhal/hal/f4/src/stm32f4xx_hal_adc.o \ stmhal/hal/f4/src/stm32f4xx_hal_adc.o \
stmhal/hal/f4/src/stm32f4xx_hal_can.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_hal.o \
stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \ stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \
stmhal/hal/f4/src/stm32f4xx_ll_usb.o \ stmhal/hal/f4/src/stm32f4xx_ll_usb.o \
\
stmhal/startup_stm32.o \
) )
# OBJ micropython/ # OBJ micropython/
@ -86,7 +87,7 @@ OBJ_MOD += \
$(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/blake2s.o \ $(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/blake2s.o \
$(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/sha2.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_MP = $(patsubst $(BUILD_MP)%.o, $(SRCDIR_MP)%.c, $(OBJ_MP))
SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW)) SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW))
SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD)) SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD))

View File

@ -262,6 +262,20 @@ OBJ_MP += $(addprefix $(BUILD_MP)/,\
py/vstr.o \ py/vstr.o \
py/warning.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_ex.o \
stmhal/hal/f4/src/stm32f4xx_hal_adc.o \ stmhal/hal/f4/src/stm32f4xx_hal_adc.o \
stmhal/hal/f4/src/stm32f4xx_hal_can.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_sdmmc.o \
stmhal/hal/f4/src/stm32f4xx_ll_usb.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_cdc_msc_hid.o \
stmhal/usbdev/class/src/usbd_msc_bot.o \ stmhal/usbdev/class/src/usbd_msc_bot.o \
stmhal/usbdev/class/src/usbd_msc_data.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_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)) 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_MP = $(patsubst $(BUILD_MP)%.o, $(SRCDIR_MP)%.c, $(OBJ_MP))
SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW)) SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW))
SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD)) SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD))

View File

@ -18,9 +18,12 @@ BUILD_HDR = $(BUILD)/genhdr
# OBJ vendor/micropython # OBJ vendor/micropython
OBJ_MP += $(addprefix $(BUILD_MP)/,\ OBJ_MP += $(addprefix $(BUILD_MP)/,\
\
lib/libc/string0.o \ 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_ex.o \
stmhal/hal/f4/src/stm32f4xx_hal_adc.o \ stmhal/hal/f4/src/stm32f4xx_hal_adc.o \
stmhal/hal/f4/src/stm32f4xx_hal_can.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_hal.o \
stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \ stmhal/hal/f4/src/stm32f4xx_ll_sdmmc.o \
stmhal/hal/f4/src/stm32f4xx_ll_usb.o \ stmhal/hal/f4/src/stm32f4xx_ll_usb.o \
\
stmhal/startup_stm32.o \
) )
# OBJ micropython/ # OBJ micropython/
@ -84,7 +85,7 @@ OBJ_MOD += \
$(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/blake2s.o \ $(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/blake2s.o \
$(BUILD_FW)/extmod/modtrezorcrypto/trezor-crypto/sha2.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_MP = $(patsubst $(BUILD_MP)%.o, $(SRCDIR_MP)%.c, $(OBJ_MP))
SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW)) SRC_FW = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_FW))
SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD)) SRC_MOD = $(patsubst $(BUILD_FW)%.o, $(SRCDIR_FW)%.c, $(OBJ_MOD))