OpenOCD-K3

OpenOCD primer – K3 Devices
Date: 2023-09-22
Nishanth Menon
1
Overview
 What is OpenOCD
 Features of OpenOCD
 OpenOCD overview
 OpenOCD Hardware setup: xds110, cTI20, tag-connect
 Building OpenOCD
 OpenOCD integration with IDEs
 Debugging U-Boot
 Debugging Linux Kernel
 Self Hosted Debug
2
What is OpenOCD
OpenOCD (Open On-Chip Debugger) is an open-source software project that
provides debugging and in-circuit programming support for various
microcontrollers and microprocessors. It allows developers to interact with and
control the hardware of embedded systems during both development and
production phases. OpenOCD supports a wide range of target architectures and
interfaces with various hardware debugging probes.
3
Features of OpenOCD
 Debugging: OpenOCD enables developers to perform source-level debugging, inspect memory, set
breakpoints, and single-step through code on embedded systems.
 Hardware Debug Probes: OpenOCD interfaces with hardware debug probes like JTAG (Joint Test
Action Group) and SWD (Serial Wire Debug) adapters to connect to the target hardware.
 GDB Integration: OpenOCD can be used as a target for the GNU Debugger (GDB), allowing
developers to use familiar debugging tools with their embedded systems.
 Scripting: OpenOCD can be scripted to automate various debugging and programming tasks, making it
useful for both manual and automated testing.
 Flash Programming: OpenOCD supports programming the flash memory of microcontrollers and
microprocessors, allowing developers to load and update firmware.
 Support for Various Targets: OpenOCD provides support for a wide range of target architectures,
including ARM, MIPS, RISC-V, and others, making it versatile for different embedded systems.
 Cross-Platform: OpenOCD is cross-platform and can be used on various operating systems, including
Windows, Linux, and macOS.
4
OpenOCD overview
5
K3 Generation — Das U-Boot unknown version documentation
OpenOCD hardware setup – XDS110
K3 Generation — Das U-Boot unknown version documentation
Connect a micro-USB cable to the board to
the mentioned port.
OpenOCD hardware setup – cTI20
K3 Generation — Das U-Boot unknown version documentation
•TUMPA or equivalent dongles supported by OpenOCD.
•Cable such as Tag-connect ribbon cable
•Adapter to convert cTI20 to ARM20 such as those from Segger or Lauterbach LA-3780 Or optionally, if you have
manufacturing capability then you could try BeagleBone JTAG Adapter
OpenOCD hardware setup – tagConnect
K3 Generation — Das U-Boot unknown version documentation
•TUMPA or equivalent dongles supported by OpenOCD.
•Tag-Connect cable appropriate to the board such as TC2050-IDC-NL
•In case of no-leg, version, a retaining clip
•Tag-Connect to ARM20 adapter
Building OpenOCD
9
# Check the packages to be installed: needs deb-src in sources.list
sudo apt build-dep openocd
# The following list is NOT complete - please check the latest
sudo apt-get install libtool pkg-config texinfo libusb-dev 
libusb-1.0.0-dev libftdi-dev libhidapi-dev autoconf automake
git clone https://github.com/openocd-org/openocd.git openocd
cd openocd
git submodule init
git submodule update
./bootstrap
./configure --prefix=/usr/local/
make -j`nproc`
sudo make install
K3 Generation — Das U-Boot unknown version documentation
OpenOCD IDE integration with GDB
gdb-dashboard
GEF (GDB Enhanced Features)
K3 Generation — Das U-Boot unknown version documentation
Debugger Setup with GDB + OpenOCD
in Visual Studio Code (justinmklam.com)
AND MANY MANY MANY MORE!
Debug U-boot
11
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 69e281b086..744929e825 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -37,6 +37,8 @@
#endif
reset:
+dead_loop:
+ b dead_loop
/* Allow the board to save important registers */
b save_boot_params
save_boot_params_ret:
K3 Generation — Das U-Boot unknown version documentation
void board_init_f(ulong dummy)
{
.
.
/* Code to run on the R5F (Wakeup/Boot Domain) */
if (IS_ENABLED(CONFIG_CPU_V7R)) {
volatile int x = 1;
while(x) {};
}
...
/* Code to run on the ARMV8 (Main Domain) */
if (IS_ENABLED(CONFIG_ARM64)) {
volatile int x = 1;
while(x) {};
}
.
.
}
Option 1: reset Option 2: board_init_f
Demo – Debug U-Boot
12
K3 Generation — Das U-Boot unknown version documentation
xds110
Console
AM625-SK
Demo – Debug U-Boot – VsCode integration
13
https://gist.github.com/nmenon/c2984e28f1af73292c0bd472c7522460
Debug Kernel
14
Pending Patches (on track to merge in next few
weeks)
https://review.openocd.org/c/openocd/+/7896
https://review.openocd.org/c/openocd/+/7897
https://review.openocd.org/c/openocd/+/7898
• Step 1: Disable kernel options:
• CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU=n
• CONFIG_CORESIGHT=n
• Step 2: kernel command line options: Add:
• rodata=off cpuidle.off=1 nokaslr
• nosmp – to disable multi-cpu debug
openocd -c 'set V8_SMP_DEBUG 1' -c "set RTOS(am625.cpu.a53.0) hwthread" -f board/ti_am625evm.cfg
Demo – Debug Kernel
15
OpenOCD Self hosted debug
 Debug M4F or R5F from A53 itself.
