Giter Club home page Giter Club logo

rusty-pi's Introduction

Hardware Control on the Raspberry Pi with the Rust Language

A work in progress...

Current plan...

  1. Getting Started: intro to the Raspberry Pi, building a cross-compiler and setting up the development environment, parts for hardware tinkering. Rust learning: program entry point, the prelude
  2. Getting Physical: simple hardware control blinking LEDs and reacting to button presses via GPIO. Rust learning: I/O, error handling, enums, structs, traits, splitting a program into cooperating tasks, separating I/O from coordination
  3. Getting Fast: map GPIO device registers into memory for direct access, bit-bang a simple radio protocol. Rust learning: memory mapping, unsafe blocks, use Rust's type system to ensure safe access.
  4. Getting Connected: using the I2C bus to read from analogue-to-digital converters. Rust learning: using C functions and data structures. Native vs green runtimes.
  5. Getting Mobile: motor control or control of an RC vehicle.

This plan may change...

rusty-pi's People

Contributors

fdb avatar iamsebastian avatar npryce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rusty-pi's Issues

CFG_CMAKE needed

I'm very new at this. I'm trying to install this Rust compiler in order to use librespot. I have followed the instructions and downloaded pi-tools and rust to my home directory successfully. But when I type "export PATH=~/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH" (standing in the /rust directory) I'm not sure if something is happening, what is it supposed to do?
I tried to run the next line "./configure --target=arm-unknown-linux-gnueabihf --prefix=$HOME/pi-rust && make && make install" and it starts configuring, but then I get an error "CFG_CMAKE needed". is this because the pi-tools is not exported correctly?

configure: validating ./configure args configure: configure: configure: looking for build programs configure: configure: CFG_CURL := /usr/bin/curl (7.38.0) configure: CFG_PYTHON := /usr/bin/python2.7 configure: CFG_GIT := /usr/bin/git (2.1.4) configure: CFG_MD5 := configure: CFG_MD5SUM := /usr/bin/md5sum (8.23) configure: CFG_HASH_COMMAND := /usr/bin/md5sum | cut -c 1-8 configure: CFG_CLANG := configure: CFG_CCACHE := configure: CFG_GCC := /usr/bin/gcc (4.9.2-10) configure: CFG_LD := /usr/bin/ld (2.25) configure: CFG_VALGRIND := configure: CFG_PERF := configure: CFG_ISCC := configure: CFG_ANTLR4 := configure: CFG_GRUN := configure: CFG_FLEX := configure: CFG_BISON := configure: CFG_GDB := /usr/bin/gdb (7.7.1) configure: CFG_LLDB := configure: CFG_CMAKE := configure: error: CFG_CMAKE needed, but unable to find any of: cmake pi@raspberrypi:~/rust $

unknown CPU type: armv6l

Hello there,

If I run configure in rust directory, I get the following:

configure: looking for configure programs
configure: found program 'cmp'
configure: found program 'mkdir'
configure: found program 'printf'
configure: found program 'cut'
configure: found program 'head'
configure: found program 'grep'
configure: found program 'xargs'
configure: found program 'cp'
configure: found program 'find'
configure: found program 'uname'
configure: found program 'date'
configure: found program 'tr'
configure: found program 'sed'
configure: found program 'file'
configure: found program 'make'
configure: inspecting environment
configure: error: unknown CPU type: armv6l

But until now, I did not find any information about that problem.

Information about CPU on my raspberry (1, rev b, imho):

processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 2.28
Features        : half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 000d
Serial          : 0000000089ffe808

"Compiling the compiler" suggestion

Hello, thanks to your guide "Compiling the compiler" I got a nice RPi Rust cross-compiler working last night. However there was one roadblock that took a while for me to figure out, which was that I had to set LD_LIBRARY_PATH after the installation. I now know that the final output of make install is to tell you to make sure you set your LD_LIBRARY_PATH, but I guess I wasn't paying attention to it at first, and then running rustc gave me a rustc: symbol lookup error: rustc: undefined symbol: _ZN10lang_start20he89a41cbe8ac26fcWjeE error.

So I'd like to suggest adding the setting of LD_LIBRARY_PATH as an explicit step in the instructions, as I think it would help others like me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.