

This corresponds to the default channel setting declaration CC2538_RF_CONF_CHANNEL definition in platform/cc2538dk/contiki-conf.h.

Then, select the “CC2531 USB Dongle”as capturing device and set the IEEE 802.15.4 Channel option as 0x19 under “Radio Configuration” tab. Start SmartRF Packet Sniffer, and choose “Generic” protocol: Download and install the SmartRF Packet Sniffer from TI website. Using the SmartRF Flash Programmer v1, flash the sniffer firmware to CC2531 USB dongle (filename: sniffer_fw_cc2531.hex, usually located under /SmartRF Tools/Packet Sniffer/bin/general/firmware) – CC-Debugger is needed as hardware programmer interface. In order to sniff the Rime broadcast message, I am using the CC2531 USB dongle which is delivered within the CC2538DK. Select Button: transmit a Rime broadcast message.Down and Up Buttons: rebooting system (using watchdog and soft reset respectively).Open a hyper-terminal like software on the PC, and set the UART setting to 115200 8N1 to see the following output:Īs described in the cc2538-demo.c source file, the users can interact with the demo using the on-board CC2538DK push-buttons by the following manner: Running the CC2538DK DemoĪfter successfully building the cc2538-demo.bin binary, flash it to the hardware kit using SmartRF Flash Programmer v2. However it is much easier now (at least for me) to navigate between files, doing search, and also finding declarations/implementations of functions, variables, macros, etc. Notice that it is not possible to compile single file using the Code::Blocks IDE with the settings described above. The following screenshot shows how the cc2538dk example is successfully built: Under “Project” -> “Properties” -> “Project settings” tab, make sure that the option “This is a custom Makefile” is checked and the execution directory points to the contiki-2.7/examples/cc2538dk folder.Īfter that, it should be safe to execute “Build” and wait until the cc2538-demo.bin is generated after successful compilation. In the compiler setting window, choose the “GNU ARM GCC Compiler” as the selected compiler, make sure that the compiler binaries prefix is “arm-none-eabi-“, and finally add the path to the GNU ARM compiler toolchain binaries and also cygwin (for the make.exe) folder under the “Additional Paths” tab: Open it using the Code::Blocks IDE (I am using Code::Blocks v13.12 for Windows), and first make sure that the compiler setting is correct by going to “Settings” -> “Compiler…”. Put it under the contiki-2.7/examples/cc2538dk. The Code::Blocks project file (.cbp) can be downloaded from my google drive.ĭownload the ZIP file and extract it to find the cc2538-demo.cbp project file. I found a way to compile the example project using the Code::Blocks IDE. Working with only text editors (I normally user Notepad++) and Contiki package is somehow difficult for me. Execute “make TARGET=cc2538dk” at the folder and wait until the cc2538-demo.bin is successfully generated.Īnyway, I must admit that I am somehow spoiled with the usage of IDE. in my case since I extracted the Contiki 2.7 package under C:/work, the cygwin folder is /cygwin/c/work/contiki-2.7/examples/cc2538dk).

Use the Cygwin terminal to navigate to the example folder (e.g. The example shows basically basic input-output operation (push-button input, LED output), and also basic Rime broadcast communication ( Rime is the light-weight wireless protocol used in Contiki).This blog post describes step-by-step guide to compile, run, and analyze the cc2538dk example of Contiki 2.7.Ĭompiling the cc2538dk example is really similar to the hello-world example which is described in my previous post. Looking into the list of examples, the Contiki 2.7 is also delivered with a CC2538DK specific example which is located under contiki-2.7/examples/cc2538dk. In my previous post, I have shown the step-by-step guide to compile the basic hello-world demo of Contiki 2.7 for CC2538DK on Windows.
