Skip to content

Commit 2e4a6b9

Browse files
committed
atmel-samd: get most constrained m0 builds to work again
By tweaking the optimizer flags, we can get back a few hundred bytes and allow these builds to work with the gcc9 compiler.
1 parent eb44b2b commit 2e4a6b9

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

ports/atmel-samd/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ else
122122
ifdef CFLAGS_INLINE_LIMIT
123123
CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT)
124124
endif
125+
125126
CFLAGS += -flto -flto-partition=none
127+
128+
ifdef CFLAGS_BOARD
129+
CFLAGS += $(CFLAGS_BOARD)
130+
endif
126131
endif
127132

128133
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT)

ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ SUPEROPT_GC = 0
2929
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
3030
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
3131
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IRRemote
32+
33+
CFLAGS_BOARD = --param inline-unit-growth=15 --param max-inline-insns-auto=20

ports/atmel-samd/boards/pyruler/mpconfigboard.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ LONGINT_IMPL = NONE
1212
CIRCUITPY_SMALL_BUILD = 1
1313

1414
SUPEROPT_GC = 0
15+
16+
CFLAGS_BOARD = --param inline-unit-growth=15 --param max-inline-insns-auto=20

ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ LONGINT_IMPL = NONE
1212
CIRCUITPY_SMALL_BUILD = 1
1313

1414
SUPEROPT_GC = 0
15+
16+
CFLAGS_BOARD = --param inline-unit-growth=15 --param max-inline-insns-auto=20

0 commit comments

Comments
 (0)