summaryrefslogtreecommitdiffstats
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2015-01-12 00:46:06 +0100
committercpldcpu <cpldcpu@gmail.com>2015-01-12 00:46:06 +0100
commit42f2d8cc38064c67a9478826f563f5110c3848ee (patch)
tree2add26052b2d424d9efaa5848b654b16f0e3d4cf /firmware/Makefile
parent80419704f68bf0783c5de63a6a4b9d89b45235c7 (diff)
downloadmicronucleus-42f2d8cc38064c67a9478826f563f5110c3848ee.tar.gz
micronucleus-42f2d8cc38064c67a9478826f563f5110c3848ee.tar.bz2
micronucleus-42f2d8cc38064c67a9478826f563f5110c3848ee.zip
#ENABLE_UNSAFE_OPTIMIZATIONS
Added new global flag to enable unsafe optimizations: This will disable several safety features in microncleus to save around 40 more bytes Disabled features: * Stack pointer and SREG initialization in CRT * Client side reset vector patching * USB collision detection. Micronucleus will not work reliability with hubs if this is disabled. See t85_aggressive configuration for usage examples.
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 9bf5570..4574e0f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -18,6 +18,7 @@ CONFIG ?= t85_default
# make flash # to load the boot loader into flash
# make disablereset # use external reset line for IO (CAUTION: this is not easy to enable again, see README)
+CFLAGS =
CONFIGPATH = configuration/$(CONFIG)
include $(CONFIGPATH)/Makefile.inc
@@ -29,7 +30,7 @@ AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE)
CC = avr-gcc
# Options:
-CFLAGS = -I. -g2 -Os # -Wall
+CFLAGS += -I. -g2 -Os # -Wall
CFLAGS += -I$(CONFIGPATH) -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) -DBOOTLOADER_ADDRESS=0x$(BOOTLOADER_ADDRESS)
CFLAGS += -nostartfiles -ffunction-sections -fdata-sections -fpack-struct -fno-inline-small-functions -fno-move-loop-invariants -fno-tree-scev-cprop