diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2025-04-09 13:01:59 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2025-04-16 13:54:44 -0400 |
commit | d93645a7504e75727b7caa891fc16738110efd02 (patch) | |
tree | 8cd67f5d08ff9b8b585c3edd09b8281d147c815e /src | |
parent | 8c67adc164d15d898b90fce6351190399f86d6f3 (diff) | |
download | kutter-d93645a7504e75727b7caa891fc16738110efd02.tar.gz kutter-d93645a7504e75727b7caa891fc16738110efd02.tar.xz kutter-d93645a7504e75727b7caa891fc16738110efd02.zip |
stm32: Simplify Makefile
Breakout selection of timer and gpioperiph objects.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/stm32/Makefile | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/src/stm32/Makefile b/src/stm32/Makefile index 6b0505a5..1ce30c51 100644 --- a/src/stm32/Makefile +++ b/src/stm32/Makefile @@ -40,32 +40,21 @@ $(OUT)klipper.elf: $(OUT)src/generic/armcm_link.ld src-y += stm32/watchdog.c stm32/gpio.c stm32/clockline.c stm32/dfu_reboot.c src-y += generic/crc16_ccitt.c 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_STM32F103) += ../lib/stm32f1/system_stm32f1xx.c -src-$(CONFIG_MACH_N32G45x) += ../lib/stm32f1/system_stm32f1xx.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 -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 -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 -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_STM32G4) += ../lib/stm32g4/system_stm32g4xx.c -src-$(CONFIG_MACH_STM32G4) += stm32/stm32g4.c generic/armcm_timer.c -src-$(CONFIG_MACH_STM32G4) += stm32/gpioperiph.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 -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_STM32F0) += stm32/stm32f0.c ../lib/stm32f0/system_stm32f0xx.c +src-$(CONFIG_MACH_STM32F1) += stm32/stm32f1.c ../lib/stm32f1/system_stm32f1xx.c +src-$(CONFIG_MACH_STM32F2) += stm32/stm32f4.c ../lib/stm32f2/system_stm32f2xx.c +src-$(CONFIG_MACH_STM32F4) += stm32/stm32f4.c ../lib/stm32f4/system_stm32f4xx.c +src-$(CONFIG_MACH_STM32F7) += stm32/stm32f7.c ../lib/stm32f7/system_stm32f7xx.c +src-$(CONFIG_MACH_STM32G0) += stm32/stm32g0.c +src-$(CONFIG_MACH_STM32G4) += stm32/stm32g4.c ../lib/stm32g4/system_stm32g4xx.c +src-$(CONFIG_MACH_STM32H7) += stm32/stm32h7.c ../lib/stm32h7/system_stm32h7xx.c +src-$(CONFIG_MACH_STM32L4) += stm32/stm32l4.c ../lib/stm32l4/system_stm32l4xx.c +timer-src-y := generic/armcm_timer.c +timer-src-$(CONFIG_MACH_STM32F0) := generic/timer_irq.c stm32/stm32f0_timer.c +timer-src-$(CONFIG_MACH_STM32G0) := generic/timer_irq.c stm32/stm32f0_timer.c +gpio-src-y := stm32/gpioperiph.c +gpio-src-$(CONFIG_MACH_STM32F1) := +src-y += $(timer-src-y) $(gpio-src-y) adc-src-y := stm32/adc.c adc-src-$(CONFIG_MACH_STM32F0) := stm32/stm32f0_adc.c adc-src-$(CONFIG_MACH_N32G45x) := ../lib/n32g45x/n32g45x_adc.c stm32/n32g45x_adc.c @@ -82,17 +71,15 @@ 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 -usb-src-$(CONFIG_HAVE_STM32_USBOTG) := stm32/usbotg.c -src-$(CONFIG_USBSERIAL) += $(usb-src-y) stm32/chipid.c generic/usb_cdc.c serial-src-y := stm32/serial.c serial-src-$(CONFIG_MACH_STM32F0) := stm32/stm32f0_serial.c serial-src-$(CONFIG_MACH_STM32G0) := stm32/stm32f0_serial.c serial-src-$(CONFIG_MACH_STM32G4) := stm32/stm32f0_serial.c serial-src-$(CONFIG_MACH_STM32H7) := stm32/stm32f0_serial.c src-$(CONFIG_SERIAL) += $(serial-src-y) generic/serial_irq.c +usb-src-$(CONFIG_HAVE_STM32_USBFS) := stm32/usbfs.c +usb-src-$(CONFIG_HAVE_STM32_USBOTG) := stm32/usbotg.c +src-$(CONFIG_USBSERIAL) += $(usb-src-y) stm32/chipid.c generic/usb_cdc.c canbus-src-y := generic/canserial.c ../lib/fast-hash/fasthash.c canbus-src-$(CONFIG_HAVE_STM32_CANBUS) += stm32/can.c canbus-src-$(CONFIG_HAVE_STM32_FDCANBUS) += stm32/fdcan.c @@ -100,6 +87,7 @@ src-$(CONFIG_CANSERIAL) += $(canbus-src-y) generic/canbus.c stm32/chipid.c src-$(CONFIG_USBCANBUS) += $(usb-src-y) $(canbus-src-y) src-$(CONFIG_USBCANBUS) += stm32/chipid.c generic/usb_canbus.c src-$(CONFIG_WANT_HARD_PWM) += stm32/hard_pwm.c +src-$(CONFIG_HAVE_GPIO_SDIO) += stm32/sdio.c # Binary output file rules target-y += $(OUT)klipper.bin |