Giter Site home page Giter Site logo

lbaitemple / bbb_pru_firmware Goto Github PK

View Code? Open in Web Editor NEW

This project forked from klekkala/bbb_pru_firmware

0.0 2.0 0.0 173 KB

This repository consists the source code for the firmware and servo kernel driver which can is used in connection with Beaglebone Blue APIs. For more info, please visit the blog post:

Home Page: http://linuxcreatures.com/pru-bb-blue

Batchfile 4.71% Makefile 8.36% C 86.93%

bbb_pru_firmware's Introduction

##Firmware and Kernel module for PRU Servo

The PRU in the beagelbone blue is used to support 8 servo/ESC(s) and an additional encoder (apart from the 3 encoder which are used by the TI eQEP driver. The board consists fo 2 PRUs, PRU-0 and PRU-1 which are used for servo and encoder respectively. Currently, this repository consists of the source code for the servo PRU firmware and the kernel driver fo rthe servo. Support for the encoder will be made soon. Please ensure that your beaglebone runs with the debian distro with kernel 4.4.12+. Follow the steps to build and install:

###Servo firmware: Before installing you need to setup your board with the TI PRU support package and compiler. mkdir /usr/share/ti/cgt-pru/bin

cd /usr/share/ti/cgt-pru/bin

ln -s /usr/bin/clpru clpru

echo -e "\nexport PRU_CGT=/usr/share/ti/cgt-pru\n" >> ~/.bashrc

. ~/.bashrc

git clone https://github.com/kiran4399/bbb_pru_firmware

cd bbb_pru_firmware/

make

sudo cp gen/servo_sysfs.out /lib/firmware/am335x-pru0-fw

To load the firmware to the PRU, reboot the PRU core, echo "4a334000.pru0" > /sys/bus/platform/drivers/pru-rproc/unbind 2>/dev/null

echo "4a334000.pru0" > /sys/bus/platform/drivers/pru-rproc/bind

If everything runs good, you need to see all positive messages when you do dmesg

###Kernel driver: Install the linux headers for your board sudo apt-get update

apt-cache search linux-headers-$(uname -r)

sudo apt-get install linux-headers-$(uname -r)

Assuming that you've already cloned the git repository: cd servo/

make

If everything goes well, you'd get a servo_sysfs.ko file. Install it as a module in the kernel by running the following command as root:

insmod servo_sysfs.ko

If the module is installed properly, then you'd see a servo_sysfs init message when you do dmesg

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.