makestuff / libfpgalink

LIB:Library for interacting with an FPGA over USB
https://github.com/makestuff/libfpgalink/wiki/FPGALink
GNU Lesser General Public License v3.0
82 stars 25 forks source link

Support customisation of the FX2 port pins used for JTAG operations #22

Closed makestuff closed 12 years ago

makestuff commented 12 years ago

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.

makestuff commented 12 years ago

https://github.com/makestuff/libfpgalink/commit/b3381583ede7277f28ca3ceab7970a9f812344f1