|
|
|
@ -38,37 +38,15 @@ rustup component add rust-src llvm-tools-preview clippy rustfmt
|
|
|
|
|
cargo install cargo-xbuild cargo-binutils
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Additionally, a Micro SD card with [firmware
|
|
|
|
|
files](https://github.com/raspberrypi/firmware/tree/master/boot) on a FAT
|
|
|
|
|
filesystem is needed.
|
|
|
|
|
|
|
|
|
|
I recommend to get a [Micro SD card USB
|
|
|
|
|
adapter](http://media.kingston.com/images/products/prodReader-FCR-MRG2-img.jpg)
|
|
|
|
|
(many manufacturers ship SD cards with such an adapter), so that you can connect
|
|
|
|
|
the card to any desktop computer just like an USB stick, no special card reader
|
|
|
|
|
interface required (although many laptops have those these days).
|
|
|
|
|
|
|
|
|
|
You can create an MBR partitioning scheme on the SD card with an LBA FAT32 (type
|
|
|
|
|
0x0C) partition, format it and copy `bootcode.bin`, `start.elf` and `fixup.dat`
|
|
|
|
|
onto it. **Delete all other files or booting might not work**. Alternatively,
|
|
|
|
|
you can download a raspbian image, `dd` it to the SD card, mount it and delete
|
|
|
|
|
the unnecessary .img files. Whichever you prefer. What's important, you'll
|
|
|
|
|
create `kernel8.img` with these tutorials which must be copied to the root
|
|
|
|
|
directory on the SD card, and no other `.img` files should exists there.
|
|
|
|
|
## USB Serial
|
|
|
|
|
|
|
|
|
|
I'd also recommend to get an [USB serial debug
|
|
|
|
|
cable](https://www.adafruit.com/product/954). You connect it to the GPIO pins
|
|
|
|
|
14/15.
|
|
|
|
|
|
|
|
|
|
![UART wiring diagram](doc/wiring.png)
|
|
|
|
|
|
|
|
|
|
Then, run `screen` on your desktop computer like
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo screen /dev/ttyUSB0 115200
|
|
|
|
|
```
|
|
|
|
|
[Tutorial 6](06_drivers_gpio_uart) is the first where you can use it. Earlier tutorials will work solely with `QEMU`.
|
|
|
|
|
|
|
|
|
|
Exit screen again by pressing <kbd>ctrl-a</kbd> <kbd>ctrl-d</kbd>
|
|
|
|
|
![UART wiring diagram](doc/wiring.png)
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|