The present invention provides a universal JTAG debugging method and
system with an expandable interface, comprising: encapsulating a JTAG host controller into an IP device of a
peripheral bus port; invoking the hardware resources within a development board, attaching the JTAG host IP to the hardware
system, and completing the minimum hardware
field programmable gate array design of the debugging
system; completing the boot
loader porting work according to the characteristics of the development board; compiling within the ported boot
loader, and solidifying the binary file into the development board; connecting a debugging device with a host computer, and connecting the debugging device with a target debugging
chip; the host computer running hyperterminal
software, and completing the target
chip debugging work through data JTAG debugging instructions. The present invention can be flexibly integrated into an
embedded system having a processor core, RAM, ROM, GPIO pins, JTAG_MASTER, and UART devices, completing the construction of the debugging
system hardware part, and has flexibility; the modular JTAGMaster controller can realize JTAG protocol conversion and simultaneously connect multiple JTAG devices with the same or different characteristics.