Code Monkey home page Code Monkey logo

aarch64-baremetal's Introduction

AArch64 from scratch on RPi

This repository hosts the baremetal source code which is used to explore AArch64 architecture on Raspberry-Pi 4B.

OpenOCD and GDB

  1. Prerequisites

    sudo apt install binutils libtool pkg-config make libusb-1.0-0-dev gdb-multiarch python3-pygments
    
  2. 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
    
  3. 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
    
  4. Change the adptor settings in the openocd configuration file

    1. edit: sudo nano /usr/local/share/openocd/scripts/interface/ftdi/ft232h-module-swd.cfg
    2. find and replace transport select swd with transport select jtag
  5. Attached openocd to the board using the following command:

    sudo openocd -f interface/ftdi/ft232h-module-swd.cfg -f target/bcm2711.cfg
    
  6. Install GDB dashboard

    wget -P ~ https://git.io/.gdbinit
    
  7. start gdb

    gdb-multiarch kernel8.elf -ex "target extended-remote localhost:3333"
    

Documentation Links

  1. Raspberry-Pi Documents
    1. BCM2711-ARM-Peripherals
    2. GPIO PIN Header
  2. OpenOCD and JTAG setup

aarch64-baremetal's People

Contributors

mbharmal avatar streetdogg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.