User Tools

Site Tools


EECS 582 W15 / EECS 373 W15 - Machine Setup


The hardware from Lab11 primarily uses the TI CC2538, TI CC2520, and Nordic nRF51822 microcontrollers and radios.

  • CC2538: Cortex M3 + 802.15.4 radio
  • CC2520: 802.15.4 radio
  • nRF51822: Cortex M0 + BLE radio



  1. You need an ARM toolchain for embedded devices. Download the gcc-arm-embedded compiler for your machine.

    On Linux:

    # Need 32 bit libs if you don't have them
    sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
    tar xf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
    ### If you get permission errors with programming
    sudo usermod -a -G dialout <your username>
    #then logout and log back in

    On Mac:

    tar xf gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2

    Make sure the bin folder is in your path.

    To test this, run:

    arm-none-eabi-gcc --version

    This will let you compile code for the CC2538 and nRF51822.

CC2538 Based Platforms

  1. Git clone the Contiki Operating System. You want to do this recursively in order to fetch the BSL programming script as well.

    git clone --recursive

    Contiki has code support for the CC2538. See the cpu/cc25238 folder.

  2. Make sure that the version of cc2538-bsl in contiki is up to date. They sometimes have a really old version.

    cd contiki/tools/cc2538-bsl
    git pull origin master
  3. Git clone the Atum github repository. This has Contiki code for the Atum platform.

    git clone

    It also contains board files and BOMs for the hardware.

  4. Git clone the ACme++ repository. This has Contiki code and board files for the ACme++ power meter.

    git clone

nRF51822 (Squall, Nucleum, etc.) BLE Based Platforms

The nRF51822 is based on three main parts: the "softdevice" from Nordic, the SDK from Nordic, and an application. The softdevice is essentially the BLE stack and the SDK is a library for the device peripherals. There are multiple softdevices: the S110 is for a BLE peripheral, the S120 is for a BLE master node, and the S130 supports both modes.

  1. Download and the Segger flashing tools for your platform. If you want to do GDB debugging be sure to also download and install the debugging tools.

  2. If you are using Squall, git clone the Squall repository. This has some config files and applications for the nRF51822. Again, do this recursively to get the programming script.

    git clone --recursive

    If you are using nucleum, use the nucleum repo:

    git clone --recursive


Test that things are setup correctly.

You should be able to compile blink for the Atum board.

cd atum/contiki/apps/blink

If you get an error, make sure that CONTIKI = points to where the Contiki repo is checked out in the Makefile.

Similarly, you should be able to compile blink for the Nordic platforms.



If you get an error about no rule to build a .o file, make sure that you have all the git submodules checked out.


Loading code onto the hardware should be pretty straightforward.

CC2538 Platforms

make install


Programming the nRF51822 requires loading the softdevice (BLE stack) and then loading the actual code.

Make sure that the blue LED is on on the programming adapter board. If not:

$ JLinkExe
> power on perm
> ctrl+d

To load the app:

make flash

The softdevice will automatically be flashed.

Next Steps

nRF51822 Programming

Be sure to check out the repo. There are some library functions that make creating a service and advertisements much easier than using the raw Nordic APIs.

eecs582w15/setup/start.txt · Last modified: 2015/11/20 13:41 by bradjc