Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Cross compiling for zero from Ubuntu #2

Open
@n8henrie

Description

Are you cross compiling these from Ubuntu as described at https://disconnected.systems/blog/rust-powered-rover/ ?

Essentially:

sudo apt install -y build-essential gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross

curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable

source $HOME/.cargo/env

tee $HOME/.cargo/config <<'EOF'
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
EOF

rustup default stable
rustup target add arm-unknown-linux-gnueabihf

Then cargo build --release --target arm-unknown-linux-gnueabihf?

Using those instructions, even hello world segfaults for me when compiled from Ubuntu for Pi Zero (though the same binary runs fine on armv7 like RPi3).

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions