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.

29 lines
822 B
Markdown

# 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.
5 years ago
## Test it
QEMU is no longer running in assembly mode. It will from now on show the output of the `console`.
5 years ago
```console
$ make qemu
5 years ago
[...]
Hello from Rust!
5 years ago
Kernel panic: Stopping here.
```
## Diff to previous