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 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. You may select your preffered external JTAG cable in Debug and Linker Scripts Support under the Debug tab in the IP Manager.
Updating OpenOCD Configuration 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
- *_softTap: External FTDI Cable + SoC soft JTAG Port
- *_ti: Standard Titanium 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 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.cfg for Trion device or ftdi_ti.cfg for Titanium device.
- Select the preferred external JTAG Cable in the IP Manager when configuring the Sapphire SoC.
- Import your desired project (i.e., gpioDemo) in the Efinity RISC-V Embedded Software IDE.
- Right-click on the gpioDemo_trion.launch file in the Project Explorer pane to open the Debug Configuration setting.
- Click on either gpioDemo_ti or gpioDemo_trion for either Titanium or Trion device.
- In the Debugger tab, browse to the OpenOCD Setup section. There, you would see the Config options text box. Replace either the ftdi_ti.cfg or ftdi.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.
- 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:
- Connect your JTAG cable to the board and to your computer.
- Copy the OpenOCD configuration file for your cable to the bsp/efinix/EfxSapphireSoc/openocd directory.
- Follow the instructions for debugging, except target your configuration file
instead of the ftdi.cfg (Trion) or
ftdi_ti.cfg (Titanium) file.
-f <path>/bsp/efinix/EfxSapphireSoc/openocd/<my cable>.cfg
Using an FTDI Chip on your Board
When you configure the Sapphire SoC in the IP Configuration wizard, choose . Then, specify your board name. When you generate the SoC, the ftdi.cfg file is populated with your board name. Edit the file for your board's VID and PID.