Target Your Own Board

For your own board, you generally use an FTDI cable or another JTAG cable or module. You can also use an FTDI chip on your board.

Using the FTDI Module or FTDI C232HM-DDHSL-0 JTAG cable

The Sapphire High-Performance SoC also includes a configuration file for the FTDI Module or FTDI C232HM-DDHSL-0 JTAG cable (external.cfg), which bridges between your computer's USB connector and the JTAG signals on the FPGA. If you use external JTAG cable to connect your board to your computer, you can simply use this configuration file instead of ftdi.cfg or ftdi_ti.cfg.

Note: Efinix does not recommend the FTDI Chip C232HM-DDHSL-0 programming cable due to the possibility of the FPGA not being recognized or the potential for programming failures. You are encourage to use FTDI chip FT2232H or FT4232H mini-module.
Note: Refer to Connect the FTDI Mini-Module for instructions on using the cable.

Updating OpenOCD Configuration for External FTDI Cable

If you are using a custom FTDI cable to debug your board, you need to update the OpenOCD configuration file for external FTDI cable, external.cfg before launching the OpenOCD debugger.
Table 1. OpenOCD Confuguration File Setting for External FTDI Cable
Setting Description
ftdi device_desc FTDI device descriptor. The default setting is based on your selection of the debug cable during SoC configuration. You may find your cable description in the Device Manager (Windows) or lsusb (Linux) easily, i.e., ftdi device_desc "C232HM-DDHSL-0".
ftdi vid_pid FTDI device vendor ID and product ID. The first hexadecimal represents the FTDI vendor ID while the second hexadecimal represents the FTDI product ID, i.e., ftdi vid_pid 0x403 0x6014.
ftdi layout_init Initial values of the FTDI GPIO data and direction registers. The first hexadecimal represents data register while the second hexadecimal represents direction register. The values are based on the schematics of the adapter, i.e., ftdi_layout_init 0x0008 0x000b.
ftdi channel FTDI device channel usage. Selects the channel of the FTDI device for operations, i.e., ftdi channel 1. The default is channel 0.
Note: You can ignore this configuration if your FTDI device is single channel or uses channel 0.

Launching OpenOCD for Your Own Board

The standard launch scripts only support the following:
  • *_softTap: External FTDI Cable + SoC soft JTAG Port
  • *_ti: Standard Titanium FTDI + SoC hard JTAG Port

To use an external FTDI Cable (i.e., C232HM-DDHSL-0 Programming Cable) with SoC hard JTAG Port (using device TAP Controller), you are required to modify the debug configuration to use the external.cfg to target the external FTDI cable and ftdi_ti.cfg for Titanium device.

The following steps guide you to adapt the existing gpioDemo launch configuration to utilize the external FTDI cable + SoC hard JTAG Port:
  1. Select the preferred external JTAG Cable in the IP Manager when configuring the Sapphire High-Performance SoC.
  2. Import your desired project (i.e., gpioDemo) in the Efinity RISC-V Embedded Software IDE.
  3. Right-click on the gpioDemo_ti file in the Project Explorer pane to open the Debug Configuration setting.
  4. In the Debugger tab, browse to the OpenOCD Setup section. There, you would see the Config options text box. Replace the ftdi_ti.cfg file depending on the launch scripts you have selected with external.cfg. Use your own configuration filename if you are using a different configuration file.
  5. Click Apply and Debug to launch your application.
Note: Unexpected tap/device errors may occur in the console. You can remove the error by updating the CPUTAPID in the external .cfg file.

Using another JTAG Cable or Module

Generally, when debugging your own board you use a JTAG cable to connect your computer and the board. Therefore, you need to use the OpenOCD driver for that cable when debugging. OpenOCD includes a number of configuration files for standard hardware products. These files are located in the following directory:

openocd/build-win64/share/openocd/scripts/interface (Windows)

openocd/build-x86_64/share/openocd/scripts/interface (Linux)

You can also write your own configuration file if desired.

Follow these instructions when debugging with your own board:

  1. Connect your JTAG cable to the board and to your computer.
  2. Copy the OpenOCD configuration file for your cable to the bsp/efinix/EfxSapphireSoc/openocd directory.
  3. Follow the instructions for debugging, except target your configuration file instead of the ftdi_ti.cfg (Titanium) file.
    -f <path>/bsp/efinix/EfxSapphireSoc/openocd/<my cable>.cfg