Skip to content

Commit

Permalink
Add cargo-config for arm musl target
Browse files Browse the repository at this point in the history
  • Loading branch information
bofh69 committed Mar 26, 2024
1 parent ddeb8df commit 4ba397c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.armv7-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4ba397c

Please sign in to comment.