aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/Makefile
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2025-04-09 12:36:24 -0400
committerKevin O'Connor <kevin@koconnor.net>2025-04-16 13:54:44 -0400
commit04e7eb20fd9b65addcbb4773fdb7b6be9dbf6195 (patch)
tree5a57fe1f0a283e8b5e07a257fdd2af85c493cd50 /src/stm32/Makefile
parent868760f5b1013843aff7390bb94adfb4cb3fe679 (diff)
downloadkutter-04e7eb20fd9b65addcbb4773fdb7b6be9dbf6195.tar.gz
kutter-04e7eb20fd9b65addcbb4773fdb7b6be9dbf6195.tar.xz
kutter-04e7eb20fd9b65addcbb4773fdb7b6be9dbf6195.zip
Kconfig: Add new WANT_I2C option to reduce code size
Make it possible to not compile in support for I2C on chips with small flash sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/Makefile')
-rw-r--r--src/stm32/Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/stm32/Makefile b/src/stm32/Makefile
index bb3fe7fc..39e206bd 100644
--- a/src/stm32/Makefile
+++ b/src/stm32/Makefile
@@ -43,39 +43,42 @@ src-y += generic/armcm_boot.c generic/armcm_irq.c generic/armcm_reset.c
src-$(CONFIG_MACH_STM32F0) += ../lib/stm32f0/system_stm32f0xx.c
src-$(CONFIG_MACH_STM32F0) += generic/timer_irq.c stm32/stm32f0_timer.c
src-$(CONFIG_MACH_STM32F0) += stm32/stm32f0.c stm32/gpioperiph.c
-src-$(CONFIG_MACH_STM32F0) += stm32/stm32f0_adc.c stm32/stm32f0_i2c.c
+src-$(CONFIG_MACH_STM32F0) += stm32/stm32f0_adc.c
src-$(CONFIG_MACH_STM32F103) += ../lib/stm32f1/system_stm32f1xx.c
src-$(CONFIG_MACH_STM32F103) += stm32/adc.c
src-$(CONFIG_MACH_N32G45x) += ../lib/stm32f1/system_stm32f1xx.c
src-$(CONFIG_MACH_N32G45x) += ../lib/n32g45x/n32g45x_adc.c stm32/n32g45x_adc.c
-src-$(CONFIG_MACH_STM32F1) += stm32/stm32f1.c generic/armcm_timer.c stm32/i2c.c
+src-$(CONFIG_MACH_STM32F1) += stm32/stm32f1.c generic/armcm_timer.c
src-$(CONFIG_MACH_STM32F2) += ../lib/stm32f2/system_stm32f2xx.c
src-$(CONFIG_MACH_STM32F2) += stm32/stm32f4.c generic/armcm_timer.c
-src-$(CONFIG_MACH_STM32F2) += stm32/gpioperiph.c stm32/adc.c stm32/i2c.c
+src-$(CONFIG_MACH_STM32F2) += stm32/gpioperiph.c stm32/adc.c
src-$(CONFIG_MACH_STM32F4) += ../lib/stm32f4/system_stm32f4xx.c
src-$(CONFIG_MACH_STM32F4) += stm32/stm32f4.c generic/armcm_timer.c
-src-$(CONFIG_MACH_STM32F4) += stm32/gpioperiph.c stm32/adc.c stm32/i2c.c
+src-$(CONFIG_MACH_STM32F4) += stm32/gpioperiph.c stm32/adc.c
src-$(CONFIG_MACH_STM32F7) += ../lib/stm32f7/system_stm32f7xx.c
src-$(CONFIG_MACH_STM32F7) += stm32/stm32f7.c generic/armcm_timer.c
-src-$(CONFIG_MACH_STM32F7) += stm32/gpioperiph.c stm32/adc.c stm32/stm32f0_i2c.c
+src-$(CONFIG_MACH_STM32F7) += stm32/gpioperiph.c stm32/adc.c
src-$(CONFIG_MACH_STM32G0) += generic/timer_irq.c stm32/stm32f0_timer.c
src-$(CONFIG_MACH_STM32G0) += stm32/stm32g0.c stm32/gpioperiph.c
-src-$(CONFIG_MACH_STM32G0) += stm32/stm32f0_adc.c stm32/stm32f0_i2c.c
+src-$(CONFIG_MACH_STM32G0) += stm32/stm32f0_adc.c
src-$(CONFIG_MACH_STM32G4) += ../lib/stm32g4/system_stm32g4xx.c
src-$(CONFIG_MACH_STM32G4) += stm32/stm32g4.c generic/armcm_timer.c
src-$(CONFIG_MACH_STM32G4) += stm32/gpioperiph.c stm32/stm32h7_adc.c
-src-$(CONFIG_MACH_STM32G4) += stm32/stm32f0_i2c.c
src-$(CONFIG_MACH_STM32H7) += ../lib/stm32h7/system_stm32h7xx.c
src-$(CONFIG_MACH_STM32H7) += stm32/stm32h7.c generic/armcm_timer.c
src-$(CONFIG_MACH_STM32H7) += stm32/gpioperiph.c stm32/stm32h7_adc.c
-src-$(CONFIG_MACH_STM32H7) += stm32/stm32f0_i2c.c
src-$(CONFIG_MACH_STM32L4) += ../lib/stm32l4/system_stm32l4xx.c
src-$(CONFIG_MACH_STM32L4) += stm32/stm32l4.c generic/armcm_timer.c
src-$(CONFIG_MACH_STM32L4) += stm32/gpioperiph.c
-src-$(CONFIG_MACH_STM32L4) += stm32/stm32h7_adc.c stm32/stm32f0_i2c.c
+src-$(CONFIG_MACH_STM32L4) += stm32/stm32h7_adc.c
spi-src-y := stm32/spi.c
spi-src-$(CONFIG_MACH_STM32H7) := stm32/stm32h7_spi.c
src-$(CONFIG_WANT_SPI) += $(spi-src-y)
+i2c-src-y := stm32/stm32f0_i2c.c
+i2c-src-$(CONFIG_MACH_STM32F1) := stm32/i2c.c
+i2c-src-$(CONFIG_MACH_STM32F2) := stm32/i2c.c
+i2c-src-$(CONFIG_MACH_STM32F4) := stm32/i2c.c
+src-$(CONFIG_WANT_I2C) += $(i2c-src-y)
sdio-src-y := stm32/sdio.c
src-$(CONFIG_HAVE_GPIO_SDIO) += $(sdio-src-y)
usb-src-$(CONFIG_HAVE_STM32_USBFS) := stm32/usbfs.c