mirror of
https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials.git
synced 2024-11-19 15:25:29 +00:00
c5981b6ccd
Despite invoking clippy with xargo, it wasnt actually using the custom target, so we don't need xargo here for now... The target argument was missing anyways. Using it throws an error. Needs some more investigation. |
||
---|---|---|
.. | ||
raspi3_boot | ||
src | ||
aarch64-raspi3-none-elf.json | ||
Cargo.lock | ||
Cargo.toml | ||
kernel8.img | ||
link.ld | ||
Makefile | ||
README.md |
Tutorial 05 - UART0, PL011
This tutorial does the same as tutorial 04, but it prints the serial number on UART0. As such, it can be used easily with qemu, like
$ make # To build the kernel
$ make qemu
<Press any key>
Hello Rustacean!
My serial number is: 0000000000000000
uart.rs
Before we could use a rate divisor value, we must establish a valid clock rate for the PL011. It's done via mailboxes, with the same property channel we used earlier. Otherwise this interface is identical to the UART1 one.
main.rs
We query the board's serial number and then we display it on the serial console.