summaryrefslogtreecommitdiff
path: root/chip/stm32/build.mk
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/build.mk')
-rw-r--r--chip/stm32/build.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/stm32/build.mk b/chip/stm32/build.mk
index 72984eec5f..1fc14a15fa 100644
--- a/chip/stm32/build.mk
+++ b/chip/stm32/build.mk
@@ -33,6 +33,8 @@ CORE:=cortex-m
CFLAGS_CPU+=-mcpu=cortex-m3
endif
+# Select between 16-bit and 32-bit timer for clock source
+TIMER_TYPE=$(if $(CONFIG_STM_HWTIMER32),32,)
DMA_TYPE=$(if $(CHIP_FAMILY_STM32F4)$(CHIP_FAMILY_STM32H7),-stm32f4,)
SPI_TYPE=$(if $(CHIP_FAMILY_STM32H7),-stm32h7,)
@@ -46,7 +48,7 @@ chip-$(CONFIG_FPU)+=fpu.o
chip-$(CONFIG_SPI)+=spi.o
chip-$(CONFIG_SPI_CONTROLLER)+=spi_controller$(SPI_TYPE).o
chip-$(CONFIG_COMMON_GPIO)+=gpio.o gpio-$(CHIP_FAMILY).o
-chip-$(CONFIG_COMMON_TIMER)+=hwtimer32.o
+chip-$(CONFIG_COMMON_TIMER)+=hwtimer$(TIMER_TYPE).o
chip-$(CONFIG_I2C)+=i2c-$(CHIP_FAMILY).o
chip-$(CONFIG_ITE_FLASH_SUPPORT)+=i2c_ite_flash_support.o
chip-$(CONFIG_STREAM_USART)+=usart.o usart-$(CHIP_FAMILY).o