OpenMoteCC2538

The openmote project has information posted here:

http://www.openmote.com/

This instruction set is a work in progress and might not have the most up to date information on it.  Please update and modify it as needed.

In order to get your openmote system set up, please start with the appropriate kickstart page but do not continue where it lists the TelosB hardware in the "Now with real hardware" section.

Once the general software is installed, the toolchain for the openmote should be installed.  The openmote uses a CC2538 chip which contains an arm M3.  Follow the instructions to set up a development environment for the firmware as listed here:

GNU ARM


OpenWSN support

The OpenMoteCC2538 is fully supported in OpenWSN.

The OpenWSN builders build the OpenMoteCC2538 firmware nightly:

Uploading binary file to CC2538 by command window:

  1. Initiate the GDB server by typing the following line into command window:

    Initiate GDB server
    $ /opt/SEGGER/JLink/JLinkGDBServer  -device CC2538SF53
    Terminal Output
    SEGGER J-Link GDB Server V4.84f Command Line Version
    JLinkARM.dll V4.84f (DLL compiled May  9 2014 20:11:58)
    -----GDB Server start settings-----
    GDBInit file:                  none
    GDB Server Listening port:     2331
    SWO raw output listening port: 2332
    Terminal I/O port:             2333
    Accept remote connection:      yes
    Generate logfile:              off
    Verify download:               off
    Init regs on start:            on
    Silent mode:                   off
    Single run mode:               off
    Target connection timeout:     5 sec.
    ------J-Link related settings------
    J-Link Host interface:         USB
    J-Link script:                 none
    J-Link settings file:          none
    ------Target related settings------
    Target device:                 CC2538SF53
    Target interface:              JTAG
    Target interface speed:        1000kHz
    Target endian:                 little
    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link V9 compiled Apr 15 2014 19:08:28
    Hardware: V9.00
    S/N: 269300326
    OEM: SEGGER-EDU
    Feature(s): FlashBP, GDB
    Checking target voltage...
    Target voltage: 3.28 V
    Listening on TCP/IP port 2331
    Connecting to target...
    J-Link found 2 JTAG devices, Total IRLen = 10
    JTAG ID: 0x4BA00477 (Cortex-M3)
    Connected to target
    Waiting for GDB connection...

    At this state, the connection to the board through the segger has been established, and waiting for any GDB connection

  2. Start on a new window of terminal, and start the gdb:

    start GDB
    $ arm-none-eabi-gdb
  3. Start loading the binary file that has been compiled before into the board by executing these following lines:

    Loading Binary File
    target remote localhost:2331
    monitor interface jtag
    monitor speed 5000
    monitor endian little
    monitor flash download = 1
    monitor flash breakpoints = 1
    monitor reset
    load anyBinaryFile.elf

    Remember to set the breakpoints correctly because it will be really useful in debugging the code.
    The terminal window should look like below:

    Terminal's look for GDB
    (gdb) target remote localhost:2331
    Remote debugging using localhost:2331
    0x00000000 in ?? ()
    (gdb) monitor interface jtag
    Select JTAG as target interface
    (gdb) monitor speed 5000
    Target interface speed set to 5000 kHz
    (gdb) monitor endian little
    Target endianess set to "little endian"
    (gdb) monitor flash download = 1
    Flash download enabled
    (gdb) monitor flash breakpoints = 60
    Flash breakpoints enabled
    (gdb) monitor reset
    Resetting target
    (gdb) load 01bsp_leds_prog
    Loading section .text, size 0x3de4 lma 0x200000
    Loading section .data, size 0x400 lma 0x203de4
    Loading section .flashcca, size 0xc lma 0x27ffd4
    Start address 0x20164c, load size 16880
    Transfer rate: 3296 KB/sec, 5626 bytes/write.
  4. Go to the where the break point is by using:

    Continue
    (gdb) continue
    Continuing.
  5. Don't forget to quit the GDB and GDB server.

    Attached here a bsp_leds file that blinks leds on the CC2538.   01bsp_leds_prog

Debug pin mapping on OpenMote

Under construction