File tree Expand file tree Collapse file tree 6 files changed +53
-52
lines changed Expand file tree Collapse file tree 6 files changed +53
-52
lines changed Original file line number Diff line number Diff line change 16
16
$(error Invalid BOARD specified : $(BOARD_DIR ) )
17
17
endif
18
18
19
+ ifneq ($(BOARD_VARIANT ) ,)
20
+ ifeq ($(wildcard $(BOARD_DIR ) /mpconfigvariant_$(BOARD_VARIANT ) .mk) ,)
21
+ $(error Invalid BOARD_VARIANT specified : $(BOARD_VARIANT ) )
22
+ endif
23
+ endif
24
+
19
25
# If the build directory is not given, make it reflect the board name (and
20
26
# optionally the board variant).
21
27
ifneq ($(BOARD_VARIANT ) ,)
26
32
27
33
include ../../py/mkenv.mk
28
34
29
- # Optional
30
- -include $(BOARD_DIR ) /mpconfigboard.mk
35
+ # Include board specific .mk file, and optional board variant .mk file.
36
+ include $(BOARD_DIR ) /mpconfigboard.mk
37
+ ifeq ($(BOARD_VARIANT ) ,)
38
+ -include $(BOARD_DIR ) /mpconfigvariant.mk
39
+ else
40
+ include $(BOARD_DIR ) /mpconfigvariant_$(BOARD_VARIANT ) .mk
41
+ endif
31
42
32
43
# qstr definitions (must come before including py.mk)
33
44
QSTR_DEFS = qstrdefsport.h # $(BUILD)/pins_qstr.h
Original file line number Diff line number Diff line change 1
- ifeq ($(BOARD_VARIANT ) ,)
2
- LD_FILES = boards/esp8266_2MiB.ld
3
-
4
- MICROPY_PY_ESPNOW ?= 1
5
- MICROPY_PY_BTREE ?= 1
6
- MICROPY_VFS_FAT ?= 1
7
- MICROPY_VFS_LFS2 ?= 1
8
-
9
- # Add asyncio and extra micropython-lib packages (in addition to the port manifest).
10
- FROZEN_MANIFEST ?= $(BOARD_DIR ) /manifest_2MiB.py
11
-
12
- # Configure mpconfigboard.h.
13
- CFLAGS += -DMICROPY_ESP8266_2M
14
- endif
15
-
16
- ifeq ($(BOARD_VARIANT ) ,FLASH_1M)
17
- LD_FILES = boards/esp8266_1MiB.ld
18
-
19
- MICROPY_PY_ESPNOW ?= 1
20
- MICROPY_PY_BTREE ?= 1
21
- MICROPY_VFS_LFS2 ?= 1
22
-
23
- # Note: Implicitly uses the port manifest.
24
-
25
- # Configure mpconfigboard.h.
26
- CFLAGS += -DMICROPY_ESP8266_1M
27
- endif
28
-
29
- ifeq ($(BOARD_VARIANT ) ,OTA)
30
- LD_FILES = boards/esp8266_ota.ld
31
-
32
- MICROPY_PY_ESPNOW ?= 1
33
- MICROPY_PY_BTREE ?= 1
34
- MICROPY_VFS_LFS2 ?= 1
35
-
36
- # Note: Implicitly uses the port manifest.
37
-
38
- # Configure mpconfigboard.h.
39
- CFLAGS += -DMICROPY_ESP8266_1M
40
- endif
41
-
42
- ifeq ($(BOARD_VARIANT ) ,FLASH_512K)
43
- LD_FILES = boards/esp8266_512kiB.ld
44
-
45
- # Note: Use the minimal manifest.py.
46
- FROZEN_MANIFEST ?= $(BOARD_DIR ) /manifest_512kiB.py
47
-
48
- # Configure mpconfigboard.h.
49
- CFLAGS += -DMICROPY_ESP8266_512K
50
- endif
1
+ # There are no common .mk settings among the variants, so this file is empty.
Original file line number Diff line number Diff line change
1
+ LD_FILES = boards/esp8266_2MiB.ld
2
+
3
+ MICROPY_PY_ESPNOW ?= 1
4
+ MICROPY_PY_BTREE ?= 1
5
+ MICROPY_VFS_FAT ?= 1
6
+ MICROPY_VFS_LFS2 ?= 1
7
+
8
+ # Add asyncio and extra micropython-lib packages (in addition to the port manifest).
9
+ FROZEN_MANIFEST ?= $(BOARD_DIR ) /manifest_2MiB.py
10
+
11
+ # Configure mpconfigboard.h.
12
+ CFLAGS += -DMICROPY_ESP8266_2M
Original file line number Diff line number Diff line change
1
+ LD_FILES = boards/esp8266_1MiB.ld
2
+
3
+ MICROPY_PY_ESPNOW ?= 1
4
+ MICROPY_PY_BTREE ?= 1
5
+ MICROPY_VFS_LFS2 ?= 1
6
+
7
+ # Note: Implicitly uses the port manifest.
8
+
9
+ # Configure mpconfigboard.h.
10
+ CFLAGS += -DMICROPY_ESP8266_1M
Original file line number Diff line number Diff line change
1
+ LD_FILES = boards/esp8266_512kiB.ld
2
+
3
+ # Note: Use the minimal manifest.py.
4
+ FROZEN_MANIFEST ?= $(BOARD_DIR ) /manifest_512kiB.py
5
+
6
+ # Configure mpconfigboard.h.
7
+ CFLAGS += -DMICROPY_ESP8266_512K
Original file line number Diff line number Diff line change
1
+ LD_FILES = boards/esp8266_ota.ld
2
+
3
+ MICROPY_PY_ESPNOW ?= 1
4
+ MICROPY_PY_BTREE ?= 1
5
+ MICROPY_VFS_LFS2 ?= 1
6
+
7
+ # Note: Implicitly uses the port manifest.
8
+
9
+ # Configure mpconfigboard.h.
10
+ CFLAGS += -DMICROPY_ESP8266_1M
You can’t perform that action at this time.
0 commit comments