Git Product home page Git Product logo

nxctrl's Introduction

NXCTRL - BeagleBone Black Control Library
==========

I created this library because I do want to learn how to use
mmap and /dev/mem for controlling BBB pins and subsystems. So
there might be tons of bugs and non-recommented way of modifying
system. Use with caution.

NOTE that if you're using linux kernel 3.13.x like me you have
to unload or block default tscadc driver, otherwise, this code
will surely create stack trace of kernel.

For kernel 3.13.x and 3.14.x (which is I'm using now), you might 
need to modify default am335x-boneblack.dts file as included one. 
Main differences from default one is that I have removed pwm_test
related pin configuration for this library supposed to do it
without help of device tree (by directly modifying registers).

For 3.14.x kernel(currently 3.14.0 in arch linux), refer later part
of this file.

HOW TO USE (ArchLinuxARM and 3.8.13 kernel)
==========

1. Install basic development tools (base-devel)
   pacman -S base-devel git

2. Fetch nxctrl source code from git
   git clone https://github.com/chunsj/nxctrl.git

3. Back up original am335x-boneblack.dtb
   cp /boot/dtbs/am335x-boneblack.dtb $HOME/am335x-boneblack.dtb.original

4. Build new (pruss enabled) am335x-boneblack.dtb. You may need to install dtc.
   pacman -S dtc-overlay # if you do not have dtc installed
   dtc -I dts -O dtb am335x-boneblack-3.8.13.dts -o am335x-boneblack.dtb
   cp am335x-boneblack.dtb /boot/dtbs/

5. Build gpio pinmux utility kernel module
   cd nxpmx && make
   cp nxpmx.ko /lib/modules/extramodules-3.8--am33x-legacy
   depmod -a

6. Reboot

7. Load required modules: uio_pruss and nxpmx
   modprobe uio_pruss
   modprobe nxpmx

8. cd to nxctrl source directory and build it
   cd nxctrl
   make

9. Read, run example codes and find bugs and fix them :-)

Using PRUSS in 3.14 Kernel (ArchLinuxARM and 3.14 Kernel)
==========
1. Back up and build new am335x-boneblack.dtb using dts file for 3.14.
   cp /boot/dtbs/am335x-boneblack.dtb $HOME/am335x-boneblack.dtb.3.14.original
   pacman -S dtc-overlay # if you do not have dtc installed
   dtc -I dts -O dtb am335x-boneblack-3.14-mine.dts -o am335x-boneblack.dtb
   cp am335x-boneblack.dtb /boot/dtbs/

2. Build gpio pinmux utility kernel module and uio_pruss kernel module
   cd nxpmx && make
   cp nxpmx.ko /lib/modules/extramodules-3.14--am33x
   cd ..
   cd uio_pruss && make
   cp uio_pruss.ko /lib/modules/extramodules-3.14--am33x
   depmod -a

3. Reboot

4. Load required modules: uio_pruss and nxpmx
   modprobe uio_pruss
   modprobe nxpmx

nxctrl's People

Contributors

chunsj avatar

Watchers

James Cloos avatar  avatar

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.