Skip to content

Board: BeagleBone

Jose Alamos edited this page Aug 9, 2018 · 2 revisions

WARNING: This entry will be deprecated. All content has been moved to


BeagleBone is an $89 MSRP, credit-card-sized Linux computer that connects to the Internet and runs software such as Android 4.0 and Ubuntu. With plenty of I/O and processing power for real-time analysis provided by an AM335x 720MHz ARM® processor, BeagleBone can be complemented with cape plug-in boards to augment functionality.




MCU AM3359
Family ARM Cortex-A8
Vendor TI
Package 324NFBGA
RAM 256 MB
Flash 1 GB
Frequency up to 1 GHz
FPU no
Timers 8 (8 x 32bit)
ADCs 8-ch 12-bit
SPIs 2
I2Cs 3
Vcc 3.3V - 5.0V
System Reference Manual System Reference Manual
BeagleBone Website Website

Flashing RIOT

In order to get our code onto the BeagleBone, we are using a bootloader called "u-boot". To install this on our SD card, the following steps have to be completed:

  1. First of all, we will need a toolchain in order to cross-compile code for the board. We used the arm-none-eabi chain, but there are other options (for example arm-linux-gnueabi). Both of these can be found in the user repositories.

  2. Now we clone u-boot from their git repository and compile it. The CROSS_COMPILE variable should be set accordingly, of course.

    • git clone git:// && cd u-boot
    • ARCH=arm CROSS_COMPILE=arm-none-eabi- make am335x_evm_config
    • ARCH=arm CROSS_COMPILE=arm-none-eabi- make
  3. Now we have to prepare the SD card, which means formating it to FAT32. This can be done for example with

    • mkfs.vfat -F 32 /dev/sdx
  4. Lastly we simply mount the SD card and copy the files "u-boot.img" and "MLO" located in the u-boot directory onto the SD card.

When we now open the device with a serial terminal such as minicom (we can also recommend cutecom), u-boot should be giving us a prompt. The simplest way from this point is to send the code via the serial port:

  • loady prepares u-boot for data transfer and after recieving the data, it will load the code to a specific address (usually 0x80200000) and can now be started using go 0x80200000. !!If this starting address differs, the DDR address in the linkerscript ( has to be set accordingly!!

  • it should be noted that the code cannot be in .elf format, it has to be a binary. Fortunately, RIOT make already creates a .hex that we can use.

When working on a bigger project, it might be worth the time to set up u-boot's tftpboot, which enables us to send the data via ethernet and automatically execute it. In order to achieve this, a local DNS server has to be set up and a config file for u-boot has to be stored on the SD card.

  1. as a DNS server we can recommend dnsmasq - since we want to load a file from a specific location, this location has to be known to the program. To achieve this, we edit the config file (/etc/dnsmasq.conf). Find these 2 lines, uncomment them and make sure to name the directory where you want to place the code in the future. NOTE: dnsmasq has to be running when we want to send data via FTP.

    • #Enable dnsmasq's built-in TFTP server
    • #enable-tftp
    • #Set the root directory for files available via FTP.
    • #tftp-root=/home/user/riot/bin
  2. the config file has to be named uEnv.txt and in it we want to set a couple of variables. Here is an example of what it can look like:

    • ipaddr=
    • serverip=
    • gatewayip=
    • netmask=
    • hostname=mycomputer
    • rootpath=/home/user/riot/bin
    • bootfile=helloworld.hex
    • tftpboot=echo Booting from network...; tftp ${loadaddr} ${serverip}:${bootfile}; setenv bootargs ${bootargs}; go ${loadaddr};
    • uenvcmd=run tftpboot;

    More info on the variables

    U-boot will check the path named in rootpath for the file named in bootfile and run it. This should be the same as the tftp-root we set for our DNS server before.

Now we simply copy the uEnv.txt onto our SD card (like we did with u-boot.img and MLO). The board should now automatically attempt to load and start the code from the specified directory upon booting (make sure to have dnsmasq running). We can still stop this automatic boot and use the bootloader as we did before.

Clone this wiki locally
You can’t perform that action at this time.