Since the choice of JTAG port lines is a fixed attribute of the PCB, it makes little sense to implement this by introducing inefficient conditional code into the heavily-optimised FX2 firmware. Instead, this could be done in an efficient way by patching the FX2 firmware binary prior to loading by flLoadStandardFirmware() or flFlashStandardFirmware(). So, build each firmware twice, each time with a different choice of port lines, and do a binary diff on the result to find the locations in the FX2 machine code which require patching. This way, even if the locations change as a result of future mods to the firmware, the patching process will not break.
Since the choice of JTAG port lines is a fixed attribute of the PCB, it makes little sense to implement this by introducing inefficient conditional code into the heavily-optimised FX2 firmware. Instead, this could be done in an efficient way by patching the FX2 firmware binary prior to loading by flLoadStandardFirmware() or flFlashStandardFirmware(). So, build each firmware twice, each time with a different choice of port lines, and do a binary diff on the result to find the locations in the FX2 machine code which require patching. This way, even if the locations change as a result of future mods to the firmware, the patching process will not break.