diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-03 11:07:07 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-03 11:07:07 +0000 |
commit | c9e95d85ff61e631a4c7f0dd283a567a6dc751a9 (patch) | |
tree | bc0b7ce4ee2de94eaa6a97b05f8540ec36ecd064 /os | |
parent | e558e86d7401239a9ba369bfac298bdead236ecc (diff) | |
download | ChibiOS-c9e95d85ff61e631a4c7f0dd283a567a6dc751a9.tar.gz ChibiOS-c9e95d85ff61e631a4c7f0dd283a567a6dc751a9.tar.bz2 ChibiOS-c9e95d85ff61e631a4c7f0dd283a567a6dc751a9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9234 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/common/platform.mk | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/os/hal/ports/common/platform.mk b/os/hal/ports/common/platform.mk index d123a5d0f..15d5a087a 100644 --- a/os/hal/ports/common/platform.mk +++ b/os/hal/ports/common/platform.mk @@ -1,4 +1,64 @@ # List of all the template platform files.
+ifeq ($(USE_SMART_BUILD),yes)
+HALCONF := $(strip $(shell cat halconf.h | egrep -e "\#define"))
+
+PLATFORMSRC := ${CHIBIOS}/os/hal/templates/hal_lld.c \
+ ${CHIBIOS}/os/hal/templates/hal_st_lld.c
+ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_adc_lld.c
+endif
+ifneq ($(findstring HAL_USE_CAN TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_can_lld.c
+endif
+ifneq ($(findstring HAL_USE_DAC TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_dac_lld.c
+endif
+ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_ext_lld.c
+endif
+ifneq ($(findstring HAL_USE_GPT TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_gpt_lld.c
+endif
+ifneq ($(findstring HAL_USE_I2C TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_i2c_lld.c
+endif
+ifneq ($(findstring HAL_USE_I2S TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_i2s_lld.c
+endif
+ifneq ($(findstring HAL_USE_ICU TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_icu_lld.c
+endif
+ifneq ($(findstring HAL_USE_MAC TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_mac_lld.c
+endif
+ifneq ($(findstring HAL_USE_PAL TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_pal_lld.c
+endif
+ifneq ($(findstring HAL_USE_PWM TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_pwm_lld.c
+endif
+ifneq ($(findstring HAL_USE_RTC TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_rtc_lld.c
+endif
+ifneq ($(findstring HAL_USE_SDC TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_sdc_lld.c
+endif
+ifneq ($(findstring HAL_USE_SERIAL TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_serial_lld.c
+endif
+ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_spi_lld.c
+endif
+ifneq ($(findstring HAL_USE_UART TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_uart_lld.c
+endif
+ifneq ($(findstring HAL_USE_USB TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_usb_lld.c
+endif
+ifneq ($(findstring HAL_USE_WDG TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_wdg_lld.c
+endif
+else
PLATFORMSRC = ${CHIBIOS}/os/hal/templates/hal_lld.c \
${CHIBIOS}/os/hal/templates/hal_adc_lld.c \
${CHIBIOS}/os/hal/templates/hal_can_lld.c \
@@ -19,6 +79,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/templates/hal_lld.c \ ${CHIBIOS}/os/hal/templates/hal_uart_lld.c \
${CHIBIOS}/os/hal/templates/hal_usb_lld.c \
${CHIBIOS}/os/hal/templates/hal_wdg_lld.c
+endif
# Required include directories
PLATFORMINC = ${CHIBIOS}/os/hal/templates
|