From 7a2f60c43deeea71f2fd86e2f22c812556e2aea7 Mon Sep 17 00:00:00 2001 From: Hierophect Date: Thu, 3 Oct 2019 15:23:45 -0400 Subject: [PATCH 1/3] Add Always Build flag, remove redundancy --- ports/stm32f4/mpconfigport.mk | 4 ---- py/circuitpy_mpconfig.mk | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ports/stm32f4/mpconfigport.mk b/ports/stm32f4/mpconfigport.mk index 0dd4862ec5..985c4a18ae 100644 --- a/ports/stm32f4/mpconfigport.mk +++ b/ports/stm32f4/mpconfigport.mk @@ -20,10 +20,6 @@ CIRCUITPY_DIGITALIO = 1 CIRCUITPY_ANALOGIO = 1 CIRCUITPY_MICROCONTROLLER = 1 CIRCUITPY_BUSIO = 1 -CIRCUITPY_TIME = 1 -CIRCUITPY_OS = 1 -CIRCUITPY_STRUCT = 1 -CIRCUITPY_MATH = 1 #ifeq ($(MCU_SUB_VARIANT), stm32f412zx) #endif diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index c5756f4880..77607a3743 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -52,6 +52,11 @@ ifndef CIRCUITPY_DEFAULT_BUILD endif endif +# Some features have no unique HAL component, and thus there's never +# a reason to not include them. +ifndef CIRCUITPY_ALWAYS_BUILD + CIRCUITPY_ALWAYS_BUILD = 1 +endif # All builtin modules are listed below, with default values (0 for off, 1 for on) @@ -151,7 +156,7 @@ endif CFLAGS += -DCIRCUITPY_I2CSLAVE=$(CIRCUITPY_I2CSLAVE) ifndef CIRCUITPY_MATH -CIRCUITPY_MATH = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_MATH = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_MATH=$(CIRCUITPY_MATH) @@ -198,7 +203,7 @@ endif CFLAGS += -DCIRCUITPY_PS2IO=$(CIRCUITPY_PS2IO) ifndef CIRCUITPY_RANDOM -CIRCUITPY_RANDOM = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_RANDOM = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_RANDOM=$(CIRCUITPY_RANDOM) @@ -227,22 +232,22 @@ endif CFLAGS += -DCIRCUITPY_STAGE=$(CIRCUITPY_STAGE) ifndef CIRCUITPY_STORAGE -CIRCUITPY_STORAGE = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_STORAGE = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_STORAGE=$(CIRCUITPY_STORAGE) ifndef CIRCUITPY_STRUCT -CIRCUITPY_STRUCT = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_STRUCT = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_STRUCT=$(CIRCUITPY_STRUCT) ifndef CIRCUITPY_SUPERVISOR -CIRCUITPY_SUPERVISOR = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_SUPERVISOR = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_SUPERVISOR=$(CIRCUITPY_SUPERVISOR) ifndef CIRCUITPY_TIME -CIRCUITPY_TIME = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_TIME = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_TIME=$(CIRCUITPY_TIME) @@ -264,12 +269,12 @@ endif CFLAGS += -DCIRCUITPY_UHEAP=$(CIRCUITPY_UHEAP) ifndef CIRCUITPY_USB_HID -CIRCUITPY_USB_HID = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_USB_HID = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_USB_HID=$(CIRCUITPY_USB_HID) ifndef CIRCUITPY_USB_MIDI -CIRCUITPY_USB_MIDI = $(CIRCUITPY_DEFAULT_BUILD) +CIRCUITPY_USB_MIDI = $(CIRCUITPY_ALWAYS_BUILD) endif CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI) From dc4abb922bc7209d29dfb116e13dd58eec874289 Mon Sep 17 00:00:00 2001 From: Hierophect Date: Thu, 3 Oct 2019 15:40:46 -0400 Subject: [PATCH 2/3] Revert accidental OS delete --- ports/stm32f4/mpconfigport.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/stm32f4/mpconfigport.mk b/ports/stm32f4/mpconfigport.mk index 985c4a18ae..93b22dc6af 100644 --- a/ports/stm32f4/mpconfigport.mk +++ b/ports/stm32f4/mpconfigport.mk @@ -20,6 +20,7 @@ CIRCUITPY_DIGITALIO = 1 CIRCUITPY_ANALOGIO = 1 CIRCUITPY_MICROCONTROLLER = 1 CIRCUITPY_BUSIO = 1 +CIRCUITPY_OS = 1 #ifeq ($(MCU_SUB_VARIANT), stm32f412zx) #endif From e017a5925d165fc5748e1f0a3f985339f3e75f88 Mon Sep 17 00:00:00 2001 From: Hierophect Date: Fri, 4 Oct 2019 15:01:33 -0400 Subject: [PATCH 3/3] Revert modules with missed dependence --- py/circuitpy_mpconfig.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 77607a3743..ac79d32d04 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -203,7 +203,7 @@ endif CFLAGS += -DCIRCUITPY_PS2IO=$(CIRCUITPY_PS2IO) ifndef CIRCUITPY_RANDOM -CIRCUITPY_RANDOM = $(CIRCUITPY_ALWAYS_BUILD) +CIRCUITPY_RANDOM = $(CIRCUITPY_DEFAULT_BUILD) endif CFLAGS += -DCIRCUITPY_RANDOM=$(CIRCUITPY_RANDOM) @@ -232,7 +232,7 @@ endif CFLAGS += -DCIRCUITPY_STAGE=$(CIRCUITPY_STAGE) ifndef CIRCUITPY_STORAGE -CIRCUITPY_STORAGE = $(CIRCUITPY_ALWAYS_BUILD) +CIRCUITPY_STORAGE = $(CIRCUITPY_DEFAULT_BUILD) endif CFLAGS += -DCIRCUITPY_STORAGE=$(CIRCUITPY_STORAGE) @@ -269,12 +269,12 @@ endif CFLAGS += -DCIRCUITPY_UHEAP=$(CIRCUITPY_UHEAP) ifndef CIRCUITPY_USB_HID -CIRCUITPY_USB_HID = $(CIRCUITPY_ALWAYS_BUILD) +CIRCUITPY_USB_HID = $(CIRCUITPY_DEFAULT_BUILD) endif CFLAGS += -DCIRCUITPY_USB_HID=$(CIRCUITPY_USB_HID) ifndef CIRCUITPY_USB_MIDI -CIRCUITPY_USB_MIDI = $(CIRCUITPY_ALWAYS_BUILD) +CIRCUITPY_USB_MIDI = $(CIRCUITPY_DEFAULT_BUILD) endif CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI)