Beagle Mac OS

On a Mac, I used the following procedure to write the SD card. First, download an image from beagleboard.org. I use 'Stretch IoT (non-GUI) for BeagleBone and PocketBeagle via microSD card'. Then unmount the SD drive and format it as FAT-32. (Replace XXX below with the right drive number; don't format your hard disk!). TP-Link AC600 USB WiFi Adapter for PC (Archer T2U Plus)- Wireless Network Adapter for Desktop with 2.4GHz, 5GHz High Gain Dual Band 5dBi Antenna, Supports Win10/8.1/8/7/XP, Mac OS 10.9-10.14 4.5 out of 5 stars 16,662.

Warning

This project is old and unmaintained, prefer BBBMini project

Get your BeagleBone running Debian¶

You will need a microSD card of 4GB or greater and a 5VDC power supplyof 1A or higher. You can also use a powered USB hub. It is highlyrecommended that you not use the USB port on a laptop, which has currentlimitations.

Go to the BeagleBoard website and get the latest image. You may find multipleimages on the page. For ArduPilot on BeagleBone Black you have todownload the Debian (BeagleBone Black - 2GB eMMC) image. Youcan find it under BeagleBone Black (eMMC flasher) header.

For example, the current imageis BBB-eMMC-flasher-debian-7.5-2014-05-14-2gb.The date (in this case 2014-05-14) and the version number (in this case7.5) may change. Make sure you download the latest image.

On Ubuntu/Mac OS X¶

Verify Image with:

before plugging your SD card into your computer, type

this will list the current mounted drives.

Now plug in your SD card and type

and see what the drive that was added is called.

In my case it was /dev/sdd1

in which case in the command below, the it is writtern dd of=/dev/sddreplace this with the correct address for your SD card.

Warning

IF YOU GET THIS WRONG YOU CAN WIPE YOUR HDD

then xzcat it to your SD card in your Ubuntu/Mac OS X machine

when this is finished, remove the SD Card and place it into your BBB.

On Windows¶

Download Win32 disk imager fromhere. Insert yourSD card, then start the application that you downloaded.

Select the image that you downloaded and then press Write.

when this is finished, remove the SD Card and place it into your BBB.

Flashing the image to the eMMC¶

Place the SD card in your BBB. Make sure you have removed Ethernet andall other USB devices from your BBB. Connect it to a wall adapter (5VDC1A) or a powered USB hub.

Press the boot button, and hold it down while booting, until all fourblue lights are solid.

Let go, and wait. It will take around 15 mins.

The lights will flicker a lot at this stage, you will know it iscomplete when the four lights return to solid Blue (no flickering).Power down the BBB and remove the SD card.

Connect the BeagleBone Black to your machine using the USB cord that’sprovided with it. Depending on your OS, install the requireddrivers.

Now ssh into the BeagleBone Black by typing

There is no password for the root user on the Debian image

You could also connect the BBB to your local network over Ethernet andssh to it.

The PixHawk Fire Cape¶

In order to run APM in the BeagleBone black you’ll need to use the rightset of sensors. Most of these sensors are included in the PixHawk Firecape (PXF), an open hardware board available from Erle Robotics store.

Making the rt kernel¶

(taken fromhttps://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel)

modified for the RT version, and to simplify.

Beagle Mass

Compiling the BeagleBone Black Kernel¶

The following contains instructions for building the BeagleBone Blackkernel on your PC with Ubuntu 13.04 O.S.

to make it simple, run¶

you may need to put in your password here…

if you do not have this already, make the following directory

mkdir /home/YOUR_USERNAME/export/rootfs

Prerequisites¶

ARM Cross Compiler¶

To compile the linux kernel for the BeagleBone Black, you must firsthave an ARM cross compiler installed on your linux box. I usegcc-4.7-arm-linux-gnueabi-base that comes with Ubuntu 13.04. To installthe compiler run:

GIT¶

The Beaglebone patches and build scripts are stored in a git repository.Install git:

And configure with your identity.

Beagle Mac OS

lzop Compression¶

The kernel is compressed using lzo. Install the lzop parallel filecompressor:

uBoot mkimage¶

The bootloader used on the BeagleBone black isu-boot. u-boot has a special imageformat called uImage. It includes parameters such as descriptions, themachine/architecture type, compression type, load address, checksumsetc. To make these images, you need to have a mkimage tool that comespart of the u-Boot distribution. Download u-boot, make and install theu-boot tools:

Compiling the BeagleBone Black Kernel¶

Here we compile the BeagleBone Black Kernel, and generate an uImage filewith the DTB blob appended to the kernel for ease of use.

Now we build any kernel modules:

And if you have your rootfs ready, you can install them:

Installing the RT kernel¶

After you have made the Linux kernel…

ensure you have Debian installed on the beaglebone and ssh into theBeaglebone from Linux….

(my ip address, adjust for your beaglebone)

Go to folder /boot/uboot/

make sure there is a backup folder there. If not:

then backup your zImage

then

it should show 3.8.13-bone28 or similar.

Now we need to go to our Ubuntu computers terminal. Ggo to your exportfolder that you made:

and run

Bagel Macros

then run

back on your Beaglebone run the following

you should now have both the old file and the new rt folder.

Now type:

Some useful tips¶

Hooking up the sensors¶

When hooking up your Sensor board it connects as follows (using SHORTwires)

I2c Debug¶

To detect if the i2c is working, you can use the following command

i2c check

The numbers: 1e, 53, 69, 77 are the MAG, Gyro, Accel, and Baro.(not inthat order)

Hooking up your Receiver¶

To be added

Hooking up your Airspeed sensor¶

To be added

Devices tested so far¶

Responded with the Who Am I request on SPI

  1. MPU6000
  2. MPU9250 (may have compass issues due to soldering of jumper wire)
  3. MS5611 (SPI)

Not responding on SPI

1 LSM9DS0 ( soldering issue, no connection to I/O

Responded to I2C detect

  1. CapeID EEPROM 0x54h AT24CS32
  2. CapeID COA_OTP 0x5Ch AT24CS32
  3. Crypto 0x64h ATSHA204
  4. Airspeed 0x28h MS4525DO-DS3AIXXXDS
  5. Compass Ext 0x1eh HMC5883L
  6. Power management 0x24 TPS65217C
  7. on-board EEProm 0x50h unknown
  8. HDMI core…. unused, do not enable 0x34

Not responded to I2C test

  1. MS5611 (I2C) 0x76h

2. RGB LED Driver 0x55h TCA62724 (is conflicting with non existent Capeeeprom)

Adjusting the BBB clock¶

cpufreq-info shows your current frequency

Edit /etc/default/cpufrequtils (you might need to create it if itdoesn’t exist). Specify the governor with the GOVERNOR variable:

add the following……

Beagle

CTRL-X to exit

Y to save

Reboot, and check to see that it has worked

Installing and Making ArduPilot on BBB¶

install git, make, gawk, g++, arduino-core on your BBB

then open

or

or

or

then

from this directory, run the tmp/Plane.elf (or Copter, or Rover)

Connecting to GCS¶

To be added……………

Status¶

The following table sumarizes the driver development status:

MilestoneStatus
ArduPilot running in the BBB (I2C connected sensors)Ok
Device Tree for the PXFWIP
MPU6000 SPI userspace driverOk
MPU9150 I2C userspace driverOk
LSM9DS0 SPI userspace driverCoded
MPU9250 SPI userspace driverCoded
MS5611 I2C/SPI userspace driverCoded
GPIO userspace driverWIP
I2CDriver multi-bus awareWIP
AP_InertialSensor_LinuxToDo
PRU PWM driverOk (issue with the PREEMPT_RT kernel)
MPU6000 SPI kernel driverWIP
MPU9150 I2C kernel driverToDo
LSM9DS0 SPI kernel driverToDo
MPU9250 SPI kernel driverToDo
MS5611 I2C/SPI kernel driverToDo

Status: ``Ok``, ``Coded`` (needs test), ``WIP`` (work in progress), ``Issue``, ``ToDo``

A case-sensitive volume is required:

To avoid some extra/unnecessary patching, make sure you have GNU versions of tar and sed ahead of your path.

Initialise the tree using repo (I picked manifests/rowboat-ics-am335x.xml, though you may wish to use TI's release 3.0.1 via manifests/TI-Android-ICS-4.0.3-DevKit-3.0.1.xml).

Run this: curl -s https://raw.github.com/gist/3071139/patch.sh bash

It will fail building the kernel, hence follow suggestions on iDriod project wiki:

It appears that you no longer need to mess around with malloc.h inclusion.

As TI suggests, you need to build u-boot first:

TI didn't not suggest this, but you will have to do this (unless you have u-boot host tools installed):

Fallow TI's instructions to build without the graphics driver (TODO: fix the SGX driver build):