Down and dirty hardware programming on Orange Pi boards
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
blink
cores1
cores2
cores3
cores4
float
h3_bootrom
h5_hello
h5_hello_asm
hello
inter_ez
inter_kyu
print
timer
.gitignore
LICENSE
README.md

README.md

This is a collection of programs I have been writing to run on the Orange Pi PC and PC2 boards. These boards use the Allwinner H3 and H5 chips respectively. The H3 has a 4 core Cortex-A7 inside (32 bit armv7), while the H5 has a 4 core A53 (64 bit armv8) inside. Amazingly the peripherals wrapped around each CPU core are almost identical.

They are what you might call "bare-metal" programming, although they get loaded by U-Boot.

I also provide a disassembly of the H3 bootrom that I am working on annotating and studying as I find time. I have not invested much time in this (or needed to).

For lots of notes and supporting information, see my website:

http://cholla.mmto.org/orange_pi/

If you want to follow my work in order, take them like this. For the H3 (Orange Pi PC):

  1. hello - first output to the serial port
  2. blink - blink both on board LED's
  3. float - bare metal floating point
  4. cores1 - get a second CPU core to fire up (not yet working)
  5. cores2 - another attempt at a second core (not yet working)
  6. cores3 - a simple example that does work, pruned back from Kyu sources
  7. cores4 - an extension of cores3 with additional experimenting
  8. print - partition files and add a printf
  9. timer - get a timer running (but not yet interrupting)
  10. inter_ez - set up the GIC so we get timer interrupts (has problems)
  11. inter_kyu - interrupts with timer and GIC with Kyu additions (works)

For the H5 (Orange Pi PC2):

  1. h5_hello_asm - hello world written entirely in assembly.
  2. h5_hello - hello world written in C

After this, my efforts have transitioned to getting Kyu to run on the Orange Pi, so you should go there next. I will probably never get the "inter_ez" demo to work (but you never know), and expect to try to push forwad the second core business with the aid of the Kyu infrastructure. So this project is not expected to get much more attention from me, and some things are unfinished.

The bootrom is the one thing that may get further attention.