# Check the packages to be installed: needs deb-src in sources.list
sudo apt build-dep openocd
# The following list is NOT complete - please check the latest
sudo apt-get install libtool pkg-config texinfo libusb-dev 
libusb-1.0.0-dev libftdi-dev libhidapi-dev autoconf automake
git clone https://github.com/openocd-org/openocd.git openocd
cd openocd
git submodule init
git submodule update
./bootstrap
./configure --prefix=/usr/local/ --enable-dmem
make -j`nproc`
sudo make install
sudo openocd -c "set RTOS(am625.cpu.gp_mcu) Zephyr" -f board/ti_am625_swd_native.cfg
References
 https://medium.com/@aliaksandr.kavalchuk/diving-into-jtag-protocol-part-1-
overview-fbdc428d3a16
 https://medium.com/@aliaksandr.kavalchuk/diving-into-jtag-protocol-part-2-
debugging-56a566db3cf8
 https://u-boot.readthedocs.io/en/latest/board/ti/k3.html#common-debugging-
environment-openocd
 https://review.openocd.org/
1 de 17

Recomendados

Hardware hacking por
Hardware hackingHardware hacking
Hardware hackingTavish Naruka
3.2K visualizações30 slides
STM -32 por
STM -32STM -32
STM -32SeoTechnoscripts
10 visualizações26 slides
learning STM -32 por
learning STM -32 learning STM -32
learning STM -32 SeoTechnoscripts
5 visualizações26 slides
OpenCR tutorial_icra2017 por
OpenCR tutorial_icra2017 OpenCR tutorial_icra2017
OpenCR tutorial_icra2017 chcbaram
2.1K visualizações18 slides
Embedded Linux BSP Training (Intro) por
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
782 visualizações29 slides
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo... por
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...ryancox
7.6K visualizações38 slides

Mais conteúdo relacionado

Similar a OpenOCD-K3

Share the Experience of Using Embedded Development Board por
Share the Experience of Using Embedded Development BoardShare the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development BoardJian-Hong Pan
271 visualizações50 slides
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood por
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbeddedFest
421 visualizações25 slides
Userspace drivers-2016 por
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016Chris Simmonds
1.9K visualizações20 slides
Linxu conj2016 96boards por
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boardsLF Events
293 visualizações46 slides
Lab Handson: Power your Creations with Intel Edison! por
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
2K visualizações66 slides
Getting started with Intel IoT Developer Kit por
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
17.8K visualizações67 slides

Similar a OpenOCD-K3(20)

