|
| 1 | +- [Getting started](#getting-started) |
| 2 | + - [Links](#links) |
| 3 | + - [Pre-requisites](#pre-requisites) |
| 4 | + - [Running the code](#running-the-code) |
| 5 | +- [TODO Running the test](#todo-running-the-test) |
| 6 | +- [TODO for code](#todo-for-code) |
| 7 | +- [TODO for build script](#todo-for-build-script) |
| 8 | +- [TODO for quality of life](#todo-for-quality-of-life) |
| 9 | + |
| 10 | +# Getting started |
| 11 | + |
| 12 | +## Links |
| 13 | + |
| 14 | +- [Cargo binutils](https://github.com/rust-embedded/cargo-binutils) |
| 15 | +- [Embedded Rust book](https://doc.rust-lang.org/stable/embedded-book/) |
| 16 | +- [Lowlevel Embedded Rust book](https://docs.rust-embedded.org/embedonomicon/) |
| 17 | + |
| 18 | +## Pre-requisites |
| 19 | + |
| 20 | +- `rustup default stable` |
| 21 | +- `rustup target add <your_target>` |
| 22 | + - See **.cargo/config.toml** file |
| 23 | +- `cargo install cargo-binutils` |
| 24 | + |
| 25 | +## Running the code |
| 26 | + |
| 27 | +- `cargo build` |
| 28 | +- Run the code on the target board using the **.vscode/launch.json** configurations |
| 29 | + - These can also be manually run on the target using OpenOCD |
| 30 | + - Requires the **cortex-debug** vscode extension |
| 31 | + |
| 32 | +# TODO Running the test |
| 33 | + |
| 34 | +- `cargo test --target x86_64-pc-windows-msvc` |
| 35 | + - In my case I am running the code on a windows machine |
| 36 | + - This target would be your host operating system |
| 37 | + - Check using `rustup target list` |
| 38 | + |
| 39 | +# TODO for code |
| 40 | + |
| 41 | +- Understand the difference between |
| 42 | + - rust pointer |
| 43 | + - rust reference |
| 44 | + - rust mutable reference |
| 45 | + - rust mutable pointer |
| 46 | + - casting from reference to pointer |
| 47 | + - casting from pointer to reference |
| 48 | + |
| 49 | +# TODO for build script |
| 50 | + |
| 51 | +- Add custom cargo subcommands (for running post-build commands) |
| 52 | +- Create crates and deploy |
| 53 | +- Understand `std::process::Command` for invoking external commands during pre-build |
| 54 | + |
| 55 | +# TODO for quality of life |
| 56 | + |
| 57 | +- bindgen to convert `.h` files for `.rs` files |
| 58 | + - Other ways in which this can be converted |
| 59 | +- Core packages that can be used in embedded rust development |
| 60 | +- Using [**cargo make**](https://github.com/sagiegurari/cargo-make) |
0 commit comments