Giter VIP home page Giter VIP logo

raspi's Introduction

Current status & thoughts

I've reached the limits of the QEMU implementation and my physical board is dead. Since this is a 10-year-old board anyway, I likely will not do much more work on this.

BlogOS -- Excellent course. Highly recommended.

Rust -- Ergonomics are great. Didn't offer many advantages over C for this very low-level project (interrupts, peripherals, etc.) and you still need to learn cc, as, ld.

BlogOS

Loosely following https://os.phil-opp.com/. Adapted for the armv6 CPU in the raspberry pi 1 model B+.

Done:

  • Freestanding executable running on QEMU. See cargo config and target json for details (cross-compilation, custom linker.ld, etc). Pieced together from the internet and the arm reference manual.
  • Bootloader from scratch. See setup.S -- no blog-os bootloader crate for ARM, plus it was kind of interesting to have to figure it out.
  • Basic input and output over the raspi1's UART (configure the UART and read and write characters). This is instead of VGA text mode, which doesn't exist on ARM (I think).
  • Testing.
  • Refactor the uart code for singleton example
  • Use readc! instead of getc
  • Exceptions
  • macro for the _irq stuff
  • tick tock

Currently working on

  • Memory!
  • virtual addresses.

TODO (issues)

  • Bug: if you mash tons of keys the input code gets stuck in a spinlock
  • Timer. Two known working examples: reference/arm-tutorial-rpi/part-4/armc-013 and reference/piaplus/blinker05. My implementation from the datasheet was basically identical but didn't trigger interrupts on QEMU. Spent forever browsing source files for the two references and then finally tested them on qemu -- turns out they don't work either (tried changing their interrupt handlers to loop (and check with gdb), didn't work; svc exit qemu, didn't work). Next steps: do the LED blink and try on real rpi.

Rust target

See arm-none-eabihf.json.

Debugging

Using QEMU. See .cargo/config.toml for the command, and ./debug.sh for the debug setup.

ARM assembler for the raspberry pi

Resources:

Notes

The ARMv6 processor in the pi B+ is an A-profile processor. There are tons of references online to it being M-profile, but it is not. This is important because: there is no systick exception, the IVT stuff is significantly different, and so are the execution modes.

RPi boot sequence (kind of interesting).

Some guy doing MINIX on rpi 3: here.

raspi's People

Contributors

smuun avatar

Stargazers

Avery Blanchard avatar

Watchers

 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.