aboutsummaryrefslogtreecommitdiff
path: root/atmel-samd/Makefile
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-08-31 13:48:30 -0400
committerGitHub <noreply@github.com>2017-08-31 13:48:30 -0400
commitfdb97eda09ca1968df8a919d15ebd1fe191fb57e (patch)
tree600ed31b4d8e7223719a6099fd862c11b9b73e9e /atmel-samd/Makefile
parentf3cd6b0232ababc573ebfb13de12c197e0be6b4d (diff)
Add microcontroller.cpu.temperature, for use as a simple sensor on minimal boards. (#211)
* Add microcontroller.cpu, the sole instance of microcontroller.Processor. microcontroller.cpu.frequency is the clock frequency, in Hz. microcontroller.cpu.temperature is the reading from the internal temperature sensor, in Celsius. None if not available. * Squeeze firmware size by using -finline-limit. Otherwise non-Express builds were slightly too big. * Update submodules. * Fix documentation glitches
Diffstat (limited to 'atmel-samd/Makefile')
-rw-r--r--atmel-samd/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/atmel-samd/Makefile b/atmel-samd/Makefile
index 2a9608bae..6fb2f1d67 100644
--- a/atmel-samd/Makefile
+++ b/atmel-samd/Makefile
@@ -135,7 +135,9 @@ ifeq ($(DEBUG), 1)
# -DMICROPY_DEBUG_MODULES may also be added to an -flto build, if you wish.
CFLAGS += -Os -ggdb -DNDEBUG -DENABLE_MICRO_TRACE_BUFFER -DMICROPY_DEBUG_MODULES
else
-CFLAGS += -Os -DNDEBUG -flto
+# -finline-limit can shrink the image size. -finline-limit=80 or so is similar to not having it on.
+# There is no simple default value, though.
+CFLAGS += -Os -DNDEBUG -flto -finline-limit=57
endif
ifneq ($(FROZEN_DIR),)
@@ -248,6 +250,7 @@ SRC_COMMON_HAL = \
digitalio/DigitalInOut.c \
microcontroller/__init__.c \
microcontroller/Pin.c \
+ microcontroller/Processor.c \
neopixel_write/__init__.c \
nvm/__init__.c \
nvm/ByteArray.c \