forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 4
/
mpconfigport.mk
170 lines (142 loc) · 3.93 KB
/
mpconfigport.mk
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Use internal flash for CIRCUITPY drive
INTERNAL_FLASH_FILESYSTEM = 1
# Internal math library is substantially smaller than toolchain one
INTERNAL_LIBM = 0
# Longints can be implemented as mpz, as longlong, or not
LONGINT_IMPL = MPZ
# Default to no-psram
CIRCUITPY_ESP_PSRAM_SIZE ?= 0
# Enable more features
CIRCUITPY_FULL_BUILD ?= 1
# If SSL is enabled, it's mbedtls
CIRCUITPY_SSL_MBEDTLS = 1
# These modules are implemented in ports/<port>/common-hal:
CIRCUITPY_ALARM ?= 1
CIRCUITPY_ANALOGBUFIO ?= 1
CIRCUITPY_AUDIOBUSIO ?= 1
CIRCUITPY_AUDIOBUSIO_PDMIN ?= 0
CIRCUITPY_AUDIOIO ?= 0
CIRCUITPY_AUDIOMP3 ?= 0
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_CANIO ?= 1
CIRCUITPY_COUNTIO ?= 1
CIRCUITPY_DUALBANK ?= 1
CIRCUITPY_ESPCAMERA ?= 1
CIRCUITPY_ESPIDF ?= 1
CIRCUITPY_ESPULP ?= 1
CIRCUITPY_FRAMEBUFFERIO ?= 1
CIRCUITPY_FREQUENCYIO ?= 1
CIRCUITPY_HASHLIB ?= 1
CIRCUITPY_I2CTARGET ?= 0
CIRCUITPY_MEMORYMAP ?= 1
CIRCUITPY_NVM ?= 1
CIRCUITPY_PARALLELDISPLAYBUS ?= 1
CIRCUITPY_PS2IO ?= 1
CIRCUITPY_RGBMATRIX ?= 1
CIRCUITPY_ROTARYIO ?= 1
CIRCUITPY_SYNTHIO_MAX_CHANNELS ?= 12
CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1
CIRCUITPY_WATCHDOG ?= 1
CIRCUITPY_WIFI ?= 1
# Conditionally turn off modules/features
ifeq ($(IDF_TARGET),esp32)
# Modules
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_BLEIO = 0
# Features
CIRCUITPY_USB = 0
else ifeq ($(IDF_TARGET),esp32c3)
# Modules
CIRCUITPY_ALARM = 0
CIRCUITPY_BLEIO ?= 0
CIRCUITPY_ESPCAMERA = 0
CIRCUITPY_ESPULP = 0
CIRCUITPY_MEMORYMAP = 0
# No I80 support from the IDF
CIRCUITPY_PARALLELDISPLAYBUS = 0
# No PCNT peripheral
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_TOUCHIO ?= 1
CIRCUITPY_TOUCHIO_USE_NATIVE = 0
# Features
CIRCUITPY_USB = 0
CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1
else ifeq ($(IDF_TARGET),esp32c6)
# Modules
CIRCUITPY_ALARM = 0
CIRCUITPY_BLEIO ?= 0
CIRCUITPY_ESPCAMERA = 0
CIRCUITPY_ESPULP = 0
CIRCUITPY_MEMORYMAP = 0
CIRCUITPY_RGBMATRIX = 0
# No space for this
CIRCUITPY_AUDIOBUSIO = 0
# No I80 support from the IDF
CIRCUITPY_PARALLELDISPLAYBUS = 0
CIRCUITPY_TOUCHIO ?= 1
CIRCUITPY_TOUCHIO_USE_NATIVE = 0
# Features
CIRCUITPY_USB = 0
CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1
else ifeq ($(IDF_TARGET),esp32h2)
# Modules
CIRCUITPY_ALARM = 0
CIRCUITPY_BLEIO ?= 1
CIRCUITPY_ESPCAMERA = 0
CIRCUITPY_ESPULP = 0
CIRCUITPY_MEMORYMAP = 0
CIRCUITPY_RGBMATRIX = 0
# No I80 support from the IDF
CIRCUITPY_PARALLELDISPLAYBUS = 0
CIRCUITPY_TOUCHIO ?= 1
CIRCUITPY_TOUCHIO_USE_NATIVE = 0
CIRCUITPY_HASHLIB_MBEDTLS_ONLY = 0
# Features
CIRCUITPY_USB = 0
CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1
CIRCUITPY_WIFI = 0
else ifeq ($(IDF_TARGET),esp32s2)
# Modules
# No BLE in hw
CIRCUITPY_BLEIO = 0
CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0
else ifeq ($(IDF_TARGET),esp32s3)
# Modules
CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0
# No room for _bleio on boards with 4MB flash
ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),4MB)
CIRCUITPY_BLEIO ?= 0
else
CIRCUITPY_BLEIO ?= 1
endif
endif
# No room for dualbank on boards with 2MB flash
ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),2MB)
CIRCUITPY_DUALBANK = 0
endif
# Modules dependent on other modules
CIRCUITPY_ESPNOW ?= $(CIRCUITPY_WIFI)
CIRCUITPY_GIFIO ?= $(CIRCUITPY_DISPLAYIO)
CIRCUITPY_JPEGIO ?= $(CIRCUITPY_DISPLAYIO)
CIRCUITPY_QRIO ?= $(CIRCUITPY_ESPCAMERA)
# Features dependent on other features
ifneq ($(CIRCUITPY_USB),0)
CIRCUITPY_BUILD_EXTENSIONS ?= bin,uf2
else
CIRCUITPY_BUILD_EXTENSIONS ?= bin
endif
# From ESP32-S2/S3 Technical Reference Manual:
#
# Endpoint number 0 always present (bi-directional, consisting of EP0 IN and EP0 OUT)
# Six additional endpoints (endpoint numbers 1 to 6), configurable as IN or OUT
# Maximum of five IN endpoints concurrently active at any time (including EP0 IN)
#
# Due to the limited number of endpoints, some USB devices will be off by default.
# For instance MIDI is available, but the device is turned off. It can be turned on
# only if something else is turned off, such as HID.
USB_NUM_ENDPOINT_PAIRS = 7
USB_NUM_IN_ENDPOINTS = 5
# Usually lots of flash space available
CIRCUITPY_MESSAGE_COMPRESSION_LEVEL ?= 1