This repository hosts the baremetal source code which is used to explore AArch64 architecture on Raspberry-Pi 4B.
-
Prerequisites
sudo apt install binutils libtool pkg-config make libusb-1.0-0-dev gdb-multiarch python3-pygments -
Install
openocdversion -0.12cd ~/Downloads git clone https://github.com/openocd-org/openocd.git cd openocd git checkout v0.12.0 ./bootstrap ./configure --enable-ftdi --disable-werror make sudo make install -
Confirm
openocdversion to be as expected$ openocd -v Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64 (2025-07-20-11:26) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html -
Change the adptor settings in the openocd configuration file
- edit:
sudo nano /usr/local/share/openocd/scripts/interface/ftdi/ft232h-module-swd.cfg - find and replace
transport select swdwithtransport select jtag
- edit:
-
Attached
openocdto the board using the following command:sudo openocd -f interface/ftdi/ft232h-module-swd.cfg -f target/bcm2711.cfg -
Install GDB dashboard
wget -P ~ https://git.io/.gdbinit -
start gdb
gdb-multiarch kernel8.elf -ex "target extended-remote localhost:3333"
All rights reserved. Only for learning purposes.