This directory contains example platform drivers for the Texas Instruments CC2538.
The example platform drivers are intended to present the minimal code necessary to support OpenThread. As a result, the example platform drivers do not necessarily highlight the platform's full capabilities.
Download and install the GNU toolchain for ARM Cortex-M.
In a Bash terminal, follow these instructions to install the GNU toolchain and other dependencies.
$ cd <path-to-openthread> $ ./script/bootstrap
In a Bash terminal, follow these instructions to build the cc2538 examples.
$ cd <path-to-openthread> $ ./bootstrap $ make -f examples/Makefile-cc2538
If the build completed successfully, the elf
files may be found in <path-to-openthread>/output/cc2538/bin
.
To flash the images with Flash Programmer 2, the files must have the *.elf
extension.
$ cd <path-to-openthread>/output/cc2538/bin $ cp ot-cli ot-cli.elf
To load the images with the serial bootloader, the images must be converted to bin
. This is done using arm-none-eabi-objcopy
$ cd <path-to-openthread>/output/cc2538/bin $ arm-none-eabi-objcopy -O binary ot-cli ot-cli.bin
The cc2538-bsl.py script provides a convenient method for flashing a CC2538 via the UART. To enter the bootloader backdoor for flashing, hold down SELECT for CC2538DK (corresponds to logic ‘0’) while you press the Reset button.
/dev/ttyUSB1
(serial port settings: 115200 8-N-1).help
for list of commands.> help help channel childtimeout contextreusedelay extaddr extpanid ipaddr keysequence leaderweight masterkey mode netdataregister networkidtimeout networkname panid ping prefix releaserouterid rloc16 route routerupgradethreshold scan start state stop whitelist