diff --git a/README.md b/README.md new file mode 100644 index 0000000..85f1097 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# raspi demo for oled ssd1306 display + +## Quick start + +> nix-shell +> +> rustup target add arm-unknown-linux-musleabihf +> +> cargo build --release --target arm-unknown-linux-musleabihf + +Then scp the release file to your raspi. + +## Example + +![picture](./images/01.jpg) + +![primitive](./images/02.jpg) diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..eb954d4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,7 @@ +with (import {}); +mkShell { + nativeBuildInputs = [ + pkgsCross.muslpi.stdenv.cc + ]; + CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER = "${pkgsCross.muslpi.stdenv.cc}/bin/armv6l-unknown-linux-musleabihf-ld"; +}