doc: board: ti: k3: Add a guide to debugging with OpenOCD
PATCH v4 1/1 doc: board: ti: k3: Add a guide to debugging with OpenOCD
From: Jason Kacines <[email protected]>
Bootloader debug usually tends to be a bit dicey prior to DDR and serial port getting active in the system. JTAG typically remains the only practical debug option during the initial bringup.
OpenOCD is one of the most popular environment for providing debug capability via a GDB compatible interface for developers to work with.
Debugging U-Boot and bootloaders on K3 platform does have a bit of tribal knowledge that is better documented in our common platform documentation.
---
Changes from V3:
* Thank you Heinrich for very detailed comments - I think I have
addressed them here, if there are any misses, will fix.
* Additional change I did was to include relocaddr for symbol load
and refer to doc/README.arm-relocation for details on how to do.
This unfortunately trips a lot more people than I had expected,
but I hope I do some justice here.
* Side note: I am a bit miffed at https://github.com/openocd-org/openocd/commit/cc2d4f015f72d7c30d613b50572eb9f31fac515a#diff-1ef184bd71bdf218f418818e8d03cc07c86b1c0838bff934e9f3adc7b7a2ee01
dropping build instructions.. but anyways, it was too
outdated anyways, the libjaylink etc are git submodules that bootstrap
updates and build uses locally unlike debian source build system, but
then we end up in the weeds if we try to add all details, so i added
your suggestion as well.
Diff of changes Vs V3 is here:
https://gist.github.com/nmenon/3487697a1c12c78d4ec34dbe6c4575b6
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/all/[email protected]/
V1: https://lore.kernel.org/u-boot/[email protected]/
doc/board/ti/am62x_sk.rst | 24 ++ doc/board/ti/am65x_evm.rst | 24 ++ doc/board/ti/img/openocd-overview.svg | 580 ++++++++++++++++++++++++++ doc/board/ti/j7200_evm.rst | 24 ++ doc/board/ti/j721e_evm.rst | 24 ++ doc/board/ti/k3.rst | 514 +++++++++++++++++++++++ 6 files changed, 1190 insertions(+) create mode 100644 doc/board/ti/img/openocd-overview.svg
doc/board/ti/am62x_sk.rst +24 -0
@@ -246,3 +246,27 @@ https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section. - 11001010 For SW2 and SW1, the switch state in the "ON" position = 1. + +Debugging U-Boot +---------------- + +See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for +detailed setup information. + +.. warning:: + + **OpenOCD support since**: v0.12.0 + + If the default package version of OpenOCD in your development + environment's distribution needs to be updated, it might be necessary to + build OpenOCD from the source. + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_openocd_connect_XDS110 + :end-before: .. k3_rst_include_end_openocd_connect_XDS110 + +To start OpenOCD and connect to the board + +.. code-block:: bash + + openocd -f board/ti_am625evm.cfg
doc/board/ti/am65x_evm.rst +24 -0
@@ -287,3 +287,27 @@ artifacts needed to the device: sb --ymodem tispl.bin > $MAIN_DEV < $MAIN_DEV sleep 1 sb --xmodem u-boot.img > $MAIN_DEV < $MAIN_DEV + +Debugging U-Boot +---------------- + +See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for +detailed setup information. + +.. warning:: + + **OpenOCD support since**: v0.12.0 + + If the default package version of OpenOCD in your development + environment's distribution needs to be updated, it might be necessary to + build OpenOCD from the source. + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_openocd_connect_XDS110 + :end-before: .. k3_rst_include_end_openocd_connect_XDS110 + +To start OpenOCD and connect to the board + +.. code-block:: bash + + openocd -f board/ti_am654evm.cfg
doc/board/ti/img/openocd-overview.svg new file +580 -0
580 lines not on this page · raw message
doc/board/ti/j7200_evm.rst +24 -0
@@ -201,3 +201,27 @@ fat formatted UDA FS as file. In case of booting from eMMC, write above images into raw or UDA FS. and set mmc partconf accordingly. + +Debugging U-Boot +---------------- + +See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for +detailed setup information. + +.. warning:: + + **OpenOCD support since**: v0.12.0 + + If the default package version of OpenOCD in your development + environment's distribution needs to be updated, it might be necessary to + build OpenOCD from the source. + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_openocd_connect_XDS110 + :end-before: .. k3_rst_include_end_openocd_connect_XDS110 + +To start OpenOCD and connect to the board + +.. code-block:: bash + + openocd -f board/ti_j7200evm.cfg
doc/board/ti/j721e_evm.rst +24 -0
@@ -228,3 +228,27 @@ J721E common processor board can be attached to a Ethernet QSGMII card and the PHY in the card has to be reset before it can be used for data transfer. "do_main_cpsw0_qsgmii_phyinit" env variable has to be set for the U-BOOT to configure this PHY. + +Debugging U-Boot +---------------- + +See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for +detailed setup information. + +.. warning:: + + **OpenOCD support since**: v0.12.0 + + If the default package version of OpenOCD in your development + environment's distribution needs to be updated, it might be necessary to + build OpenOCD from the source. + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_openocd_connect_XDS110 + :end-before: .. k3_rst_include_end_openocd_connect_XDS110 + +To start OpenOCD and connect to the board + +.. code-block:: bash + + openocd -f board/ti_j721eevm.cfg
doc/board/ti/k3.rst +514 -0
517 lines not on this page · raw message
Signature · 1 line
2.40.0