packaging: also support rpmbuild from Tizen:2.3
[contrib/mraa.git] / docs / beaglebone.md
1 Beaglebone Black    {#beaglebone}
2 ================
3
4 The Beaglebone Black is a very maker friendly Board with a huge amount of
5 available I/O Pins. It consists of an Cortex-A8 single core CPU plus two
6 additional microcontroller cores called 'pru' that can be used for realtime
7 tasks.
8
9 The official Beaglebone Black Image runs Debian on a 3.8.13 Kernel. But there
10 are also mainline kernels available, either from Robert C. Nelson or also as
11 part of the upcoming Fedora 22 release.
12
13 The kernel releases from Robert C. Nelson have usually more complete support as
14 not all code is yet commited to mainline kernel, your mileage may vary!
15
16 In Kernel 3.8.13 there is a Capemanager included, a mechanism to load
17 configuration data for devices and extension boards from userland.
18
19 This mechanism does not (yet) exist in Mainline kernels, so for mainline
20 kernels you need to either rely on the pre-delivered devicetree's or you will
21 need to build your own devicetree to support hardware not available by default.
22
23 Revision Support
24 ----------------
25 Beaglebone Black Rev. B
26 Beaglebone Black Rev. C
27
28 Interface notes
29 ---------------
30
31 **SPI** works fine with 3.8.13 kernels, on Mainline Kernel SPI does currently
32 not work. mraa will activate spi on 3.8.13 if it finds out that spi is not yet
33 configured
34
35 **I2C** works both on 3.8.13 and mainline. i2c is activated if missing for
36 3.8.13 kernels
37
38 Mainline Kernel requires the use of Device-Trees, mraa tries it's best to guess
39 which gpio/serial/i2c/spi is connected where but there is currently no support
40 to manipulate the Device-Tree settings from within mraa.  If a device does not
41 work as expected then please check syslog, mraa usually complains with a
42 meaningful message when it is unable to initialize the device.
43
44 It will also tell you which overlay for SPI/COM/I2C/PWM it tries to load, on
45 some older Debian distributions (or heaven forbid, on Angström) you may need to
46 install thoses overlays to /lib/firmware
47
48 Capes and further documentation
49 -------------------------------
50
51 Correctly configuring i2c/spi/serial can get a little challenging as some pins
52 have double functionality or are not available at all because hdmi is enabled.
53 When something does not work as expected make sure to first check the syslog,
54 then check the Beaglebone documentation. Some pointers for good descriptions
55 are:
56
57 http://elinux.org/BeagleBone_Black_Enable_SPIDEV
58 http://elinux.org/Interfacing_with_I2C_Devices
59
60 When working with mainline kernels take every hit you have on google with a
61 grain of salt, a lot of documentation is based on 3.8 and older kernels. Using
62 mainline kernels can be very rewarding, but at least at time of writing also
63 can have some nasty
64 pitfalls.
65
66 Pin Mapping
67 -----------
68
69 mraa will take into account if you have hdmi cape or mmc enabled and will show
70 you the gpio's available for your given configuration.
71
72 To see the pin mapping use the command:
73
74 $ sudo mraa-gpio list