From 669291b45aef8008c53ad7f078e94ed7cc183d7d Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Sun, 16 Mar 2014 06:44:50 +0100 Subject: firmware: Added configuration folders --- firmware/configuration/t85_default/Makefile.inc | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 firmware/configuration/t85_default/Makefile.inc (limited to 'firmware/configuration/t85_default/Makefile.inc') diff --git a/firmware/configuration/t85_default/Makefile.inc b/firmware/configuration/t85_default/Makefile.inc new file mode 100644 index 0000000..8b856a3 --- /dev/null +++ b/firmware/configuration/t85_default/Makefile.inc @@ -0,0 +1,62 @@ +# Name: Makefile +# Project: Micronucleus +# License: GNU GPL v2 (see License.txt) +# +# Controller type: ATtiny 85 +# Configuration: Digispark default configuration. +# Last Change: Mar 16,2014 + + +F_CPU = 16500000 +DEVICE = attiny85 +FUSEOPT = $(FUSEOPT_t85) +LOCKOPT = -U lock:w:0x2f:m + +# hexadecimal address for bootloader section to begin. To calculate the best value: +# - make clean; make main.hex; ### output will list data: 2124 (or something like that) +# - 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 + +FUSEOPT_t85 = -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m +FUSEOPT_t85_DISABLERESET = -U lfuse:w:0xe1:m -U efuse:w:0xfe:m -U hfuse:w:0x5d:m + +#--------------------------------------------------------------------- +# ATtiny85 +#--------------------------------------------------------------------- +# Fuse extended byte: +# 0xFE = - - - - - 1 1 0 +# ^ +# | +# +---- SELFPRGEN (enable self programming flash) +# +# Fuse high byte: +# 0xdd = 1 1 0 1 1 1 0 1 +# ^ ^ ^ ^ ^ \-+-/ +# | | | | | +------ BODLEVEL 2..0 (brownout trigger level -> 2.7V) +# | | | | +---------- EESAVE (preserve EEPROM on Chip Erase -> not preserved) +# | | | +-------------- WDTON (watchdog timer always on -> disable) +# | | +---------------- SPIEN (enable serial programming -> enabled) +# | +------------------ DWEN (debug wire enable) +# +-------------------- RSTDISBL (disable external reset -> enabled) +# +# Fuse high byte ("no reset": external reset disabled, can't program through SPI anymore) +# 0x5d = 0 1 0 1 1 1 0 1 +# ^ ^ ^ ^ ^ \-+-/ +# | | | | | +------ BODLEVEL 2..0 (brownout trigger level -> 2.7V) +# | | | | +---------- EESAVE (preserve EEPROM on Chip Erase -> not preserved) +# | | | +-------------- WDTON (watchdog timer always on -> disable) +# | | +---------------- SPIEN (enable serial programming -> enabled) +# | +------------------ DWEN (debug wire enable) +# +-------------------- RSTDISBL (disable external reset -> disabled!) +# +# Fuse low byte: +# 0xe1 = 1 1 1 0 0 0 0 1 +# ^ ^ \+/ \--+--/ +# | | | +------- CKSEL 3..0 (clock selection -> HF PLL) +# | | +--------------- SUT 1..0 (BOD enabled, fast rising power) +# | +------------------ CKOUT (clock output on CKOUT pin -> disabled) +# +-------------------- CKDIV8 (divide clock by 8 -> don't divide) + +############################################################################### -- cgit v1.2.3 From ca5b4534b621a0100cc5aa2ea9babb6f7bafd037 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Sun, 16 Mar 2014 08:13:29 +0100 Subject: firmware: Attiny841 first working config --- firmware/configuration/t85_default/Makefile.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'firmware/configuration/t85_default/Makefile.inc') diff --git a/firmware/configuration/t85_default/Makefile.inc b/firmware/configuration/t85_default/Makefile.inc index 8b856a3..d933082 100644 --- a/firmware/configuration/t85_default/Makefile.inc +++ b/firmware/configuration/t85_default/Makefile.inc @@ -9,8 +9,6 @@ F_CPU = 16500000 DEVICE = attiny85 -FUSEOPT = $(FUSEOPT_t85) -LOCKOPT = -U lock:w:0x2f:m # hexadecimal address for bootloader section to begin. To calculate the best value: # - make clean; make main.hex; ### output will list data: 2124 (or something like that) @@ -19,8 +17,8 @@ LOCKOPT = -U lock:w:0x2f:m # - round that down to 94 - our new bootloader address is 94 * 64 = 6016, in hex = 1780 BOOTLOADER_ADDRESS = 19C0 -FUSEOPT_t85 = -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m -FUSEOPT_t85_DISABLERESET = -U lfuse:w:0xe1:m -U efuse:w:0xfe:m -U hfuse:w:0x5d:m +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 #--------------------------------------------------------------------- # ATtiny85 -- cgit v1.2.3 From adebe9cd1f00275eabb5eff1dea3902803c9fb38 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Sun, 16 Mar 2014 17:57:32 +0100 Subject: firmware: config update t841,t85 --- firmware/configuration/t85_default/Makefile.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/configuration/t85_default/Makefile.inc') diff --git a/firmware/configuration/t85_default/Makefile.inc b/firmware/configuration/t85_default/Makefile.inc index d933082..53a4682 100644 --- a/firmware/configuration/t85_default/Makefile.inc +++ b/firmware/configuration/t85_default/Makefile.inc @@ -1,12 +1,12 @@ # Name: Makefile # Project: Micronucleus # License: GNU GPL v2 (see License.txt) -# -# Controller type: ATtiny 85 -# Configuration: Digispark default configuration. + +# Controller type: ATtiny 85 - 16.5 MHz +# Configuration: Default # Last Change: Mar 16,2014 - + F_CPU = 16500000 DEVICE = attiny85 -- cgit v1.2.3 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_default/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/configuration/t85_default/Makefile.inc') 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