From d8e1e253dea775e6f7d20db4821d75186ff3b7c7 Mon Sep 17 00:00:00 2001 From: alloncm Date: Sat, 19 Aug 2023 15:07:13 +0300 Subject: [PATCH] Update the readme and fix bad build instruction --- Makefile.toml | 8 +++++++- README.md | 13 ++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 67116da3..da2f8867 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -48,7 +48,13 @@ toolchain = "nightly" cwd = "./rpi/" command = "cargo" args = ["build", "--release", "--target", "armv7a-none-eabihf","--package", "magenboy_rpi", "--bin", "baremetal", "-Z", "build-std=core", "--no-default-features", "--features", "rpi4"] +dependencies = ["install_rust_src"] [tasks.install_llvm_tools] toolchain = "nightly" -install_crate = {rustup_component_name = "llvm-tools-preview"} \ No newline at end of file +install_crate = {rustup_component_name = "llvm-tools-preview"} + +[tasks.install_rust_src] +toolchain = "nightly" +command = "rustup" +args = ["component", "add", "rust-src"] \ No newline at end of file diff --git a/README.md b/README.md index 0818a8a8..e8cae599 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ cargo build --release --package magenboy_sdl --features [optional_features] ### (WIP) Raspberry Pi Baremetal (with ili9341 display and gpio buttons) -Edit the relevant settings in `configuration.rs` and then run: +Edit the relevant settings in `configuration.rs` install [`arm-none-eabi-gcc`](https://developer.arm.com/downloads/-/gnu-rm) and then run: ```sh cargo make rpibm @@ -62,9 +62,8 @@ cargo make rpibm This command will do the folowing: -1. Install the rust nightly toolchain for `armv7a-none-eabihf`: +1. Install the rust source to compile for toolchain `armv7a-none-eabihf`: ```shell -rustup target add armv7a-none-eabihf --toolchain nightly rustup +nightly component add rust-src ``` @@ -189,7 +188,7 @@ I think that not all the peripherals I use are implemented in QEMU so I used thi ### RaspberryPi - [Raspberry Pi docs](https://www.raspberrypi.com/documentation/computers/processors.html) -- [juj/fbcp-ili9341 as a refference](https://github.com/juj/fbcp-ili9341) +- [juj/fbcp-ili9341 as a reference](https://github.com/juj/fbcp-ili9341) - [Raspberry Pi DMA programming in C](https://iosoft.blog/2020/05/25/raspberry-pi-dma-programming/) - [Ili9341 docs](https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf) #### BareMetal RaspberryPi @@ -202,4 +201,8 @@ I think that not all the peripherals I use are implemented in QEMU so I used thi - [ARMv7-A Architecture Reference Manual](https://developer.arm.com/documentation/ddi0406/cb/?lang=en) - [ARMv8-A Architecture Reference Manual](https://developer.arm.com/documentation/ddi0487/ia/?lang=en) - [ARMv8-A Registers](https://developer.arm.com/documentation/ddi0595/2021-12/AArch32-Registers/CCSIDR--Current-Cache-Size-ID-Register?lang=en) - - [ARMv7-A programmer Guide](https://developer.arm.com/documentation/den0013/latest/) \ No newline at end of file + - [ARMv7-A programmer Guide](https://developer.arm.com/documentation/den0013/latest/) +- [LLD BareMetal tutorial](https://github.com/rockytriton/LLD) +- [Circle baremetal framework as a reference](https://github.com/rsta2/circle) +- [FAT32 specs](https://academy.cba.mit.edu/classes/networking_communications/SD/FAT.pdf) +- [Baremetal SD card on the RPI4 blog post](https://forums.raspberrypi.com/viewtopic.php?t=308089)