Re-indent main.c

Used "uncrustify -c /usr/share/uncrustify/linux.cfg"
Make compile with gcc 4.7

Had to fix a few PROGMEM declaration in usbdrv which need to specify "const"
now.

Size is 2188 with gcc 4.7, so had to adjust the bootloader address.
Remove compat define for GICR

That symbol is never used. I think no tiny has that register anyways.
Get rid of mor (mostly) unused defines.

"uint" is better written as uint16_t anyways, and I doubt that there will ever
be an attiny128X which would justify an addr_t.
Fix OSCCAL restor clash

A recent change broke the RESTORE_OSCCAL code. Fix that by disabling
the the OSCCAL restoration from the tiny table when RESTORE_OSCCAL is
defined (The osccal value will still be stored in the tiny table though).

Also added comment why the osccal value from the tiny table is not used
for the bootloader itself.
Get rid of the interrupt table, support for F_CPU != 16.5 MHz

Code size is now 2204 bytes, but that now includes the tiny table, so this
change effectively adds only 10 bytes.

In Detail:

Support for F_CPU != 16.5 MHz:
------------------------------

Micronucleus included a hacked vUSB version, that checks the stack content
to determine which ISR to call, that from the application or the one in the
bootloader. However, only the 16.5MHz and 12MHz versions had been adapted,
other frequencies did not work out of the box.

This change moves the stack inspection part into the bootloader, which allows
the use of any of the frequencies supported by vUSB (vUSB still needs a trivial
patch to export "waitForJ", normally an internal symbol).

In addition, there is now a compile-time switch (define APP_USES_VUSB) to tell
the bootloader that the application will use vUSB too. With that switch
enabled, the additional interrupt latency is reduced to a maximum 14 cycles,
which is well in the range allowed by vUSB. Without, the added interrupt
latency for the application is up to 23 cycles, which is pretty much on the
edge of what vUSB can tolerate.

Removed the interrupt table:
----------------------------

With some linker script fiddling, it is possible to get rid of the interrupt
table normally added to each program.

The Attiny 85 has 15 interrupts, which each consumes one word, so getting rid
of the table gains only 30 Bytes - not that much.

However, other devices from the ATTiny family have much larger interrupt
tables, the 167 has 20 interrupts and each vector needs 4 bytes.

Where the increased code size comes from:
-----------------------------------------

While getting rid of the interrupt table should spare some bytes, code still
got bigger. This is because it is now necessary to deal with function
addresses.

The actual storage address of a function is only known to the linker, thus all
address calculations will be deferred until linking. The linker knows about
several operations on addresses, for example how to construct a relative jump
or how to add a fixed offset when loading register , thus something like this
is not particularity expensive:

  void foo(void) {...}
  data = foo - 10 - 1;

which translates into something like

  ldi r24, lo8(gs(foo - 11))
  ldi r25, hi8(gs(foo - 11))

The second argument is inserted by the linker later.

This however does only work with +/-, other operations are not supported by
binutils for AVR (there is a feature called "Complex Relocation" for another
processor though), so a statement like

  data = (foo - 10 - 1) & 0xFFF) | C000;

will add least two more operations, which each costs a word.
More work to support other ATTiny devices

Removed more dead ATMega support
   ATMegas have special boot loader support and simply do not require all the
   complications added for the Tinys. Besides, it did not work anyways.

Made it easier to add new hardware:

   To add a new device, one can simply put C- and makefile includes into the
   hardware/ directory. As it is not normally necessary to modify any existing
   file, one can have local modifications that won't conflict with the upstream
   repository too.

WITH_CRYSTAL:

   When set, this disables code that modifies the OSCCAL value. This saves
   almost 300 bytes.
   Since vUSB only supports running with the RC oscillator at 16.5 and 12.8MHz,
   WITH_CRYSTAL is automatically enabled for all other frequencies.

Added a ATTiny 861 device (with crystal):

   The 861 has more pins, but is otherwise rather similar to the 85, so this
   particular device might be interesting for projects that outgrew the 85.
Fix no-return warning

Gcc (4.7 at least) did not believe us that leaveBootloader() does not
return. Convince it otherwise.
Upgrade vUSB to 20121206

This magically reduces code size by 28 bytes to 2176bytes (there is a hint why
in "usbdrv.h").

Differences to upstream is the exported "waitForJ" and a "#ifndef __ASSEMBLER"
in "libs-device/osccal.h". Note though that the "PROGMEM static" changes from
upstream do not show up here because they are included in the gcc 4.7 patch
earlier (syntactically identical, except I missed spot).
Move LDSCRIPT definition into hardware include

The linker script really is hardware specific.
Build all targets in one go

When calling "make" without arguments, the makefile now looks for all files
named "hardware/<something>.mk" and builds all of them.

The idea is that one can see the effects code modifications on all hardware
variants immediately, but it should also help with release builds.

All generated files end up in a directory target-<something>, which makes it a
lot easier to clean-up (just remove target-<something>).

It is still possible to build only one of the variants by saying "make
HARDWARE=<variant>", and other options may also be specified.

See the nice introduction on how this works at
  http://mad-scientist.net/make/multi-arch.html