You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andre Richter 175d72ae8b
Refactor tutorial 03
4 years ago
..
.vscode Switch to rust-analyzer 4 years ago
src Refactor tutorial 03 4 years ago
Cargo.lock For educational purposes, use own zero_bss(). 4 years ago
Cargo.toml For educational purposes, use own zero_bss(). 4 years ago
Makefile Refactor tutorial 03 4 years ago
README.md Refactor tutorial 03 4 years ago
kernel Refactor tutorial 03 4 years ago
kernel8.img Refactor tutorial 03 4 years ago

README.md

Tutorial 03 - Hacky Hello World

tl;dr

Introducing global print!() macros to enable "printf debugging" at the earliest; To keep tutorial length reasonable, printing functions for now "abuse" a QEMU property that lets us use the RPi's UART without setting it up properly; Using the real hardware UART is enabled step-by-step in following tutorials.

Notable additions

  • src/console.rs introduces interface Traits for console commands.
  • src/bsp/rpi.rs implements the interface for QEMU's emulated UART.
  • The panic handler makes use of the new print!() to display user error messages.

Test it

QEMU is no longer running in assembly mode. It will from now on show the output of the console.

$ make qemu
[...]
Hello from Rust!

Kernel panic: Stopping here.

Diff to previous