Skip to content

OpenOCD >0.12.0 discarded set_prefer_sba. #233

@yvantor

Description

@yvantor

While connecting with the Genesys2 using OpenOCD, RISC-V OpenOCD returns:

Open On-Chip Debugger 0.12.0+dev-04337-g6f84e90d5 (2025-06-24-21:17)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
DEPRECATED! use 'adapter driver' not 'interface'
DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'
DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'
DEPRECATED! use 'ftdi channel' not 'ftdi_channel'
DEPRECATED! use 'telnet port', not 'telnet_port'
DEPRECATED! use 'tcl port' not 'tcl_port'
DEPRECATED! use 'gdb report_data_abort', not 'gdb_report_data_abort'
DEPRECATED! use 'gdb report_register_access_error', not 'gdb_report_register_access_error'
Warn : The command 'riscv set_reset_timeout_sec' is deprecated! Please, use 'riscv set_command_timeout_sec'.
riscv
  riscv authdata_read [index]
  riscv authdata_write [index] value
[...]
  riscv.cpu write_memory address width data ['phys']
./openocd.common.tcl:24: Error: 
Traceback (most recent call last):
  File "./openocd.common.tcl", line 24, in script
    riscv set_prefer_sba off
Error: [riscv.cpu] Unsupported DTM version: -1
Error: [riscv.cpu] Could not identify target type.

while OpenOCD simply returns:

Open On-Chip Debugger 0.12.0+dev-02057-g99d642ca5 (2025-06-26-22:01)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
DEPRECATED! use 'adapter driver' not 'interface'
DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'
DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'
DEPRECATED! use 'ftdi channel' not 'ftdi_channel'
DEPRECATED! use 'telnet port', not 'telnet_port'
DEPRECATED! use 'tcl port' not 'tcl_port'
DEPRECATED! use 'gdb report_data_abort', not 'gdb_report_data_abort'
DEPRECATED! use 'gdb report_register_access_error', not 'gdb_report_register_access_error'
riscv
  riscv authdata_read [index]
  riscv authdata_write [index] value
[...]
  riscv.cpu write_memory address width data ['phys']
util/openocd.common.tcl:24: Error: 
Traceback (most recent call last):
  File "util/openocd.common.tcl", line 24, in script
    riscv set_prefer_sba off

By omitting the riscv set_prefer_sba off command I could succesfully connect to the board and run whatever binary.
I only see from the Cheshire docs that an OpenOCD >= 0.10.0 is required to properly communicate with Cheshire, but looking at these 2 commits [1] [2] I think the set_prefer_sba in the end got deprecated the day after the 0.12.0 release...
Would it make sense to mirror this in the doc by specifying a 0.10.0 <= OpenOCD <= 0.12.0 requirement for the time being?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions