Support looking up the AVR_ROOT in /usr/local/avr
16-bits is not large enough if using RAMPZ

The RAMPZ register allows the effective address to be up to 24-bit,
so a 16-bit variable is not large enough to hold it.
megax8: Add missing define before including AVR hdr

mega48, mega88, and mega168 all share a common header and rely on their
platform to be defined prior to their headers being included.
flash: add support for RWWSRE/RWWSB bits in SPMCR

The Self Program Memory Control Register (SPMCR) has a bit for enabling
the read while write section (RWWSRE). This is also used for clearing
the temporary page buffer that is used for page writing (PGWRT). The
read while write section busy (RWWSB) allows the application developer
to know when the RWW section is accessible and when programming of it
has completed.

This commit does not wire up the behavior but just allows the flash
structure to understand that it supports a RWW section.
Merge pull request #63 from cardoe/flash-rampz-rww

Add support for a RWW section and fix problems with flashing and using RAMPZ
sim_core: reworked register macros and descriptor lines

reworked register macros and instruction descriptor lines to more
 closely follow avr data sheet insruction (and avr instruction wiki)
 references. register macro usage (with few exceptions) have been worked
 throughout the core to be more uniform and consistent.  most notably d
 is used nearly uniform throught the avr instruction set references,
 prior the core intermixed the usage of the opcode registers d and r
 notation.

lpm & elpm, trace bug fixed... tracing would always show lpm Z+ regardless of
 the actual operation performed...  more importantly than that, looking
 at the instruction data sheet reference, the relevant bit is bit 1
 in the opcode...  prior op was equal to opcode & 3 similar to ld/st
 instructions...  the original lpm checked for op == 1 and the
 reworked elpm checked for op == 3.  this has been corrected for
 both opcode implimentations by setting op to opcode & 1 and just
 using op to flag for post increment.

	modified:   sim/sim_core.c
gdb: support qAttached command from debugger

When using avr-gdb on Ubuntu 12.04, this command is always sent
and we responded as if it was unsupported. Unfortunately avr-gdb on
Ubuntu 12.04 crashes when detaching from the process because it makes a
bad assumption somewhere, this will prevent the crash.
gdb: support qOffsets command

GDB will ask what offsets should be applied to the the text and data
sections. Since AVR is Harvard architecture so we need to apply an
offset for one of the regions universally, Atmel documents and uses
0x800000 for RAM so this makes that happen.
gdb: support reporting memory map locations

GDB wants to have knowledge of the RAM and flash regions of memory on
the chips. Since AVR is Harvard architecture, the RAM must begin at a
fake offset and per Atmel's docs that is 0x800000.
Merge pull request #65 from cardoe/gdb-stub-update

Add some commands to the GDB stub
Merge pull request #64 from bsekisser/master-core-regmacro-descript

sim_core: reworked register macros and descriptor lines
Merge branch 'master' of https://github.com/buserror-uk/simavr