Skip to content

chunsj/nxctrl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

BeagleBone Black Control Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages