From 4ba397c77ad7cf68661c05c6e0ede9135ddabd2e Mon Sep 17 00:00:00 2001 From: Sebastian Andersson Date: Tue, 26 Mar 2024 11:24:51 +0100 Subject: [PATCH] Add cargo-config for arm musl target --- .cargo/config.toml | 5 +++++ README.md | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..5942910 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.armv7-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc" + +[target.armv7-unknown-linux-musleabihf] +linker = "arm-linux-gnueabihf-gcc" diff --git a/README.md b/README.md index 77d2338..cd01639 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,9 @@ rustup target add armv7-unknown-linux-musleabihf sudo apt-get install gcc-multilib-arm-linux-gnueabihf musl-tools ``` -Add to `~/.cargo/config`: -``` -[target.armv7-unknown-linux-musleabihf] -linker = "arm-linux-gnueabihf-gcc" -``` - -Build with: +### Build with ```sh -CC=/usr/bin/musl-gcc cargo build --target armv7-unknown-linux-musleabihf --release +cargo build --target armv7-unknown-linux-musleabihf --release ``` The file is then in ./target/armv7-unknown-linux-musleabihf/release/otii_measurement