Skip to content

Commit

Permalink
1.4.1!
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Aug 10, 2020
1 parent 4eff0f5 commit 6584d4d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
10 changes: 6 additions & 4 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### This document lists significant changes and bugfixes, including those not in yet in a release.
1.4.1
# This document lists significant changes and bugfixes, including those not in yet in a release.
Any changes listed at the top, without a version number above thenm, have not been in a release yet, but can be downloaded from github for manual installation.

### 1.4.1
* Correct severe regression in timekeeping on 841, 441, 1634, and 828 in version 1.4.0 (#445, 447)
* Correct issue with included bootloaders for MH ET tiny88 micronucleus boards actually not working... re-bootload with ISP programmer to fix with the new bootloaders. (#439)
* Add full suite of entry mode bootloaders for tiny88 micronucleus.
Expand All @@ -9,7 +11,7 @@
* Change "USB tinyISP" to "USB tinyISP FAST", and increase bit clock significantly. Previously we had the normal version at 200kHz and the SLOW at 125kHz, which was redundant, and made the USBtinyISP agonizingly slow, even with the tiny memory of these parts.
* Add in ASCII art pinout to pins_arduino.c for TinyX8_MH pin mapping (#434 - thanks @AingeruJM!)

1.4.0
### 1.4.0
* Add support for MH-Tiny T88 pin mapping.
* Add support for MH-Tiny T88 boards, because I just got a bunch and it didn't look too hard.
* Add support for the DigiSpark Pro pin mapping for the ATtiny87/167 with other bootloader options.
Expand Down Expand Up @@ -39,7 +41,7 @@
* Add pulseInLong()
* (untested) Don't generate .lst unless told to 'export compiled binary' (#379 - though note that that issue also appears to involve a problem with their compiler, or maybe just an extremely perverse username that's breaking things)

1.3.3
### 1.3.3
* Add support for external CLOCK on 48/88/828. Document how to use external clock on other parts via manual AVRdude step (#355).
* Fix bug with using 32K ULP as clock source on 828.
* A bit of boards.txt cleanup.
Expand Down
26 changes: 14 additions & 12 deletions avr/extras/UsingMicronucleus.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,31 @@ On Windows, Micronucleus requires drivers to be installed; this can be done by r
### Uploading to a Micronucleus board
When you upload to a Micronucleus board, you will be prompted to "Please plug in the device" (there is a 60-second timeout on this). At this point, the board must be reset and/or plugged in. Depending on the bootloader version it is running, only certain types of reset will enter the bootloader (see below); almost all will enter the bootloader on a power-on reset when it detects that it is connected to a USB port (as opposed to just power). About a second after this reset, the computer will recognize the device, and the upload will commence. By scrolling up in the console output, you can also see the maximum sketch size that the bootloader reported was available. Often, this is not the same as what the ATTinyCore part-specific documentation specifies or what the compiler tests against. This is expected because have a different version of the bootloader; as Micronucleus development has progressed, improvements have been made to reduce the size of the bootloader. The bootloader entry mode also has an impact on flash usage. Additionally, "aggressive" versions of the bootloader have been made - these use optimizations to reduce the size of the bootloader which come at the cost of it doing a worse job at USB, which may cause it to malunction on specific chips, or with specific USB hosts (currently we do not supply such firmware with this core). While, as supplied, most of these boards come with recent versions of Micronucleus with (nearly) the same amount of usable space as the ones included with this package *many ATtiny85 based boards in the wild have a primitive version* that leaves only around 6k free for your sketch! Fortunately, upgrading is easy, even if reset has been disabled.

In a future release, when multiple bootloader versions are supplied, if they have different amounts of app space available, ATTinyCore will test against the largest available, and Micronucleus will stop you from uploading the too-big sketch.
Currently, where multiple versions of the bootloader are included with different amounts of free space, the currently selected one is used (and if the bootloader actually on the board has less, Micronucleus will stop you); I may revisit this decision in a future version

### Entering the Bootloader
The Micronucleus bootloader supports five options for bootloader entry (the reset conditions under which the bootloader is entered)
* Always - Anything that resets the board will enter the bootloader.
* Power-on - Only enter bootloader immediately on power-on.
* Watchdog - Only a watchdog reset will enter the bootloader *
* External Reset - Only a reset from the Reset pin will enter the bootloader **
* Jumper - Only enter the bootloader when a specific pin is connected ("jumpered") to ground.
The Micronucleus bootloader supports a number of methods for entering the bootloader, and several were added during the course of adding support for it to ATTinyCore; the best choice will depend on your development methodology, end use, and personal preferences (many people seem to favor running only on power on so they can disable reset - I'm happy to sacrifice that pin for the convenience of pressing a reset button instead of having to plug and unplug something, especially considering how dismally far from the USBIF's design . On parts which have had the bootloaders updated, the following are supported:
* Always (any sort of reset will run the bootloader)
* External reset (or power on with reset tied to Vcc if-and-only-if reset disabled)
* External reset (as above) or WDT reset
* Power On
* Power On or WDT reset
* Any except WDT reset
* Always w/unsafe optimizations (only on parts where this gets an extra page)

*The Watchdog entry method allows the application to enter the bootloader; however it is extremely dangerous, as it relies on there never being an application that doesn't do this under the right conditions! (ie, uploading blink will brick the board)
**The External Reset option, if installed onto a board where reset is disabled, will brick the board!
All are built with fast exit if no USB, `START_WITHOUT_PULLUP` and `ENABLE_SAFE_OPTIMIZATIONS`, and all that depend on reset cause will clear MCUSR after reading it and copying it's contents to the `GPIOR0` register so that user code can access it, while the bootloader can clear the flags so that they do notconfused by them after the next reset.

Currently, each supported board has only a single entry option available. In a future version of ATTinyCore, more options for the entry mode will be provided, with a submenu to select the desired entry mode. Due to the concerns mentioned above, regarding external and watchdog resets, the tentative plan is to include a backup condition, even if it comes at the expense of a 64-byte page of flash memory.
The Micronucleus codebase also supports more tightly constrained options, including jumpered power-on only, reset only (don't "upgrade" a board with reset disabled to that...), watchdog only (if the sketch doesn't do what you expect with the watchdog, it'll require ISP reinstall to fix, or if reset disabled, brick the part).
In 1.4.0, each supported board had only a single entry option available. In a future version of ATTinyCore, more options for the entry mode will be provided.

The included firmware uses the following settings.
For the ATtiny85 (Digispark), ATtiny167 (Digispark Pro), and ATtiny88 (MH_Tiny) parts, the most widely "recommended" configuration is used - the bootloader is entered only upon power on reset.
For the ATtiny85 (Digispark), ATtiny167 (Digispark Pro), ~and ATtiny88 (MH_Tiny)~ parts, the most widely "recommended" configuration is used - the bootloader is entered only upon power on reset.

For the ATtiny84, the bootloader is always entered.

For the ATtiny841, the bootloader is only entered upon external reset.

The entry behavior of the included versions of Micronucleus does not always match the version that the boards ship with.
The entry behavior of the included versions of Micronucleus does not always match the version that the boards ship with - it looks like most of the boards ship with the "always" entry mode.

### Clock Speed
Micronucleus is built with a specific clock speed in mind; only a few are supported by the codebase, and generally the fastest that is an option is used: 12 MHz, 12.8 MHz, 15 MHz, 16 MHz, 16.5 MHz or 20 MHz. The 12.8 and 16.5 configurations are only used with the internal oscillator - and this extra speed gives the bootloader some room to correct for the lower clock accuracy. 16.5 is only possible on parts that can be clocked from an on-chip PLL (the ATtiny85 and ATtiny861 - though the internal oscillator on some (not all) ATtiny841 can reach those speeds as well - note that this is higher than the maximum spec for the chip, not just the internal oscillator!), and is within spec above 4.5v for those parts, while 12.8 MHz can be reached by the internal oscillator on other parts (although it is far outside spec for that). Where the internal oscillator is used, it is "tuned" to the needed frequency based on the USB clock.
Expand Down
2 changes: 1 addition & 1 deletion avr/platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

name=ATTinyCore
version=1.4.0
version=1.4.1

# AVR compile variables
# ---------------------
Expand Down

0 comments on commit 6584d4d

Please sign in to comment.