aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/templates/platform.mk
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/templates/platform.mk')
-rw-r--r--lib/chibios/os/hal/templates/platform.mk111
1 files changed, 111 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/templates/platform.mk b/lib/chibios/os/hal/templates/platform.mk
new file mode 100644
index 000000000..9d706d56c
--- /dev/null
+++ b/lib/chibios/os/hal/templates/platform.mk
@@ -0,0 +1,111 @@
1# List of all the template platform files.
2ifeq ($(USE_SMART_BUILD),yes)
3
4# Configuration files directory
5ifeq ($(CONFDIR),)
6 CONFDIR = .
7endif
8
9HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define"))
10
11PLATFORMSRC := ${CHIBIOS}/os/hal/templates/hal_lld.c \
12 ${CHIBIOS}/os/hal/templates/hal_st_lld.c
13ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),)
14PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_adc_lld.c
15endif
16ifneq ($(findstring HAL_USE_CAN TRUE,$(HALCONF)),)
17PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_can_lld.c
18endif
19ifneq ($(findstring HAL_USE_CRY TRUE,$(HALCONF)),)
20PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_crypto_lld.c
21endif
22ifneq ($(findstring HAL_USE_DAC TRUE,$(HALCONF)),)
23PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_dac_lld.c
24endif
25ifneq ($(findstring HAL_USE_EFL TRUE,$(HALCONF)),)
26PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_efl_lld.c
27endif
28ifneq ($(findstring HAL_USE_GPT TRUE,$(HALCONF)),)
29PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_gpt_lld.c
30endif
31ifneq ($(findstring HAL_USE_I2C TRUE,$(HALCONF)),)
32PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_i2c_lld.c
33endif
34ifneq ($(findstring HAL_USE_I2S TRUE,$(HALCONF)),)
35PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_i2s_lld.c
36endif
37ifneq ($(findstring HAL_USE_ICU TRUE,$(HALCONF)),)
38PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_icu_lld.c
39endif
40ifneq ($(findstring HAL_USE_MAC TRUE,$(HALCONF)),)
41PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_mac_lld.c
42endif
43ifneq ($(findstring HAL_USE_PAL TRUE,$(HALCONF)),)
44PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_pal_lld.c
45endif
46ifneq ($(findstring HAL_USE_PWM TRUE,$(HALCONF)),)
47PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_pwm_lld.c
48endif
49ifneq ($(findstring HAL_USE_RTC TRUE,$(HALCONF)),)
50PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_rtc_lld.c
51endif
52ifneq ($(findstring HAL_USE_SDC TRUE,$(HALCONF)),)
53PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_sdc_lld.c
54endif
55ifneq ($(findstring HAL_USE_SERIAL TRUE,$(HALCONF)),)
56PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_serial_lld.c
57endif
58ifneq ($(findstring HAL_USE_SIO TRUE,$(HALCONF)),)
59PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_sio_lld.c
60endif
61ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),)
62PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_spi_lld.c
63endif
64ifneq ($(findstring HAL_USE_TRNG TRUE,$(HALCONF)),)
65PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_trng_lld.c
66endif
67ifneq ($(findstring HAL_USE_UART TRUE,$(HALCONF)),)
68PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_uart_lld.c
69endif
70ifneq ($(findstring HAL_USE_USB TRUE,$(HALCONF)),)
71PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_usb_lld.c
72endif
73ifneq ($(findstring HAL_USE_WDG TRUE,$(HALCONF)),)
74PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_wdg_lld.c
75endif
76ifneq ($(findstring HAL_USE_WSPI TRUE,$(HALCONF)),)
77PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_wspi_lld.c
78endif
79else
80PLATFORMSRC = ${CHIBIOS}/os/hal/templates/hal_lld.c \
81 ${CHIBIOS}/os/hal/templates/hal_adc_lld.c \
82 ${CHIBIOS}/os/hal/templates/hal_can_lld.c \
83 ${CHIBIOS}/os/hal/templates/hal_crypto_lld.c \
84 ${CHIBIOS}/os/hal/templates/hal_dac_lld.c \
85 ${CHIBIOS}/os/hal/templates/hal_efl_lld.c \
86 ${CHIBIOS}/os/hal/templates/hal_gpt_lld.c \
87 ${CHIBIOS}/os/hal/templates/hal_i2c_lld.c \
88 ${CHIBIOS}/os/hal/templates/hal_i2s_lld.c \
89 ${CHIBIOS}/os/hal/templates/hal_icu_lld.c \
90 ${CHIBIOS}/os/hal/templates/hal_mac_lld.c \
91 ${CHIBIOS}/os/hal/templates/hal_pal_lld.c \
92 ${CHIBIOS}/os/hal/templates/hal_pwm_lld.c \
93 ${CHIBIOS}/os/hal/templates/hal_rtc_lld.c \
94 ${CHIBIOS}/os/hal/templates/hal_sdc_lld.c \
95 ${CHIBIOS}/os/hal/templates/hal_serial_lld.c \
96 ${CHIBIOS}/os/hal/templates/hal_sio_lld.c \
97 ${CHIBIOS}/os/hal/templates/hal_spi_lld.c \
98 ${CHIBIOS}/os/hal/templates/hal_st_lld.c \
99 ${CHIBIOS}/os/hal/templates/hal_trng_lld.c \
100 ${CHIBIOS}/os/hal/templates/hal_uart_lld.c \
101 ${CHIBIOS}/os/hal/templates/hal_usb_lld.c \
102 ${CHIBIOS}/os/hal/templates/hal_wdg_lld.c \
103 ${CHIBIOS}/os/hal/templates/hal_wspi_lld.c
104endif
105
106# Required include directories
107PLATFORMINC = ${CHIBIOS}/os/hal/templates
108
109# Shared variables
110ALLCSRC += $(PLATFORMSRC)
111ALLINC += $(PLATFORMINC)