aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/hal.mk
blob: bd3ec01327ece44cfc8189a56a46926f6edea739 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# List of all the ChibiOS/HAL files, there is no need to remove the files
# from this list, you can disable parts of the HAL by editing halconf.h.
ifeq ($(USE_SMART_BUILD),yes)

# Configuration files directory
ifeq ($(CONFDIR),)
  CONFDIR = .
endif

HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define"))

HALSRC := $(CHIBIOS)/os/hal/src/hal.c \
          $(CHIBIOS)/os/hal/src/hal_st.c \
          $(CHIBIOS)/os/hal/src/hal_buffers.c \
          $(CHIBIOS)/os/hal/src/hal_queues.c \
          $(CHIBIOS)/os/hal/src/hal_mmcsd.c
ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_adc.c
endif
ifneq ($(findstring HAL_USE_CAN TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_can.c
endif
ifneq ($(findstring HAL_USE_CRY TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_crypto.c
endif
ifneq ($(findstring HAL_USE_DAC TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_dac.c
endif
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_ext.c
endif
ifneq ($(findstring HAL_USE_GPT TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_gpt.c
endif
ifneq ($(findstring HAL_USE_I2C TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_i2c.c
endif
ifneq ($(findstring HAL_USE_I2S TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_i2s.c
endif
ifneq ($(findstring HAL_USE_ICU TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_icu.c
endif
ifneq ($(findstring HAL_USE_MAC TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_mac.c
endif
ifneq ($(findstring HAL_USE_MMC_SPI TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_mmc_spi.c
endif
ifneq ($(findstring HAL_USE_PAL TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_pal.c
endif
ifneq ($(findstring HAL_USE_PWM TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_pwm.c
endif
ifneq ($(findstring HAL_USE_QSPI TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_qspi.c
endif
ifneq ($(findstring HAL_USE_RTC TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_rtc.c
endif
ifneq ($(findstring HAL_USE_SDC TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_sdc.c
endif
ifneq ($(findstring HAL_USE_SERIAL TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_serial.c
endif
ifneq ($(findstring HAL_USE_SERIAL_USB TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_serial_usb.c
endif
ifneq ($(findstring HAL_USE_SIO TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_sio.c
endif
ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_spi.c
endif
ifneq ($(findstring HAL_USE_TRNG TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_trng.c
endif
ifneq ($(findstring HAL_USE_UART TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_uart.c
endif
ifneq ($(findstring HAL_USE_USB TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_usb.c
endif
ifneq ($(findstring HAL_USE_WDG TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_wdg.c
endif
ifneq ($(findstring HAL_USE_WSPI TRUE,$(HALCONF)),)
HALSRC += $(CHIBIOS)/os/hal/src/hal_wspi.c
endif
else
HALSRC = $(CHIBIOS)/os/hal/src/hal.c \
         $(CHIBIOS)/os/hal/src/hal_buffers.c \
         $(CHIBIOS)/os/hal/src/hal_queues.c \
         $(CHIBIOS)/os/hal/src/hal_mmcsd.c \
         $(CHIBIOS)/os/hal/src/hal_adc.c \
         $(CHIBIOS)/os/hal/src/hal_can.c \
         $(CHIBIOS)/os/hal/src/hal_crypto.c \
         $(CHIBIOS)/os/hal/src/hal_dac.c \
         $(CHIBIOS)/os/hal/src/hal_ext.c \
         $(CHIBIOS)/os/hal/src/hal_gpt.c \
         $(CHIBIOS)/os/hal/src/hal_i2c.c \
         $(CHIBIOS)/os/hal/src/hal_i2s.c \
         $(CHIBIOS)/os/hal/src/hal_icu.c \
         $(CHIBIOS)/os/hal/src/hal_mac.c \
         $(CHIBIOS)/os/hal/src/hal_mmc_spi.c \
         $(CHIBIOS)/os/hal/src/hal_pal.c \
         $(CHIBIOS)/os/hal/src/hal_pwm.c \
         $(CHIBIOS)/os/hal/src/hal_qspi.c \
         $(CHIBIOS)/os/hal/src/hal_rtc.c \
         $(CHIBIOS)/os/hal/src/hal_sdc.c \
         $(CHIBIOS)/os/hal/src/hal_serial.c \
         $(CHIBIOS)/os/hal/src/hal_serial_usb.c \
         $(CHIBIOS)/os/hal/src/hal_sio.c \
         $(CHIBIOS)/os/hal/src/hal_spi.c \
         $(CHIBIOS)/os/hal/src/hal_st.c \
         $(CHIBIOS)/os/hal/src/hal_trng.c \
         $(CHIBIOS)/os/hal/src/hal_uart.c \
         $(CHIBIOS)/os/hal/src/hal_usb.c \
         $(CHIBIOS)/os/hal/src/hal_wdg.c \
         $(CHIBIOS)/os/hal/src/hal_wspi.c
endif

# Required include directories
HALINC = $(CHIBIOS)/os/hal/include

# Shared variables
ALLCSRC += $(HALSRC)
ALLINC  += $(HALINC)