platform.mk 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Required platform files.
  2. PLATFORMSRC := $(CHIBIOS)/os/hal/ports/common/ARMCMx/nvic.c \
  3. $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/stm32_isr.c \
  4. $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/hal_lld.c
  5. # Required include directories.
  6. PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
  7. $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx
  8. # Optional platform files.
  9. ifeq ($(USE_SMART_BUILD),yes)
  10. # Configuration files directory
  11. ifeq ($(HALCONFDIR),)
  12. ifeq ($(CONFDIR),)
  13. HALCONFDIR = .
  14. else
  15. HALCONFDIR := $(CONFDIR)
  16. endif
  17. endif
  18. HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define"))
  19. ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),)
  20. PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c
  21. endif
  22. else
  23. PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c
  24. endif
  25. # Drivers compatible with the platform.
  26. include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk
  27. include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk
  28. include $(CHIBIOS)/os/hal/ports/STM32/LLD/GPIOv2/driver.mk
  29. include $(CHIBIOS)/os/hal/ports/STM32/LLD/I2Cv1/driver.mk
  30. include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv2/driver.mk
  31. include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv1/driver.mk
  32. include $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1/driver.mk
  33. include $(CHIBIOS)/os/hal/ports/STM32/LLD/USARTv1/driver.mk
  34. include $(CHIBIOS)/os/hal/ports/STM32/LLD/USBv1/driver.mk
  35. include $(CHIBIOS)/os/hal/ports/STM32/LLD/xWDGv1/driver.mk
  36. # Shared variables
  37. ALLCSRC += $(PLATFORMSRC)
  38. ALLINC += $(PLATFORMINC)