Share the Experience of Using Embedded Development Board por Jian-Hong Pan
Share the Experience of Using Embedded Development BoardShare the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development Board
Jian-Hong Pan271 visualizações
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood por EmbeddedFest
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
EmbeddedFest421 visualizações
Userspace drivers-2016 por Chris Simmonds
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
Chris Simmonds1.9K visualizações
Linxu conj2016 96boards por LF Events
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boards
LF Events293 visualizações
Lab Handson: Power your Creations with Intel Edison! por Codemotion
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion2K visualizações
Getting started with Intel IoT Developer Kit por Sulamita Garcia
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
Sulamita Garcia17.8K visualizações
Stm32 f4 first touch por Benux Wei
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touch
Benux Wei3.6K visualizações
Cross-compilation native sous android por Thierry Gayet
Cross-compilation native sous androidCross-compilation native sous android
Cross-compilation native sous android
Thierry Gayet320 visualizações
IoT with openHAB on pcDuino3B por Jingfeng Liu
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
Jingfeng Liu3.7K visualizações
First Steps Developing Embedded Applications using Heterogeneous Multi-core P... por Toradex
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
Toradex 692 visualizações
Deploy STM32 family on Zephyr - SFO17-102 por Linaro
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
Linaro2.2K visualizações
Linux Kernel , BSP, Boot Loader, ARM Engineer - Satish profile por Satish Kumar
Linux Kernel , BSP, Boot Loader, ARM Engineer - Satish profileLinux Kernel , BSP, Boot Loader, ARM Engineer - Satish profile
Linux Kernel , BSP, Boot Loader, ARM Engineer - Satish profile
Satish Kumar238 visualizações
pcDuino Presentation at SparkFun por Jingfeng Liu
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
Jingfeng Liu2.4K visualizações
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD por Linaro
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
Linaro1.2K visualizações
oSSN19 - openSUSE on ARM por Guillaume GARDET
oSSN19 - openSUSE on ARMoSSN19 - openSUSE on ARM
oSSN19 - openSUSE on ARM
Guillaume GARDET102 visualizações
LAS16-403 - GDB Linux Kernel Awareness por Peter Griffin
LAS16-403 - GDB Linux Kernel Awareness LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness
Peter Griffin121 visualizações
LAS16-403: GDB Linux Kernel Awareness por Linaro
LAS16-403: GDB Linux Kernel AwarenessLAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
Linaro1.4K visualizações
IoT Getting Started with Intel® IoT Devkit por Vasily Ryzhonkov
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
Vasily Ryzhonkov5.4K visualizações
Embest s3 cev40 _neomore por Nơi Em Trở Về
Embest s3 cev40 _neomoreEmbest s3 cev40 _neomore
Embest s3 cev40 _neomore
Nơi Em Trở Về527 visualizações

Último

REACTJS.pdf por
REACTJS.pdfREACTJS.pdf
REACTJS.pdfArthyR3
37 visualizações16 slides
MongoDB.pdf por
MongoDB.pdfMongoDB.pdf
MongoDB.pdfArthyR3
49 visualizações6 slides
SUMIT SQL PROJECT SUPERSTORE 1.pptx por
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptxSumit Jadhav
22 visualizações26 slides
Web Dev Session 1.pptx por
Web Dev Session 1.pptxWeb Dev Session 1.pptx
Web Dev Session 1.pptxVedVekhande
17 visualizações22 slides
DESIGN OF SPRINGS-UNIT4.pptx por
DESIGN OF SPRINGS-UNIT4.pptxDESIGN OF SPRINGS-UNIT4.pptx
DESIGN OF SPRINGS-UNIT4.pptxgopinathcreddy
21 visualizações47 slides
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth por
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for GrowthInnomantra
15 visualizações4 slides

Último(20)

