From 42f2d8cc38064c67a9478826f563f5110c3848ee Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Mon, 12 Jan 2015 00:46:06 +0100 Subject: #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. --- firmware/configuration/t85_aggressive/Makefile.inc | 12 ++++++++++-- firmware/configuration/t85_default/Makefile.inc | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'firmware/configuration') diff --git a/firmware/configuration/t85_aggressive/Makefile.inc b/firmware/configuration/t85_aggressive/Makefile.inc index 7ac110d..4675ae9 100644 --- a/firmware/configuration/t85_aggressive/Makefile.inc +++ b/firmware/configuration/t85_aggressive/Makefile.inc @@ -4,8 +4,16 @@ # Controller type: ATtiny 85 # Configuration: Size optimized. Uses 16 MHz V-USB implementation, which may be instable with some computers -# Last Change: Mar 16,2014 - +# Last Change: Jan 11,2015 + +# Enable unsafe optimizions. 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. + +CFLAGS += -DENABLE_UNSAFE_OPTIMIZATIONS F_CPU = 16000000 DEVICE = attiny85 diff --git a/firmware/configuration/t85_default/Makefile.inc b/firmware/configuration/t85_default/Makefile.inc index 53a4682..ee7252d 100644 --- a/firmware/configuration/t85_default/Makefile.inc +++ b/firmware/configuration/t85_default/Makefile.inc @@ -15,7 +15,7 @@ DEVICE = attiny85 # - for the size of your device (8kb = 1024 * 8 = 8192) subtract above value 2124... = 6068 # - How many pages in is that? 6068 / 64 (tiny85 page size in bytes) = 94.8125 # - round that down to 94 - our new bootloader address is 94 * 64 = 6016, in hex = 1780 -BOOTLOADER_ADDRESS = 19C0 +BOOTLOADER_ADDRESS = 1980 FUSEOPT = -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m FUSEOPT_DISABLERESET = -U lfuse:w:0xe1:m -U efuse:w:0xfe:m -U hfuse:w:0x5d:m -- cgit v1.2.3