Development Environment

Hardware Requirements and Configurations

BeagleBone Black With CoProcessor and Multiple Sensors

The TI 15.4-Stack SDK Linux Example Applications can be executed from BBB as explained in this document. The following hardware is required:

  • BeagleBone Black
  • 8GB (or more) micro-SD memory card (required to program the processor SDK Image)
  • One Ethernet cable
  • One Linux machine running Ubuntu 18.04 LTS
  • At least two CC13xx/CC26x2 LaunchPad™ development kits
    • LaunchPad 1 acts as the CoProcessor, which is the interface to the 802.15.4 network
    • LaunchPad 2+ are the network nodes that join the TI 15.4-Stack-based network
  • FTDI cable
  • One USB cable to connect the LaunchPad to the BBB
  • One 5-V power supply or mini USB cable to power the BBB
../_images/fig-app-on-bbb.png

Figure 4. Network Configuration With Application Running on the BBB

Linux® x86 PC With CoProcessor and Multiple Sensors

The TI 15.4-Stack Linux SDK Example Application can be executed from an x86 machine running Ubuntu® connected through USB to a CC13xx/CC26x2 LaunchPad running the TI 15.4-Stack CoProcessor Application. The following hardware is required:

  • A Linux x86 PC running Ubuntu OS 18.04 LTS

  • USB cable to connect to the LaunchPad

  • At least two CC13xx/CC26x2 LaunchPad™ development kits

    • LaunchPad 1 acts as the CoProcessor, which is the interface to the 802.15.4 network
    • LaunchPad 2+ are the network nodes that join the TI 15.4-Stack-based network
    ../_images/fig-host-config.png

    Figure 5. Network Configuration With Application Running on the x86_64 PC Running Ubuntu® OS

Required Software

This section explains how to set up the hardware with the desired software to build and run the TI 15.4-Stack Linux SDK out-of-box example applications and setup to develop custom applications.

Linux® Development Host

The x86 machine running Ubuntu can be used to develop and run the applications as well as cross compile the applications for the BBB platform. This section provides setup instructions to build, develop, and run the applications on an x86 machine. This section also provides setup instructions for the x86 machine for cross-compiling on the BBB platform.

Note

When developing for the BBB platform on an x86 machine, the C code is cross-compiled and linked as a BBB application on your host x86 Linux_64 machine. The Arm executable is then copied to the BBB to run the application.

When cross-compiling, executables are named host_<name>, which means the compilation host. The prefix bbb_<name> is used as a target prefix for the BBB.

