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
openocd
version -0.12
cd ~/Downloads git clone https://github.com/openocd-org/openocd.git cd openocd ./bootstrap ./configure --enable-ftdi make sudo make install
-
Confirm
openocd
version to be as expected$ openocd -v Open On-Chip Debugger 0.12.0+dev-01444-ge8e09b1b5 (2023-12-16-22:31) 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 swd
withtransport select jtag
- edit:
-
Attached
openocd
to 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"