target and jtag device number is used to tie a target to a jtag device. However with jtag devices being enabled/disabled, device num no longer has an unambigous meaning.
If we allow reordering the jtag chain, then device num becomes even less well defined. Here is a thought: - define jtag device/target num to be a unique id that has nothing to do with the ordering of targets/jtag devices - the jtag device chain can then afterwards be reordered and have devices enabled/disabled/added, the id of a jtag device remains constant - a list is maintained of all jtag devices in the system - a list of active jtag devices is maintained(a subset of all jtag devices) - the active device chain is defined by enumerating the jtag id's to be used - jtag devices can be created and added/removed from active chain at any time This scheme may well be reasonably simple to implement. The trickiest bit I see is to find and repair all places where 'num' is not used as an id, but used to refer to "device offset 'num' in the chain"... -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 XScale Cortex JTAG debugger and flash programmer Free eCos workshop in Oslo October 21! http://www.zylin.com/workshop.html _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
