Skip to content

Commit

Permalink
Saved 28 bytes by #define USB_CFG_DESCR_PROPS_STRINGS 1. Closes #10
Browse files Browse the repository at this point in the history
…re enabling push and pop of Y register in *usbdrvasm165.inc*. Closes #11.
  • Loading branch information
ArminJo committed Sep 26, 2020
1 parent c437bbd commit 27a01de
Show file tree
Hide file tree
Showing 74 changed files with 5,068 additions and 4,517 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,32 @@ like e.g. the [Burn_upgrade-t85_default.cmd](utils/Burn_upgrade-t85_default.cmd)
If not otherwise noted, the OSCCAL value is calibrated (+/- 1%) after boot for all ATtiny85 configurations
| Configuration | Available FLASH | Bootloader size | Non default config flags set |
|---------------|-----------------|-----------------|------------------------------|
| t85_aggressive<br/><br/>It works for my Digispark boards without any problems :-) | 6780 | 1392 | [Do not provide calibrated OSCCAL, if no USB attached](/firmware/configuration/t85_aggressive/bootloaderconfig.h#L220), [ENABLE_UNSAFE_OPTIMIZATIONS](#enable_unsafe_optimizations)<br/>Relying on calibrated 16MHz internal clock stability, not using the 16.5 MHz USB driver version with integrated PLL. This causes the main memory saving. |
| t85_aggressive<br/><br/>It works for my Digispark boards without any problems :-) | 6780 | 1364 | [Do not provide calibrated OSCCAL, if no USB attached](/firmware/configuration/t85_aggressive/bootloaderconfig.h#L220), [ENABLE_UNSAFE_OPTIMIZATIONS](#enable_unsafe_optimizations)<br/>Relying on calibrated 16MHz internal clock stability, not using the 16.5 MHz USB driver version with integrated PLL. This causes the main memory saving. |
| | | | |
| t85_default | 6586 | 1544 | - |
| t85_entry_on_power_on | 6586 | 1586 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_power_on_no_pullup | 6586 | 1600 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_power_on_<br/>fast_exit_on_no_USB | 6586 | 1594 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| **t85_entry_on_power_on_<br/>no_pullup_fast_exit_on_no_USB**<br/>[recommended configuration](#recommended-configuration) | 6586 | 1590 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit) |
| t85_default | 6650 | 1528 | - |
| t85_entry_on_power_on | 6586 | 1570 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_power_on_no_pullup | 6586 | 1584 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_power_on_<br/>fast_exit_on_no_USB | 6586 | 1578 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| **t85_entry_on_power_on_<br/>no_pullup_fast_exit_on_no_USB**<br/>[recommended configuration](#recommended-configuration) | 6586 | 1592 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_power_on_pullup_at_0 | 6586 | 1574 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), USB_CFG_PULLUP_IOPORTNAME + USB_CFG_PULLUP_BIT |
| t85_fast_exit_on_no_USB | 6586 | 1570 | [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_reset_no_pullup | 6586 | 1600 | [ENTRY_EXT_RESET](#entry_ext_reset-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| t85_fast_exit_on_no_USB | 6586 | 1554 | [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_reset_no_pullup | 6586 | 1584 | [ENTRY_EXT_RESET](#entry_ext_reset-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| t85_entry_on_reset_<br/>no_pullup_fast_exit_on_no_USB | 6586 | 1592 | [ENTRY_EXT_RESET](#entry_ext_reset-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH<br/>Bootloader timeout increased to 15 seconds (if connected to USB). |
| | | | |
| t88_default | 6714 | 1470 | LED_MODE=ACTIVE_HIGH |
| **t88_entry_on_power_on_<br/>no_pullup_fast_exit_on_no_USB**<br/>[recommended configuration](#recommended-configuration) | 6650 | 1516 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| t88_default | 6714 | 1442 | LED_MODE=ACTIVE_HIGH |
| **t88_entry_on_power_on_<br/>no_pullup_fast_exit_on_no_USB**<br/>[recommended configuration](#recommended-configuration) | 6650 | 1488 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| | | | |
| t167_default | 14970 | 1350 | - |
| t167_entry_on_power_on_no_pullup | 14842 | 1394 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| **t167_entry_on_power_on_<br/>no_pullup_fast_exit_on_no_USB**<br/>[recommended configuration](#recommended-configuration) | 14842 | 1402 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| t167_entry_on_reset_no_pullup | 14842 | 1394 | [ENTRY_EXT_RESET](#entry_ext_reset-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| t167_default | 14970 | 1322 | - |
| t167_entry_on_power_on_no_pullup | 14842 | 1366 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| **t167_entry_on_power_on_<br/>no_pullup_fast_exit_on_no_USB**<br/>[recommended configuration](#recommended-configuration) | 14842 | 1374 | [ENTRY_POWER_ON](#entry_power_on-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), [FAST_EXIT_NO_USB_MS=300](#fast_exit_no_usb_ms-for-fast-bootloader-exit), LED_MODE=ACTIVE_HIGH |
| t167_entry_on_reset_no_pullup | 14842 | 1366 | [ENTRY_EXT_RESET](#entry_ext_reset-entry-condition), [START_WITHOUT_PULLUP](#start_without_pullup), LED_MODE=ACTIVE_HIGH |
| | | | |
| Nanite841 | | 1594 | |
| BitBoss | | 1588 | |
| t84_default | | 1520 | |
| Nanite841 | | 1566 | |
| BitBoss | | 1560 | |
| t84_default | | 1492 | |
| | | | |
| m168p_extclock | | 1510 | |
| m328p_extclock | | 1510 | |
| m168p_extclock | | 1482 | |
| m328p_extclock | | 1482 | |

### Legend
- [ENTRY_POWER_ON](#entry_power_on-entry-condition) - Only enter bootloader on power on, not on reset or brownout.
Expand Down Expand Up @@ -181,6 +182,8 @@ INT1 9 (D3) PA3 4| |17 PB3 (D11) 4 OC1BV USB-
```
# Revision History
### Version 2.5.1
- Saved 28 bytes by `#define USB_CFG_DESCR_PROPS_STRINGS 1`. See #10, thanks to [nerdralph](https://github.com/nerdralph).
- Use 12 byted by re enabling push and pop of Y register in *usbdrvasm165.inc*. See #11.
- Swapped D+ and D- for t88 to support MH-ET LIVE Tiny88 boards.

### Version 2.5
Expand Down
151 changes: 23 additions & 128 deletions firmware/build.log
Original file line number Diff line number Diff line change
@@ -1,220 +1,115 @@
Building Micronucleus configuration: BitBoss
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1588 0 1588 634 main.hex
0 1560 0 1560 618 main.hex
-
Building Micronucleus configuration: m168p_extclock
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1510 0 1510 5e6 main.hex
0 1482 0 1482 5ca main.hex
-
Building Micronucleus configuration: m328p_extclock
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1510 0 1510 5e6 main.hex
0 1482 0 1482 5ca main.hex
-
Building Micronucleus configuration: Nanite841
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1594 0 1594 63a main.hex
0 1566 0 1566 61e main.hex
-
Building Micronucleus configuration: t167_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1350 0 1350 546 main.hex
0 1322 0 1322 52a main.hex
-
Building Micronucleus configuration: t167_entry_on_power_on_no_pullup
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1394 0 1394 572 main.hex
0 1366 0 1366 556 main.hex
-
Building Micronucleus configuration: t167_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1402 0 1402 57a main.hex
0 1374 0 1374 55e main.hex
-
Building Micronucleus configuration: t167_entry_on_reset_no_pullup
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1394 0 1394 572 main.hex
0 1366 0 1366 556 main.hex
-
Building Micronucleus configuration: t45_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
0 1528 0 1528 5f8 main.hex
-
Building Micronucleus configuration: t841_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1574 0 1574 626 main.hex
0 1546 0 1546 60a main.hex
-
Building Micronucleus configuration: t84_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1520 0 1520 5f0 main.hex
0 1492 0 1492 5d4 main.hex
-
Building Micronucleus configuration: t85_aggressive
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1392 0 1392 570 main.hex
0 1364 0 1364 554 main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
0 1528 0 1528 5f8 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1586 0 1586 632 main.hex
0 1570 0 1570 622 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1594 0 1594 63a main.hex
0 1578 0 1578 62a main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1600 0 1600 640 main.hex
0 1584 0 1584 630 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1590 0 1590 636 main.hex
0 1592 0 1592 638 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_pullup_at_0
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1574 0 1574 626 main.hex
0 1558 0 1558 616 main.hex
-
Building Micronucleus configuration: t85_entry_on_reset_no_pullup
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1600 0 1600 640 main.hex
-
Building Micronucleus configuration: t85_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1570 0 1570 622 main.hex
-
Building Micronucleus configuration: t88_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1470 0 1470 5be main.hex
-
Building Micronucleus configuration: t88_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1516 0 1516 5ec main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1584 0 1584 630 main.hex
-
Building Micronucleus configuration: t85_default
Building Micronucleus configuration: t85_entry_on_reset_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1590 0 1590 636 main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1590 0 1590 636 main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
-
Building Micronucleus configuration: t85_aggressive
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1392 0 1392 570 main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1586 0 1586 632 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1594 0 1594 63a main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1600 0 1600 640 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1590 0 1590 636 main.hex
-
Building Micronucleus configuration: t85_entry_on_power_on_pullup_at_0
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1574 0 1574 626 main.hex
-
Building Micronucleus configuration: t85_entry_on_reset_no_pullup
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1600 0 1600 640 main.hex
0 1592 0 1592 638 main.hex
-
Building Micronucleus configuration: t85_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1570 0 1570 622 main.hex
0 1554 0 1554 612 main.hex
-
Building Micronucleus configuration: t88_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1470 0 1470 5be main.hex
0 1442 0 1442 5a2 main.hex
-
Building Micronucleus configuration: t88_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1516 0 1516 5ec main.hex
-
Building Micronucleus configuration: t88_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1470 0 1470 5be main.hex
-
Building Micronucleus configuration: t88_entry_on_power_on_no_pullup_fast_exit_on_no_USB
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1516 0 1516 5ec main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
-
Building Micronucleus configuration: t85_default
Size of binary hexfile. Use the "data" size to calculate the bootloader address:
text data bss dec hex filename
0 1544 0 1544 608 main.hex
0 1488 0 1488 5d0 main.hex
-
2 changes: 1 addition & 1 deletion firmware/configuration/t85_default/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DEVICE = attiny85
# - How many pages in is that? 6598 / 64 (tiny85 page size in bytes) = 103.09377
# - round that down to 103 - our new bootloader address is 103 * 64 = 6592, in hex = 19C0
# - For data size from 1536 up to 1600 the address is 19C0 (6586 free) for size from 1601 to 1664 it is 1980 (6522 free)
BOOTLOADER_ADDRESS = 19C0
BOOTLOADER_ADDRESS = 1A00

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
#define ACTIVE_HIGH 1
#define ACTIVE_LOW 2

#define LED_MODE NONE
#define LED_MODE ACTIVE_HIGH

#define LED_DDR DDRB
#define LED_PORT PORTB
Expand Down
Loading

0 comments on commit 27a01de

Please sign in to comment.