Install the following software on your x86_64 machine running Ubuntu 18.04 LTS 64-bit to run the TI 15.4-Stack Linux SDK out-of-box example applications.

  1. Install the TI 15.4-Stack Linux SDK

    1. Download the TI 15.4-Stack Linux SDK on to your Linux machine.

      Note

      Because the installer is a 64-bit Linux executable, it requires a 64-bit Linux machine.

    1. On the host (Linux x86_64) machine, go to the directory where the Linux Installer is located and use the following commands to install:

      $chmod +x ti15.4stack_linux_x64_xx_xx_xx_xx.run
      $./ti15.4stack_linux_x64_xx_xx_xx_xx.run
      

      Note

      The $ symbol prompt indicates that this installer should be run as a normal user. Do not run as a ROOT (with the # prompt).

      The default TI 15.4-Stack install directory is: ${HOME}/ti/simplelink/ti154stack_linux_64_xx_xx_xx_xx

  2. Do an update

    $sudo apt-get update
    
  3. Install the package: build essentials

    $sudo apt-get install build-essential
    
  4. Install the package: Node.js

    $sudo apt-get install Node.js
    
  5. Your user name must be a member of the group dialout

    $sudo adduser $USER dialout
    
  6. To cross-compile for BBB, install TI’s AM335x Sitara Processor SDK for Linux . TI’s processor SDK for AM335x contains all of the cross- compilation tools, headers, libraries, and other required files for cross- compiling to the BBB.

    Note

    1. In the TI 15.4-Stack Linux SDK, the processor SDK is installed in the following location: /home/${USER}/ti-processor-sdk-linux- am335x-evm-xx.xx.xx.xx
    2. The TI processor SDK download is very large and expands to an even larger installation (the download is approximately 3GB, the installed footprint is approximately 4.5GB) and is only required to build the Example Applications through a cross-compilation scheme.

    If the TI processor SDK is installed in a different location or is a different version, then the following two files must be updated:

    • File 1: ${SDK_ROOT}/scripts/front_matter.mak
    • File 2: ${SDK_ROOT}/example/cc13xx-sbl/app/linux/Makefile

    Listing 1. is a screenshot from the front_matter.mak file (adjust the version numbers as required).

    Listing 1. Screenshot From File front_matter.mak
    #========================================
    # These *MAY* need to be adjusted to fit your SDK install.
    # NOTE: The Boot loader also has a macro that may need updating.
    # SEE: ${root}/example/ccl3xx-sbl/app/linux/Makefile
    #----------------------------------------
    # What is the Processor SDK Root directory
    #----------------------------------------
    bbb_TI_PROC_SDK_DIR=${HOME}/ti-processor-sdk-linux-am335x-evm-
    xx.xx.xx.xx
    

    Your x86 machine running Ubuntu should now be ready to run the build and run the example applications or to cross-compile applications for the BBB platform.

  7. To test and verify the setup, build the Linux application from source with the following instructions:

    1. Change to the TI 15.4-Stack ${SDK_ROOT} installation directory

      $cd ${HOME}/ti/simplelink/ti15.4stack-x.xx.xx.xx
      
    2. At the bash$ prompt, type the following:

      # builds the host version
      $bash ./build_all.sh
      # cross-compiles the BBB version. See Makefile for more details.
      $bash ./build_all.sh bbb
      
    3. The script builds the component libraries and the example applications.

      Note

      The script also creates *.log files of the compilation process.

  8. Next, configure the BBB (see BeagleBone Black), or go to the step to program the LaunchPad with the desired flash images. See Program the Launchpads (using the Linux Flash Programing tool), or see Running the Example Applications, which discusses the Windows flash tool.

BeagleBone Black

The BBB can be used in two different ways to develop and run the applications:

  • Method 1: As a runtime environment only, software is generally developed (edited, compiled, and linked) on a host x86 Linux machine and then deployed (or copied) to the BBB.
  • Method 2: As a development environment, the edit, compile, and link processes are done directly on the BBB.

The following steps provide details on how to set up the BBB for both methods described previously.

  1. Program the micro-SD memory card with the TI Linux Processor SDK version 05.03.00.07.

    1. Download the prebuilt processor SDK image am335x-evm-linux- xx.xx.xx.xx.img.zip (version 5.03.00.07) from AM335x Sitara Processor SDK for Linux. Follow the instructions at the wiki page to program the micro-SD memory card through Windows: Processor SDK Linux Creating a SD Card with Windows The Linux method is described in Processor SDK Linux create SD card script.

    2. To boot from the SD card, take the following actions:

      1. Disconnect power and unplug USB cable from the BBB.

      2. Insert the SD card.

      3. Press (and hold) the boot switch (see Figure 6.).

      4. Apply power to the BBB (through a USB or through a barrel connector).

      5. Wait a few seconds; then release the boot switch.

        Note

        The boot switch is only detected at power up.

      6. In about 5 to 15 seconds, the LEDs will start blinking.

        ../_images/fig-boot-bbb.png

        Figure 6. Boot Switch Location

  2. Determine the IP address of the BBB. To monitor and control the TI 15.4-Stack Network when using the TI 15.4-Stack Linux SDK out-of-box Gateway Application, you must know the IP address of the BBB.

    • Method 1: Connect to the Host PC through a USB cable, as shown in Figure 7..
      • The USB IP address is hard coded as 192.168.7.2 and is assigned during boot. This uses the RNDIS driver.
    ../_images/fig-bbb-linux-usb.jpeg

    Figure 7. USB Connection

    • Method 2: Use a network router or PC, as shown in Figure 8..
    ../_images/fig-bbb-connection-router.png

    Figure 8. Network Router or PC Connection

    • The network router assigns a random IP address through DHCP to the BBB based on the order in which the devices power up (for example, if today the BBB powers up first, the BBB receives BBB = xx.xx.xx.100 and laptop = xx.xx.xx.101; however, tomorrow the IP address might reverse, or perhaps a new device is present on the router [for example, a cell phone]).

    The following two options are used to determine the assigned IP address:

    • Use the Router HTTP Management page.

      Each router brand is different (the generic name is DHCP Client Table). See Table 1. for a list of example routers.

    Table 1. DHCP Client Table Examples
    Brand Example Link
    LinkSys http://www.linksys.com/us/support-article?articleNum=139502
    NetGear http://documentation.netgear.com/fvs336g/enu/202-10257-01/FVS336G_RM-11-07.html
    Belkin http://www.belkin.com/pyramid/AdvancedInfo/F5D8235-4/Advance/reserveIP.htm
    • Use an FTDI USB serial cable and a terminal application.

      Perform the following steps to use an FTDI USB serial cable and a terminal application:

      1. Before booting the Beagle board, first connect the Ethernet cable and connect an FTDI (USB serial) cable. Open a terminal program using the settings 115200 8-N-1.
      2. Power-cycle the BBB (remember to press and hold the boot switch shown in Figure 6.).
      3. Wait until the Beagle board has finished booting.
      4. Log into the BBB using the user name root.
      5. Type the command ifconfig, then the IP address appears on the screen shown in Figure 9..
      6. Copy the inet addr.
      ../_images/fig-bbb-ifconfig.jpeg

      Figure 9. Getting the IP Address of BBB

  3. Prebuilt.tar file. On the Linux PC, use the following commands to transfer the prebuilt.tar file with built binaries to the BBB. The prebuilt.tar file can be found here:

    • In the Linux SDK, the file is under the following: ${SDK_ROOT}/prebuilt/bbb_prebuilt.tar.gz
  4. Copy the bbb_prebuilt file to the BBB. Substitute the appropriate address for the ${BBB_IP_ADDRESS} that follows:

    $ cd ${SDK_ROOT}/prebuilt
    $ scp bbb_prebuilt.tar.gz root@${BBB_IP_ADDRESS}:~/.
    

    Note

    1. Other tools can be used, such as Windows Secure Copy (WinSCP) or FileZilla.
    2. The target directory ~/. is shorthand for roots ${HOME} directory (that is, /home/root).
    3. Later during development, Secure Copy (SCP) can be used to copy new binary files to the BBB.
  5. Log into the BBB and unpack the prebuilt.tar.gz file. Type the following commands:

    # connect to the BBB
    $ssh root@${BBB_IP_ADDRESS}
    
    root@am335x-evm# cd ${HOME}
    root@am335x-evm# tar xf bbb_prebuilt.tar.gz
    

    The prebuilt applications are found in the prebuilt directory.

  6. OPTIONAL: Perform the following steps to copy the Linux example SDK source code to the BBB to build and run the application on BBB:

    1. Create a .tar file of the entire ${SDK_ROOT} directory.
    2. Copy this new .tar file from your Linux host to the BBB through scp (for more details, see the previous note about where the prebuilt files are copied).
    3. Unpack the .tar file.
    4. See Building the Applications From Source for details about how to build on the BBB.

    The BBB is now ready to run the TI 15.4-Stack SDK Linux example applications.

  7. Next, flash program the Launchpads. See Program the Launchpads for using the Linux Flash Programing tool; also see Running the Example Applications where the Windows flash tool is discussed.

Program the Launchpads

This section provides instructions on how to program the CC13xx/CC26x2 LaunchPads with the required hex files. Prebuilt firmware files are in the ${SDK_ROOT}/firmware directory.

  • Program one LaunchPad (See Figure 10. [A]) with the $(SDK_ROOT)/firmware/coprocessor<target_board>.hex image, Label this LaunchPad *CoProcessor.
  • Program all other LaunchPads (See Figure 10. [B]) with the $(SDK_ROOT)/firmware/default/sensor_default.hex image. Label these LaunchPads as *sensors.
../_images/fig-program-lps.png

Figure 10. Program the LaunchPads

There are three options to program the LaunchPads:

The LaunchPads are now ready. Running the Example Applications describes how to run the out-of-box Collector and Gateway Applications.

Programming the CoProcessor Application

The TI 15.4-Stack Linux SDK includes a prebuilt hex file for the MAC CoProcessor. This hex file can be programmed through the SmartRF Flash Programmer v2 (see SmartRF Flash Programmer to download) or Uniflash Flash Tool. In addition, the workspace of the TI 15.4-Stack CoProcessor CCS project is included with the SimpleLink SDK. Refer to the TI 15.4-Stack Users Guide on how to program the device using CCS.

Option 2: - SmartRF Flash Programmer v2

Open the SmartRF Flash Programmer v2 on the Windows machine. Figure 11. shows the steps to program the CC13xx device with the desired hex file.

../_images/fig-flash-programmer2-expl.jpeg

Figure 11. Steps to Program the CC13xx LaunchPad Using the SmartRF Flash Programmer v2

Note

  1. When connecting the LaunchPad, the SmartRF program might update the debugger firmware in the on-board XDS-110 debug feature.
  2. Troubleshooting Hint 1: It is easy to confuse various LaunchPads (that is, sensor versus CoProcessor), so be sure to label each device properly.

Options 3 - Use the Uniflash Flash Tool

Open the Uniflash Flash Tool and connect the LaunchPad to the PC.

Run UniFlash, and perform the following steps:

Note

  1. Uniflash will automatically find any LaunchPads that are connected to your PC.
  • Go to the Settings & Utilities tab in Uniflash and erase all unprotected sectors (See Figure 12.)
../_images/UniFlash_1.png
  • Before programming the device, change the Erase settings back to Necessary Sectors Only (Retain untouched content within sector), (See Figure 13.)
../_images/UniFlash_2.png
  • In the Program tab, under Flash image(s), browse to the pre-built sensor hex file, located at: *$(SDK_ROOT)/firmware/default/sensor_default.hex
  • Make sure to first Load Image and then afterwards Verify Image (See Figure 14.)
../_images/UniFlash_3.png