rust-raspberrypi-OS-tutorials/05_uart0
Andre Richter 0d75a8eaf3
Use aarch64-unknown-none target in nightly 🎉
We have a generic target for writing bare-metal code
for 64-bit ARM architectures in upstream Rust now.

Use it to get rid of the fully custom target spec.

\o/
2018-08-19 23:42:24 +02:00
..
.cargo Use aarch64-unknown-none target in nightly 🎉 2018-08-19 23:42:24 +02:00
raspi3_boot Sync with the newest Embedonomicon 2018-08-12 16:41:45 +02:00
src Sync with the newest Embedonomicon 2018-08-12 16:41:45 +02:00
Cargo.lock Sync with the newest Embedonomicon 2018-08-12 16:41:45 +02:00
Cargo.toml Sync with the newest Embedonomicon 2018-08-12 16:41:45 +02:00
kernel8.img Use aarch64-unknown-none target in nightly 🎉 2018-08-19 23:42:24 +02:00
link.ld Sync with the newest Embedonomicon 2018-08-12 16:41:45 +02:00
Makefile Use aarch64-unknown-none target in nightly 🎉 2018-08-19 23:42:24 +02:00
README.md minor style fixes 2018-04-04 20:41:33 +02:00

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.