I realize that programmer type inheritance wasn't a top concept when
this was built.
Exactly.
I'm doing something like that in the various interconnections between
the JTAG ICE mkII and the STK500v2 code, as basically all the Atmel
tools somehow implement both of them, but in different ways:
. the AVRISPmkII is like STK500v2, but USB only, and thus omits the
RS-232 framing
. the JTAGICEmkII has an ISP mode that is like STK500v2, but
encapsulated into JTAGICEmkII framed packets
. the STK600 is like the AVRISPmkII, except it also offers JTAG
which is like unframed JTAGICEmkII
. the AVR Dragon is all of the above, more or less
:-/
What I'm doing is to keep two different sets of private data, which
are swapped when crossing the programmer domain between jtag2 and
stk500v2. Alas, not all of the bugs around that have been sorted out
yet (see bug #33114), but basically, it works.
I wish there had been a better method, yes.