REACTJS.pdf por ArthyR3
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
ArthyR337 visualizações
MongoDB.pdf por ArthyR3
MongoDB.pdfMongoDB.pdf
MongoDB.pdf
ArthyR349 visualizações
SUMIT SQL PROJECT SUPERSTORE 1.pptx por Sumit Jadhav
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptx
Sumit Jadhav 22 visualizações
Web Dev Session 1.pptx por VedVekhande
Web Dev Session 1.pptxWeb Dev Session 1.pptx
Web Dev Session 1.pptx
VedVekhande17 visualizações
DESIGN OF SPRINGS-UNIT4.pptx por gopinathcreddy
DESIGN OF SPRINGS-UNIT4.pptxDESIGN OF SPRINGS-UNIT4.pptx
DESIGN OF SPRINGS-UNIT4.pptx
gopinathcreddy21 visualizações
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth por Innomantra
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth
Innomantra 15 visualizações
Ansari: Practical experiences with an LLM-based Islamic Assistant por M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous9 visualizações
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf por AlhamduKure
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdfASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
AlhamduKure8 visualizações
Plant Design Report-Oil Refinery.pdf por Safeen Yaseen Ja'far
Plant Design Report-Oil Refinery.pdfPlant Design Report-Oil Refinery.pdf
Plant Design Report-Oil Refinery.pdf
Safeen Yaseen Ja'far7 visualizações
dummy.pptx por JamesLamp
dummy.pptxdummy.pptx
dummy.pptx
JamesLamp5 visualizações
sam_software_eng_cv.pdf por sammyigbinovia
sam_software_eng_cv.pdfsam_software_eng_cv.pdf
sam_software_eng_cv.pdf
sammyigbinovia10 visualizações
MK__Cert.pdf por Hassan Khan
MK__Cert.pdfMK__Cert.pdf
MK__Cert.pdf
Hassan Khan19 visualizações
GDSC Mikroskil Members Onboarding 2023.pdf por gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil63 visualizações
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx por lwang78
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
lwang78180 visualizações
Design_Discover_Develop_Campaign.pptx por ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth649 visualizações
Pitchbook Repowerlab.pdf por VictoriaGaleano
Pitchbook Repowerlab.pdfPitchbook Repowerlab.pdf
Pitchbook Repowerlab.pdf
VictoriaGaleano6 visualizações
_MAKRIADI-FOTEINI_diploma thesis.pptx por fotinimakriadi
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptx
fotinimakriadi12 visualizações
Créativité dans le design mécanique à l’aide de l’optimisation topologique por LIEGE CREATIVE
Créativité dans le design mécanique à l’aide de l’optimisation topologiqueCréativité dans le design mécanique à l’aide de l’optimisation topologique
Créativité dans le design mécanique à l’aide de l’optimisation topologique
LIEGE CREATIVE8 visualizações
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc... por csegroupvn
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
csegroupvn8 visualizações

