[Libre-soc-bugs] [Bug 517] Define JTAG pins and set up with litex for ulx3s85f

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Apr 5 04:38:07 BST 2021


https://bugs.libre-soc.org/show_bug.cgi?id=517

--- Comment #81 from Cole Poirier <colepoirier at gmail.com> ---
http://openocd.org/doc/html/OpenOCD-Project-Setup.html#OpenOCD-Project-Setup


"5.4 User Config Files

    Best case: include just two files, and they handle everything else. The
first is an interface config file. The second is board-specific, and it sets up
the JTAG TAPs and their GDB targets (by deferring to some target.cfg file),
declares all flash memory, and leaves you nothing to do except meet your
deadline:

    source [find interface/olimex-jtag-tiny.cfg]
    source [find board/csb337.cfg]

    Boards with a single microcontroller often won’t need more than the target
config file, as in the AT91SAM7X256 example. That’s because there is no
external memory (flash, DDR RAM), and the board differences are encapsulated by
application code.
    Maybe you don’t know yet what your board looks like to JTAG. Once you know
the interface.cfg file to use, you may need help from OpenOCD to discover
what’s on the board. Once you find the JTAG TAPs, you can just search for
appropriate target and board configuration files ... or write your own, from
the bottom up. See Autoprobing.
    You can often reuse some standard config files but need to write a few new
ones, probably a board.cfg file. You will be using commands described later in
this User’s Guide, and working with the guidelines in the next chapter.

    For example, there may be configuration files for your JTAG adapter and
target chip, but you need a new board-specific config file giving access to
your particular flash chips. Or you might need to write another target chip
configuration file for a new chip built around the Cortex-M3 core.

        Note: When you write new configuration files, please submit them for
inclusion in the next OpenOCD release. For example, a board/newboard.cfg file
will help the next users of that board, and a target/newcpu.cfg will help
support users of any board using that chip. 

    You may need to write some C code. It may be as simple as supporting a new
FT2232 or parport based adapter; a bit more involved, like a NAND or NOR flash
controller driver; or a big piece of work like supporting a new chip
architecture. 

Reuse the existing config files when you can. Look first in the scripts/boards
area, then scripts/targets. You may find a board configuration that’s a good
example to follow."

It's far more complicated than simply selecting the interface i.e. 'stlink-v2',
especially when the board and target aren't already supported by openocd.
Apparently openocd is primarily an arm microcontroller debugger, and some riscv
cores specifically target the altera toolchain and jtag debugger so that they
can reuse the very extensive jtag debug toolchain that had to be written for
that platform.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list