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 RV64 SoC does not support GPIO based debug module, also known as soft tap in RV32. If you prefer to do debugging simultaneously with the FPGA debugger, you should enable Co-debug mode in the JTAG Configuration section under the Debug tab. If you use an external JTAG cable to connect your board to your computer, you can use these configuration files; ftdi.cfg, ftdi_ti.cfg, or ftdi_tz.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 encouraged to use FTDI chip FT2232H or FT4232H mini-module.

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; ftdi.cfg, ftdi_ti.cfg, or ftdi_tz.cfgbefore 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:
  • *_ti: Standard Titanium FTDI + SoC hard JTAG Port
  • *_tz: Standard Topaz FTDI + SoC hard JTAG Port
  • *_trion: Standard Trion FTDI + SoC hard JTAG Port

To use an external FTDI Cable (i.e., C232HM-DDHSL-0 Programming Cable) with the SoC hard JTAG Port (using device TAP Controller), you are required to modify the debug configuration to correctly target the FPGA 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 RV64 SoC.
  2. Import your desired project (i.e., gpioDemo) in the Efinity RISC-V Embedded Software IDE.
  3. Modify the debug configuration file as mentioned in Updating OpenOCD Configuration for External FTDI Cable.
  4. Click Apply and Debug to launch your application.

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/EfxSapphireSocRV64/openocd directory.
  3. Follow the instructions for debugging, except target your configuration file instead of the ftdi.cfg (Trion), ftdi_ti.cfg (Titanium), or ftdi_tz.cfg (Topaz) file.
    -f <path>/bsp/efinix/EfxSapphireSocRV64/openocd/<my cable>.cfg

Using an FTDI Chip on your Board

When you configure the Sapphire RV64 SoC in the IP Configuration wizard, choose Target OpenOCD > Custom. Then, specify your board name. When you generate the SoC, the ftdi.cfg, ftdi_ti.cfg, or ftdi_tz.cfg file is populated with your board name. Edit the file for your board's VID and PID.