diff options
Diffstat (limited to 'lib/chibios/os/hal/templates/platform.mk')
-rw-r--r-- | lib/chibios/os/hal/templates/platform.mk | 111 |
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. | ||
2 | ifeq ($(USE_SMART_BUILD),yes) | ||
3 | |||
4 | # Configuration files directory | ||
5 | ifeq ($(CONFDIR),) | ||
6 | CONFDIR = . | ||
7 | endif | ||
8 | |||
9 | HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) | ||
10 | |||
11 | PLATFORMSRC := ${CHIBIOS}/os/hal/templates/hal_lld.c \ | ||
12 | ${CHIBIOS}/os/hal/templates/hal_st_lld.c | ||
13 | ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),) | ||
14 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_adc_lld.c | ||
15 | endif | ||
16 | ifneq ($(findstring HAL_USE_CAN TRUE,$(HALCONF)),) | ||
17 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_can_lld.c | ||
18 | endif | ||
19 | ifneq ($(findstring HAL_USE_CRY TRUE,$(HALCONF)),) | ||
20 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_crypto_lld.c | ||
21 | endif | ||
22 | ifneq ($(findstring HAL_USE_DAC TRUE,$(HALCONF)),) | ||
23 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_dac_lld.c | ||
24 | endif | ||
25 | ifneq ($(findstring HAL_USE_EFL TRUE,$(HALCONF)),) | ||
26 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_efl_lld.c | ||
27 | endif | ||
28 | ifneq ($(findstring HAL_USE_GPT TRUE,$(HALCONF)),) | ||
29 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_gpt_lld.c | ||
30 | endif | ||
31 | ifneq ($(findstring HAL_USE_I2C TRUE,$(HALCONF)),) | ||
32 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_i2c_lld.c | ||
33 | endif | ||
34 | ifneq ($(findstring HAL_USE_I2S TRUE,$(HALCONF)),) | ||
35 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_i2s_lld.c | ||
36 | endif | ||
37 | ifneq ($(findstring HAL_USE_ICU TRUE,$(HALCONF)),) | ||
38 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_icu_lld.c | ||
39 | endif | ||
40 | ifneq ($(findstring HAL_USE_MAC TRUE,$(HALCONF)),) | ||
41 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_mac_lld.c | ||
42 | endif | ||
43 | ifneq ($(findstring HAL_USE_PAL TRUE,$(HALCONF)),) | ||
44 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_pal_lld.c | ||
45 | endif | ||
46 | ifneq ($(findstring HAL_USE_PWM TRUE,$(HALCONF)),) | ||
47 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_pwm_lld.c | ||
48 | endif | ||
49 | ifneq ($(findstring HAL_USE_RTC TRUE,$(HALCONF)),) | ||
50 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_rtc_lld.c | ||
51 | endif | ||
52 | ifneq ($(findstring HAL_USE_SDC TRUE,$(HALCONF)),) | ||
53 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_sdc_lld.c | ||
54 | endif | ||
55 | ifneq ($(findstring HAL_USE_SERIAL TRUE,$(HALCONF)),) | ||
56 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_serial_lld.c | ||
57 | endif | ||
58 | ifneq ($(findstring HAL_USE_SIO TRUE,$(HALCONF)),) | ||
59 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_sio_lld.c | ||
60 | endif | ||
61 | ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),) | ||
62 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_spi_lld.c | ||
63 | endif | ||
64 | ifneq ($(findstring HAL_USE_TRNG TRUE,$(HALCONF)),) | ||
65 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_trng_lld.c | ||
66 | endif | ||
67 | ifneq ($(findstring HAL_USE_UART TRUE,$(HALCONF)),) | ||
68 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_uart_lld.c | ||
69 | endif | ||
70 | ifneq ($(findstring HAL_USE_USB TRUE,$(HALCONF)),) | ||
71 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_usb_lld.c | ||
72 | endif | ||
73 | ifneq ($(findstring HAL_USE_WDG TRUE,$(HALCONF)),) | ||
74 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_wdg_lld.c | ||
75 | endif | ||
76 | ifneq ($(findstring HAL_USE_WSPI TRUE,$(HALCONF)),) | ||
77 | PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_wspi_lld.c | ||
78 | endif | ||
79 | else | ||
80 | PLATFORMSRC = ${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 | ||
104 | endif | ||
105 | |||
106 | # Required include directories | ||
107 | PLATFORMINC = ${CHIBIOS}/os/hal/templates | ||
108 | |||
109 | # Shared variables | ||
110 | ALLCSRC += $(PLATFORMSRC) | ||
111 | ALLINC += $(PLATFORMINC) | ||