OpenOCD-K3

  • 1. OpenOCD primer – K3 Devices Date: 2023-09-22 Nishanth Menon 1
  • 2. Overview  What is OpenOCD  Features of OpenOCD  OpenOCD overview  OpenOCD Hardware setup: xds110, cTI20, tag-connect  Building OpenOCD  OpenOCD integration with IDEs  Debugging U-Boot  Debugging Linux Kernel  Self Hosted Debug 2
  • 3. What is OpenOCD OpenOCD (Open On-Chip Debugger) is an open-source software project that provides debugging and in-circuit programming support for various microcontrollers and microprocessors. It allows developers to interact with and control the hardware of embedded systems during both development and production phases. OpenOCD supports a wide range of target architectures and interfaces with various hardware debugging probes. 3
  • 4. Features of OpenOCD  Debugging: OpenOCD enables developers to perform source-level debugging, inspect memory, set breakpoints, and single-step through code on embedded systems.  Hardware Debug Probes: OpenOCD interfaces with hardware debug probes like JTAG (Joint Test Action Group) and SWD (Serial Wire Debug) adapters to connect to the target hardware.  GDB Integration: OpenOCD can be used as a target for the GNU Debugger (GDB), allowing developers to use familiar debugging tools with their embedded systems.  Scripting: OpenOCD can be scripted to automate various debugging and programming tasks, making it useful for both manual and automated testing.  Flash Programming: OpenOCD supports programming the flash memory of microcontrollers and microprocessors, allowing developers to load and update firmware.  Support for Various Targets: OpenOCD provides support for a wide range of target architectures, including ARM, MIPS, RISC-V, and others, making it versatile for different embedded systems.  Cross-Platform: OpenOCD is cross-platform and can be used on various operating systems, including Windows, Linux, and macOS. 4
  • 5. OpenOCD overview 5 K3 Generation — Das U-Boot unknown version documentation
  • 6. OpenOCD hardware setup – XDS110 K3 Generation — Das U-Boot unknown version documentation Connect a micro-USB cable to the board to the mentioned port.
  • 7. OpenOCD hardware setup – cTI20 K3 Generation — Das U-Boot unknown version documentation •TUMPA or equivalent dongles supported by OpenOCD. •Cable such as Tag-connect ribbon cable •Adapter to convert cTI20 to ARM20 such as those from Segger or Lauterbach LA-3780 Or optionally, if you have manufacturing capability then you could try BeagleBone JTAG Adapter
  • 8. OpenOCD hardware setup – tagConnect K3 Generation — Das U-Boot unknown version documentation •TUMPA or equivalent dongles supported by OpenOCD. •Tag-Connect cable appropriate to the board such as TC2050-IDC-NL •In case of no-leg, version, a retaining clip •Tag-Connect to ARM20 adapter
  • 9. Building OpenOCD 9 # Check the packages to be installed: needs deb-src in sources.list sudo apt build-dep openocd # The following list is NOT complete - please check the latest sudo apt-get install libtool pkg-config texinfo libusb-dev libusb-1.0.0-dev libftdi-dev libhidapi-dev autoconf automake git clone https://github.com/openocd-org/openocd.git openocd cd openocd git submodule init git submodule update ./bootstrap ./configure --prefix=/usr/local/ make -j`nproc` sudo make install K3 Generation — Das U-Boot unknown version documentation
  • 10. OpenOCD IDE integration with GDB gdb-dashboard GEF (GDB Enhanced Features) K3 Generation — Das U-Boot unknown version documentation Debugger Setup with GDB + OpenOCD in Visual Studio Code (justinmklam.com) AND MANY MANY MANY MORE!
  • 11. Debug U-boot 11 diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 69e281b086..744929e825 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -37,6 +37,8 @@ #endif reset: +dead_loop: + b dead_loop /* Allow the board to save important registers */ b save_boot_params save_boot_params_ret: K3 Generation — Das U-Boot unknown version documentation void board_init_f(ulong dummy) { . . /* Code to run on the R5F (Wakeup/Boot Domain) */ if (IS_ENABLED(CONFIG_CPU_V7R)) { volatile int x = 1; while(x) {}; } ... /* Code to run on the ARMV8 (Main Domain) */ if (IS_ENABLED(CONFIG_ARM64)) { volatile int x = 1; while(x) {}; } . . } Option 1: reset Option 2: board_init_f
  • 12. Demo – Debug U-Boot 12 K3 Generation — Das U-Boot unknown version documentation xds110 Console AM625-SK
  • 13. Demo – Debug U-Boot – VsCode integration 13 https://gist.github.com/nmenon/c2984e28f1af73292c0bd472c7522460
  • 14. Debug Kernel 14 Pending Patches (on track to merge in next few weeks) https://review.openocd.org/c/openocd/+/7896 https://review.openocd.org/c/openocd/+/7897 https://review.openocd.org/c/openocd/+/7898 • Step 1: Disable kernel options: • CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU=n • CONFIG_CORESIGHT=n • Step 2: kernel command line options: Add: • rodata=off cpuidle.off=1 nokaslr • nosmp – to disable multi-cpu debug openocd -c 'set V8_SMP_DEBUG 1' -c "set RTOS(am625.cpu.a53.0) hwthread" -f board/ti_am625evm.cfg
  • 15. Demo – Debug Kernel 15
  • 16. OpenOCD Self hosted debug  Debug M4F or R5F from A53 itself. # Check the packages to be installed: needs deb-src in sources.list sudo apt build-dep openocd # The following list is NOT complete - please check the latest sudo apt-get install libtool pkg-config texinfo libusb-dev libusb-1.0.0-dev libftdi-dev libhidapi-dev autoconf automake git clone https://github.com/openocd-org/openocd.git openocd cd openocd git submodule init git submodule update ./bootstrap ./configure --prefix=/usr/local/ --enable-dmem make -j`nproc` sudo make install sudo openocd -c "set RTOS(am625.cpu.gp_mcu) Zephyr" -f board/ti_am625_swd_native.cfg