diff options
author | Tim Newsome <tim@sifive.com> | 2023-10-23 12:29:21 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2023-10-23 12:29:21 -0700 |
commit | af08d582b55f8c8e326b422a46c63909bca6009c (patch) | |
tree | 86e13b5da9ce8b8c02e1ceec6ec066a9b9da27f0 /doc/openocd.texi | |
parent | 132e3faf1d47f4a2ca7d01aa0191c59f5e1816c5 (diff) | |
parent | e17fe4db0f256ee4fb97dcfd6b9f7f55c966b190 (diff) | |
download | riscv-openocd-af08d582b55f8c8e326b422a46c63909bca6009c.zip riscv-openocd-af08d582b55f8c8e326b422a46c63909bca6009c.tar.gz riscv-openocd-af08d582b55f8c8e326b422a46c63909bca6009c.tar.bz2 |
Merge commit 'e17fe4db0f256ee4fb97dcfd6b9f7f55c966b190' into from_upstream
Conflicts:
src/flash/nor/drivers.c
src/target/riscv/riscv.c
Change-Id: Ide3eded7e0d5b0b446bfd0873a32c00cc9f128bd
Diffstat (limited to 'doc/openocd.texi')
-rw-r--r-- | doc/openocd.texi | 119 |
1 files changed, 118 insertions, 1 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi index eb9f92f..7e9eb20 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -8519,13 +8519,90 @@ openocd -f board/digilent_zedboard.cfg -c "init" \ @end example - @deffn {Command} {virtex2 read_stat} num Reads and displays the Virtex-II status register (STAT) for FPGA @var{num}. @end deffn @end deffn + + +@deffn {FPGA Driver} {lattice} [family] +The FGPA families ECP2, ECP3, ECP5, Certus and CertusPro by Lattice are supported. +This driver can be used to load the bitstream into the FPGA or read the status register and read/write the usercode register. + +The option @option{family} is one of @var{ecp2 ecp3 ecp5 certus}. This is needed when the JTAG ID of the device is not known by openocd (newer NX devices). + +@deffn {Command} {lattice read_status} num +Reads and displays the status register +for FPGA @var{num}. +@end deffn + +@deffn {Command} {lattice read_user} num +Reads and displays the user register +for FPGA @var{num}. +@end deffn + +@deffn {Command} {lattice write_user} num val +Writes the user register. +for FPGA @var{num} with value @var{val}. +@end deffn + +@deffn {Command} {lattice set_preload} num length +Set the length of the register for the preload. This is needed when the JTAG ID of the device is not known by openocd (newer NX devices). +The load command for the FPGA @var{num} will use a length for the preload of @var{length}. +@end deffn +@end deffn + + +@deffn {FPGA Driver} {efinix} +Both families (Trion and Titanium) sold by Efinix are supported as both use the same protocol for In-System Configuration. +This driver can be used to load the bitstream into the FPGA. +@end deffn + + +@deffn {FPGA Driver} {intel} [@option{family}] +This driver can be used to load the bitstream into Intel (former Altera) FPGAs. +The families Cyclone III, Cyclone IV, Cyclone V, Cyclone 10, Arria II are supported. +@c Arria V and Arria 10, MAX II, MAX V, MAX10) + +The option @option{family} is one of @var{cycloneiii cycloneiv cyclonev cyclone10 arriaii}. +This is needed when the JTAG ID of the device is ambiguous (same ID is used for chips in different families). + +As input file format the driver supports a '.rbf' (raw bitstream file) file. The '.rbf' file can be generated +from a '.sof' file with @verb{|quartus_cpf -c blinker.sof blinker.rbf|} + +Defines a new PLD device, an FPGA of the Cyclone III family, using the TAP named @verb{|cycloneiii.tap|}: +@example +pld device intel cycloneiii.tap cycloneiii +@end example + +@deffn {Command} {intel set_bscan} num len +Set boundary scan register length of FPGA @var{num} to @var{len}. This is needed because the +length can vary between chips with the same JTAG ID. +@end deffn + +@deffn {Command} {intel set_check_pos} num pos +Selects the position @var{pos} in the boundary-scan register. The bit at this +position is checked after loading the bitstream and must be '1', which is the case when no error occurred. +With a value of -1 for @var{pos} the check will be omitted. +@end deffn +@end deffn + + +@deffn {FPGA Driver} {gowin} +This driver can be used to load the bitstream into FPGAs from Gowin. +It is possible to program the SRAM. Programming the flash is not supported. +The files @verb{|.fs|} and @verb{|.bin|} generated by Gowin FPGA Designer are supported. +@end deffn + + +@deffn {FPGA Driver} {gatemate} +This driver can be used to load the bitstream into GateMate FPGAs form CologneChip. +The files @verb{|.bit|} and @verb{|.cfg|} both generated by p_r tool from CologneChip are supported. +@end deffn + + @node General Commands @chapter General Commands @cindex commands @@ -11370,6 +11447,46 @@ Stop current trace as started by the tracestart command. Dump trace memory to a file. @end deffn +@section Espressif Specific Commands + +@deffn {Command} {esp apptrace} (start <destination> [<poll_period> [<trace_size> [<stop_tmo> [<wait4halt> [<skip_size>]]]]]) +Starts +@uref{https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html#application-level-tracing-library, application level tracing}. +Data will be stored to specified destination. Available destinations are: +@itemize @bullet +@item @code{file://<outfile>} - Save trace logs into file. +@item @code{tcp://<host>:<port>} - Send trace logs to tcp port on specified host. OpenOCD will act as a tcp client. +@item @code{con:} - Print trace logs to the stdout. +@end itemize +Other parameters will be same for each destination. +@itemize @bullet +@item @code{poll_period} - trace data polling period in ms. +@item @code{trace_size} - maximum trace data size. +Tracing will be stopped automatically when that amount is reached. +Use "-1" to disable the limitation. +@item @code{stop_tmo} - Data reception timeout in ms. +Tracing will be stopped automatically when no data is received within that period. +@item @code{wait4halt} - if non-zero then wait for target to be halted before tracing start. +@item @code{skip_size} - amount of tracing data to be skipped before writing it to destination. +@end itemize +@end deffn + +@deffn {Command} {esp apptrace} (stop) +Stops tracing started with above command. +@end deffn + +@deffn {Command} {esp apptrace} (status) +Requests ongoing tracing status. +@end deffn + +@deffn {Command} {esp apptrace} (dump file://<outfile>) +Dumps tracing data from target buffer. It can be useful to dump the latest data +buffered on target for post-mortem analysis. For example when target starts tracing automatically +w/o OpenOCD command and keeps only the latest data window which fit into the buffer. +@uref{https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html#application-level-tracing-library, application level tracing}. +Data will be stored to specified destination. +@end deffn + @anchor{softwaredebugmessagesandtracing} @section Software Debug Messages and Tracing @cindex Linux-ARM DCC support |