File tree Expand file tree Collapse file tree 6 files changed +12
-23
lines changed Expand file tree Collapse file tree 6 files changed +12
-23
lines changed Original file line number Diff line number Diff line change @@ -84,14 +84,21 @@ INC += -I../../lib/mp-readline
84
84
INC += -I../../lib/tinyusb/src
85
85
INC += -I../../supervisor/shared/usb
86
86
87
+ ifeq ($(MCU_CHIP ) ,nrf52833)
88
+ OPTIMIZATION_FLAGS ?= -Os -flto -flto-partition=one
89
+ else
90
+ ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
91
+ OPTIMIZATION_FLAGS ?= -Os -flto
92
+ endif
93
+ endif
94
+
87
95
# Debugging/Optimization
88
96
ifeq ($(DEBUG ) , 1)
89
97
CFLAGS += -ggdb3
90
98
OPTIMIZATION_FLAGS = -Og
91
99
else
92
100
OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
93
101
CFLAGS += -DNDEBUG -ggdb3
94
- # If -flto is needed, give it in OPTIMIZATION_FLAGS per board
95
102
endif
96
103
97
104
ifeq ($(NRF_DEBUG_PRINT ) , 1)
Original file line number Diff line number Diff line change @@ -45,9 +45,3 @@ CIRCUITPY_VECTORIO = 0
45
45
CIRCUITPY_ZLIB = 0
46
46
47
47
MICROPY_PY_ASYNC_AWAIT = 0
48
-
49
- SUPEROPT_GC = 0
50
- SUPEROPT_VM = 0
51
-
52
- # Override optimization to keep binary small
53
- OPTIMIZATION_FLAGS = -Os -flto -flto-partition=one
Original file line number Diff line number Diff line change @@ -28,8 +28,3 @@ CIRCUITPY_ULAB = 0
28
28
CIRCUITPY_USB = 0
29
29
30
30
MICROPY_PY_ASYNC_AWAIT = 0
31
-
32
- # Override optimization to keep binary small
33
- OPTIMIZATION_FLAGS = -Os -flto -flto-partition=one
34
- SUPEROPT_VM = 0
35
- SUPEROPT_GC = 0
Original file line number Diff line number Diff line change @@ -35,9 +35,3 @@ CIRCUITPY_VECTORIO = 0
35
35
CIRCUITPY_ZLIB = 0
36
36
37
37
MICROPY_PY_ASYNC_AWAIT = 0
38
-
39
- SUPEROPT_GC = 0
40
- SUPEROPT_VM = 0
41
-
42
- # Override optimization to keep binary small
43
- OPTIMIZATION_FLAGS = -Os -flto -flto-partition=one
Original file line number Diff line number Diff line change @@ -46,8 +46,3 @@ CIRCUITPY_ZLIB = 0
46
46
47
47
# Enable micropython.native
48
48
# CIRCUITPY_ENABLE_MPY_NATIVE = 1
49
-
50
- # Override optimization to keep binary small
51
- OPTIMIZATION_FLAGS = -Os -flto -flto-partition=one
52
- SUPEROPT_VM = 0
53
- SUPEROPT_GC = 0
Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ MCU_SERIES = m4
77
77
MCU_VARIANT = nrf52
78
78
MCU_SUB_VARIANT = nrf52833
79
79
80
+ # Need the space
81
+ SUPEROPT_GC ?= 0
82
+ SUPEROPT_VM ?= 0
83
+
80
84
SD ?= s140
81
85
SOFTDEV_VERSION ?= 7.0.1
82
86
You can’t perform that action at this time.
0 commit comments