1
Fork 0

update linux example compilation instructions

This commit is contained in:
juliangaal 2019-06-06 19:29:35 +02:00
parent b86b9d77c1
commit e25c04d782

View file

@ -63,23 +63,21 @@ fn main() -> Result<(), Error<LinuxI2CError>> {
``` ```
#### Compile linux example (Raspberry Pi 3B) #### Compile linux example (Raspberry Pi 3B)
files [here](https://github.com/juliangaal/mpu6050/blob/master/example/)
Requirements: Requirements:
```bash ```bash
$ apt-get install -qq gcc-armv7-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross $ apt-get install -qq gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross
``` ```
and all dependencies in `example/Cargo.toml`
Rustup: Rustup:
```bash ```bash
$ rustup target add armv7-unknown-linux-gnueabihf $ rustup target add armv7-unknown-linux-gnueabihf
``` ```
To configure the linker use `example/.cargo/config` To configure the linker use `.cargo/config` file
cross-compile with cross-compile with
```bash ```bash
$ cargo build --target=armv7-unknown-linux-gnueabihf $ cargo build --examples --target=armv7-unknown-linux-gnueabihf
``` ```
## TODO ## TODO