diff --git a/platform/stm32f7xx/power.c b/platform/stm32/power.c similarity index 100% rename from platform/stm32f7xx/power.c rename to platform/stm32/power.c diff --git a/platform/stm32/rules.mk b/platform/stm32/rules.mk new file mode 100644 index 00000000..cb3ccec9 --- /dev/null +++ b/platform/stm32/rules.mk @@ -0,0 +1,10 @@ +# Code shared across different stm32 platforms. + +LOCAL_DIR := $(GET_LOCAL_DIR) + +MODULE := $(LOCAL_DIR) + +MODULE_SRCS += \ + $(LOCAL_DIR)/power.c + +include make/module.mk diff --git a/platform/stm32f4xx/rules.mk b/platform/stm32f4xx/rules.mk index 02e6d2af..33c0535e 100644 --- a/platform/stm32f4xx/rules.mk +++ b/platform/stm32f4xx/rules.mk @@ -47,6 +47,7 @@ LINKER_SCRIPT += \ $(BUILDDIR)/system-twosegment.ld MODULE_DEPS += \ + platform/stm32 \ platform/stm32f4xx/STM32F4xx_StdPeriph_Driver \ arch/arm/arm-m/systick \ lib/cbuf \ diff --git a/platform/stm32f7xx/rules.mk b/platform/stm32f7xx/rules.mk index 27c033cd..1c20f031 100644 --- a/platform/stm32f7xx/rules.mk +++ b/platform/stm32f7xx/rules.mk @@ -43,7 +43,6 @@ MODULE_SRCS += \ $(LOCAL_DIR)/flash.c \ $(LOCAL_DIR)/gpio.c \ $(LOCAL_DIR)/init.c \ - $(LOCAL_DIR)/power.c \ $(LOCAL_DIR)/timer.c \ $(LOCAL_DIR)/uart.c \ $(LOCAL_DIR)/usbc.c \ @@ -60,6 +59,7 @@ LINKER_SCRIPT += \ $(BUILDDIR)/system-twosegment.ld MODULE_DEPS += \ + platform/stm32 \ platform/stm32f7xx/STM32F7xx_HAL_Driver \ arch/arm/arm-m/systick \ dev/gpio \