GD-Link V2 Adapter User Guide Table of Contents Table of Contents ......................2 List of Figures ........................ 3 List of Tables ........................4 Introduction ......................5 Hardware introduction ..................6 2.1. Pin definitions and wiring methods................6 2.2. Button, LEDs and Buzzer .................... 8 Software features ....................
GD-Link V2 Adapter User Guide List of Tables Table 2-1. GD-Link V2 pin function definitions ................. 6 Table 2-2. Working status of GD-Link V2 ................... 9 Table 3-1. Machine signal burning pin function definition ............23 Table 3-2. Trace mode enable ......................29 Table 3-3.
GD-Link V2 Adapter User Guide Introduction GD-Link V2 is a rich-featured, easy-to-use, and portable debugging and programming tool developed by GigaDevice for GD32 series MCU, which has the following characteristics: USB2.0 high-speed interface Provide 5V or 3.3V power supply for the target chip ...
To enable programming, debugging, serial communication, and printing functions, connect the GD-Link V2 pins to the SWD (SWO), JTAG, or USART interface of the target chip using DuPont wires or ribbon cables. The pinout of GD-Link V2 is illustrated in Figure 2-1.
GD-Link V2 Target MCU 2.2. Button, LEDs and Buzzer GD-Link V2 features a single button (K1), a buzzer (BZ1) and four LEDs (LED1/2/3/4) as indicators. The physical representation of GD-Link V2 is shown in Figure 2-6. GD-Link adapter hardware. The button K1 is used for firmware updates and offline programming. For specific usage instructions, please refer to the firmware update and offline programming section.
The on-off and blinking of the LED indicate different working states of GD-Link V2. Table 2-2. Working status of GD-Link V2 provides a description of the different status of these LEDs which indicate the status of programming and debugging tool.
Disconnect GD-Link V2 from the computer's USB port. While holding down button K1, plug GD-Link V2 back into the computer's USB port. At this time, LED3 is always on, indicating that the programmer is in firmware upgrade mode.
GD-Link V2 Adapter User Guide Figure 3-2. GD-Link V2 firmware update step 2 Figure 3-3. GD-Link V2 firmware update step 3 After the update is completed, user can check the current firmware version number in the properties pane, as shown in...
GD-Link V2 Adapter User Guide Figure 3-4. GD-Link V2 firmware update step 4 Note: During the firmware update process, do not unplug GD-Link V2 from the computer's USB port. 3.2. Programming function 3.2.1. IDE programming Programming with KEIL (version 5.27 and above):...
GD-Link V2 Adapter User Guide Figure 3-5. KEIL debug configuration In the "Utilities" tab, select "Use Debug Driver" and click the "Setting" button to choose the MCU download algorithm and configure the erase mode and other settings, as shown in Figure 3-6.
Figure 3-8. Build output window - programming successful Programming with IAR (version 8.50 and above): Connect GD-Link V2 to the target chip according to the the hardware connection described Pin definitions and wiring methods section. Connect the USB interface of GD-Link V2 to the PC, and wait for LED2 to enter rapid blinking mode.
GD-Link V2 Adapter User Guide Figure 3-10. IAR CMSIS DAP configuration In the menu bar "Project" drop-down option "Download", click "Download active application" and wait for the progress bar to complete the burning, as shown in Figure 3-11. IAR download button Figure 3-12.
Figure 3-11. IAR download button Figure 3-12. IAR download progress bar Programming with Eclipse Connect GD-Link V2 to the target chip according to the hardware connection described in the Pin definitions and wiring methods section. Connect the USB interface of GD-Link V2 to the PC, and wait for LED2 to enter rapid blinking mode.
GD-Link V2 Adapter User Guide the "Debug" button, and when the "Confirm Perspective Switch" window appears, click "YES" to confirm. This will initiate the code download and take to the debugging interface, as illustrated in Figure 3-15. Enter the debugging interface in Eclipse.
Figure 3-15. Enter the debugging interface in Eclipse 3.2.2. GD-Link Programming Connect GD-Link V2 to the target chip according to the hardware connection described in definitions and wiring methods section. Connect the USB interface of GD-Link V2 to the PC, and wait for LED2 to enter rapid blinking mode. Open the GD-Link Programmer software and select the JTAG / SWD programming interface and configure the communication speed in the "Properties"...
GD-Link V2 Adapter User Guide information about the connected target chip, including its specific type are listed in the "Properties" window. Refer to Figure 3-17. Connecting the target chip in GD-Link Programmer for an illustration of GD-Link Programmer successfully connecting to the target chip.
3.2.3. Offline programming Connect the USB interface of GD-Link V2 to the PC, and wait for LED2 to enter rapid blinking mode. Open the GD-Link Programmer software. Click "GD-Link" menu bar and then choose "Configuration" to configure the parameters of offline programming, referring to Figure 3-19.
GD-Link V2 Adapter User Guide Link V2 Figure 3-23. Offline download configuration option byte feature After updating the offline burning file to GD-Link V2, refer to the Pin definitions and wiring methods section related to hardware connection with the target chip. Manually press the K1 button, if LED1 entering rapid blinking mode, indicating that the offline burning process is ongoing.
Virtual USB disk drag and drop programming Insert the GD-Link V2 USB into the PC port. There will be a USB mass storage device in the PC device manager, and a GigaDevice disk with the GD logo will appear in the local disk. As shown in Figure 3-25.
GD-Link V2 Adapter User Guide Figure 3-25. USB mass storage device Figure 3-26. Virtual USB drive Double-click to open the disk. Inside the disk, there is a CONFIG.TXT file. By modifying the content of this file and saving it, the initialize the programming parameter can be configured.
Page 25
Hardware introduction section, connect GD-Link V2 to the target chip via SWD (GD Cortex-M core MCU) or JTAG interface (GD RISC-V core MCU) correctly, then copy or drag the binary xxx.bin or executable file xxx.hex generated by the IDE or compiler toolchain to the recognized GigaDevice disk device.
GD-Link V2 Adapter User Guide CONFIG.TXT file, it indicates a successful file programming. If a FAIL.TXT file appears in the disk, it indicates a programming failure. Double-click to open FAIL.TXT and check the reason for the programming failure. Note: 1. When the debugger loses power and is unplugged and reconnected, the previous programming parameters will revert to default values.
GD-Link V2 Adapter User Guide of "Download and Debug" in the IAR menu bar to enter the debugging interface, as shown in Figure 3-28. IAR debugging interface. Figure 3-28. IAR debugging interface Debugging with Eclipse Complete the Eclipse configuration and debugging according to IDE programming chapter.
GD-Link V2 Adapter User Guide Figure 3-29. SWO configuration step 1 in KEIL Select the Trace tab in Settings, and the configuration interface is shown in Figure 3-30. SWO configuration step 2 in KEIL. Figure 3-30. SWO configuration step 2 in KEIL The Trace pin is enabled in the code.
GD-Link V2 Adapter User Guide manuals of each series of MCUs. Table 3-4. Trace mode enable DBG_CTL |= DBG_CTL_TRACE_IOEN; In the code, the serial printf output is redirected to the ITM output, and the added code is shown in Table 3-5. Printf retarget.
GD-Link V2 Adapter User Guide Figure 3-31. Debug (printf) viewer window in KEIL Enter the debugging interface, choose "View" -> "Analysis Windows" -> "Logic Aanlyzer", open the logic analyzer window, add the variables to be observed, run the code at full speed, and the value of the variable will be displayed in the logic analyzer window through the waveform.
3.4. Virtual serial port printing When the GD-Link V2 USB is inserted into the PC port, a USB serial device will appear on the PC Device Manager port (COM and LPT) interface (there is no driver for WIN10 system, and the corresponding driver should be installed for win7 system), as shown in Figure 3-33.
GD-Link V2 Adapter User Guide Revision history Table 4-1. Revision history Revision No. Description Date Initial Release Nov.1 2023...
Page 34
Important Notice This document is the property of GigaDevice Semiconductor Inc. and its subsidiaries (the "Company"). This document, including any product of the Company described in this document (the “Product”), is owned by the Company under the intellectual property laws and treaties of the People’s Republic of China and other jurisdictions worldwide.
Need help?
Do you have a question about the GD-Link V2 and is the answer not in the manual?
Questions and answers