TI Wi-Fi CC3200 LaunchPad & CC3100 BoosterPack - Review

Table of contents

RoadTest: TI Wi-Fi CC3200 LaunchPad & CC3100 BoosterPack

Author: migration.user

Creation date:

Evaluation Type: Evaluation Boards

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: I havn't considered any other part comparable to this product.

What were the biggest problems encountered?: Even though gcc compiler is supported and examples were there, but most of the examples doesn't have a gcc folder and a Makefile. Also examples like EMAIL was unable to build using IAR trial version due to code size limitation, so I am forced to use GCC, but still it is okay for me.

Detailed Review:

     Hi, first of all, thanks to element14 and Ti for giving me an opportunity for evaluating the CC3200 Wi-Fi SoC Launchpad board. This single chip solution is really amazing, it can connect to internet via Wi-Fi and at the same time it can do many things which an ARM cortex-m4 microcontroller can do. This seems to be like a perfect solution for single chip IOT SoC.

I am a linux user and mostly I prefer free and opensource tool chain for playing with ARM, AVR, msp430 etc. I was so happy to see the 'gcc' folder in few example folders. If the arm toolchain is properly configured, simply typing 'make' on terminal will compile the source code. Later to burn it to the controller we can use OPENOCD which now supports almost all FTDI based devices. The applications of this board/cc3200 is endless. We can do many things, the most important thing to notice is that if the application is not a heavy data streaming, we can configure it for ultra low power consumption and can run for many months on a 2 AA cells which makes it more suitable for battery operated security system, sensor data accumulation and pushing to server, home automation, remotely control home appliances, etc etc etc. The applications are endless, it totally depends on the person's imagination, nothing other than that... The user doesn't require a lot of Knowledge in networking and communication, basic knowledge is enough to get started with this because there are lot of example codes and templates available at TI website SimpleLink Wi-Fi CC3200 LaunchPad - CC3200-LAUNCHXL - TI Tool Folder which is more than enough for getting started and actual implementation of his/her ideas.

 

Free and Open source tool chain support:

https://launchpad.net/gcc-arm-embedded/+download

     We can download gcc based toolchain for ARM microcontrollers from the above link. Also currently it is there by default in ubuntu repository, I am not sure about other distros. Simply an apt-get install gcc-arm-none-eabi will do the job of installing the tool chain. I always like to use free software for hobby purpose. I am little bit unhappy because TI doesn't provide enough examples for gcc based build. I can see only few example like blinky, pwm etc which is having a gcc folder with Makefile. Even though TI took the initiative to show free software support, but according to me it was not enough because most of the examples doesn't have the GCC folder. For a beginner it will be little difficult to start with gcc because he need to create Makefiles and need to build few libraries for most of the example codes. I tried the EMAIL example using IAR but since it is code size limited trial version I was unable to build the particular example because it is going out of memory. So I thought of using gcc because I am little bit familiar with it as I worked on stm32, LM4F, AVR, msp430 etc using gcc ports in linux.

 

Compiling EMAIL example using gcc-arm-non-eabi tool chain in linux:
     First step is to download cc3200SDK which is an exe file containing library files and examples. Using wine we can install in under linux and then we can move the folder out from .wine/~ folder.

      I created a gcc folder under ~/CC3200_SDK/cc3200-sdk/example/email and  copied the existing Makefile for blinky example to this folder. Then I opened the IAR project in IAR evaluation version and observed all the include paths, source files and library files and then added those to the Makefile. In addition to all these, the preprocessor definitions (-D) should also be added to the Makefile. I copied the linker script from the blinky example,  and modify the heap size as mentioned in the IAR linker. After that, I needed to build few dependency libraries, say ~/CC3200_SDK/cc3200-sdk/netapps/smtp/client and few others because TI doesn't provide Makefile or gcc lib for those. It can be done by the same way, ie opening the IAR project file for these libraries and copying and modifying any existing Makefile for any other library which is having a Makefile (say osi-lib). Even though it is a bit difficult job for a beginner but it worth trying it, and for sure he/she will learn more. Below is the modified working Makefile for email application. (Just for a glance) You can download the working code from my git repo https://github.com/vinodstanur/cc3200_with_gcc_email_sending


#******************************************************************************
#
# Makefile - Rules for building the blinky example.
#
#  Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
   
ROOT=../../..
#
# Include the common make definitions.
#
include ${ROOT}/tools/gcc_scripts/makedefs

CFLAGS+= -Dgcc -DUSE_FREERTOS -DSL_PLATFORM_MULTI_THREADED -Os

#
# Where to find source files that do not live in this directory.

VPATH=../
VPATH+=../../common
VPATH+=../../../driverlib

#
# Where to find header files that do not live in the source directory.
#
IPATH=..
IPATH+=../..
IPATH+=../../../inc
IPATH+=../../../driverlib
IPATH+=../../common
IPATH+=../../../simplelink/include
IPATH+=../../../oslib/
IPATH+=../../../netapps/smtp/client
#
# The default rule, which causes the driver library to be built.
#
all: ${OBJDIR} ${BINDIR}
all: ${BINDIR}/blinky.axf

#
# The rule to clean out all the build products.
#
clean:
    @rm -rf ${OBJDIR} ${wildcard *~}
    @rm -rf ${BINDIR} ${wildcard *~}


#
# The rule to create the target directories.
#
${OBJDIR}:
    @mkdir -p ${OBJDIR}

${BINDIR}:
    @mkdir -p ${BINDIR}

#
# Rules for building the get_time example.
#
${BINDIR}/blinky.axf: ${OBJDIR}/main.o
${BINDIR}/blinky.axf: ${OBJDIR}/pinmux.o
${BINDIR}/blinky.axf: ${OBJDIR}/gpio_if.o
${BINDIR}/blinky.axf: ${OBJDIR}/network_if.o
${BINDIR}/blinky.axf: ${OBJDIR}/smartconfig.o
${BINDIR}/blinky.axf: ${OBJDIR}/timer_if.o
${BINDIR}/blinky.axf: ${OBJDIR}/uart_if.o
${BINDIR}/blinky.axf: ${OBJDIR}/button_if.o
${BINDIR}/blinky.axf: ${OBJDIR}/startup_gcc.o
${BINDIR}/blinky.axf: ${OBJDIR}/startup_${COMPILER}.o
${BINDIR}/blinky.axf: ${ROOT}/simplelink/${COMPILER}/${BINDIR}/libsimplelink.a
${BINDIR}/blinky.axf: ${ROOT}/oslib/${COMPILER}/${BINDIR}/FreeRTOS.a
${BINDIR}/blinky.axf: ${ROOT}/netapps/smtp/client/${COMPILER}/${BINDIR}/libemail.a
${BINDIR}/blinky.axf: ${ROOT}/driverlib/${COMPILER}/${BINDIR}/libdriver.a
SCATTERgcc_blinky=blinky.ld
ENTRY_blinky=ResetISR

#
# Include the automatically generated dependency files.
#
ifneq (${MAKECMDGOALS},clean)
-include ${wildcard ${OBJDIR}/*.d} __dummy__
endif
  

 

For the board to get connect with a Wi-Fi router we can pre-configure the SSID and password in ~/CC3200_SDK/cc3200-sdk/example/common/common.h file as below:

//
// Values for below macros shall be modified as per access-point(AP) properties
// SimpleLink device will connect to following AP when application is executed
//
#define SSID_NAME           "NETGEAR70"    /* AP SSID */
#define SECURITY_TYPE       SL_SEC_TYPE_WPA/* Security type (OPEN or WEP or WPA*/
#define SECURITY_KEY        "sorrynopassword"              /* Password of the secured AP */
#define SSID_LEN_MAX        32
#define BSSID_LEN_MAX       6
 


After this I added my temporary testing email address, password and SMTP server address in demo_config.h file as shown below:

///////////////////////////////////////////////////////////////////////////////
//All SMTP defines
#define SMTP_BUF_LEN         100
#define GMAIL_HOST_NAME         "smtp.gmail.com"
#define GMAIL_HOST_PORT         465
#define YAHOO_HOST_NAME            "smtp.mail.yahoo.com"
#define YAHOO_HOST_PORT        25
#define USER                    "vinod.automail@gmail.com" //Set Sender/Source Email Address 
#define USER_RFC                "vinod.automail@gmail.com" //Set Sender/Source Email Address 
#define PASS                    "sorryIcannotGivePswd"              //Set Sender/Source Email Password
#define RCPT_RFC                "vinod.mainaccount@gmail.com"  //Set Recipient Email Password 
#define EMAIL_SUB               "Hello from Simplelink WiFi!"
 


Now the build environment is done, now just need to type 'make' in the same Makefile folder. It is a good practice the create a folder named gcc inside the email project folder.

It will be some thing like below: (shell)

vinod@vinod:~/CC3200_SDK/cc3200-sdk/example/email/gcc$ ls
blinky.ld  blinkyq  cc3200.cfg  exe  Makefile  obj  openocd.log
vinod@vinod:~/CC3200_SDK/cc3200-sdk/example/email/gcc$

  


Build log after typing make comand:

vinod@vinod:~/CC3200_SDK/cc3200-sdk/example/email/gcc$ make
  CC    ../main.c
  CC    ../pinmux.c
  CC    ../../common/gpio_if.c
  CC    ../../common/network_if.c
  CC    ../smartconfig.c
  CC    ../../common/timer_if.c
  CC    ../../common/uart_if.c
  CC    ../../common/button_if.c
  CC    ../../common/startup_gcc.c
  LD    exe/blinky.axf
vinod@vinod:~/CC3200_SDK/cc3200-sdk/example/email/gcc$
  

 

 

Flashing the binary to CC3200 RAM:


     To flash and debug the binary, we can use OPENOCD. Basically while development time we can directly load the binary to RAM and towards the end we can load it to SPI flash using UNIFLASH so that on every bootup it can be loaded to RAM via a small bootloader. It is recommended to build the openocd from source by below commands in the openocd source folder.

 

./configure
make
sudo make install
  


Need to make sure  "MPSSE mode of FTDI based devices yes (auto)"  is shown while doing ./configure, else it won't build openocd for ftdi based devices, say cc3200 launchpad.

 

 

Using OpenOCD in version 0.8.0, the configuration file for the debug interface needs to be changed.

In ~/CC3200_SDK/cc3200-sdk/tools/gcc_scripts/cc3200.cfg replace the following few lines

interface ft2232
ft2232_layout luminary_icdi
ft2232_device_desc "USB <-> JTAG/SWD"
ft2232_vid_pid 0x0451 0xc32a
  

with

interface ftdi
ftdi_device_desc "USB <-> JTAG/SWD"
ftdi_vid_pid 0x0451 0xc32a
ftdi_layout_init 0x00a8 0x00eb
ftdi_layout_signal nSRST -noe 0x0020
  

 

Now after trying sudo openocd -f ~/CC3200_SDK/cc3200-sdk/tools/gcc_scripts/cc3200.cfg on terminal, if it shows below result, it is means it is working fine.

Open On-Chip Debugger 0.8.0 (2014-09-19-14:45)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
cc3200_dbginit
Info : clock speed 1000 kHz
Info : JTAG tap: cc3200.jrc tap/device found: 0x0b97c02f (mfg: 0x017, part: 0xb97c, ver: 0x0)
Info : JTAG tap: cc3200.dap enabled
Info : cc3200.cpu: hardware has 6 breakpoints, 4 watchpoints
  

 

Need to edit the OpenOCD start command in ~/CC3200_SDK/cc3200-sdk/tools/gcc_scripts/gdbinit by modifying one line as below:

target remote | openocd -c "gdb_port pipe; log_output openocd.log" -f ~/CC3200_SDK/cc3200-sdk/tools/gcc_scripts/cc3200.cfg

 

Now running the below command will start a gdb session:

arm-none-eabi-gdb -x ~/CC3200_SDK/cc3200-sdk/tools/gcc_scripts/gdbinit exe/blinky.axf
  

 

It will show

vinod@vinod:~/CC3200_SDK/cc3200-sdk/example/email/gcc$ arm-none-eabi-gdb -x ~/CC3200_SDK/cc3200-sdk/tools/gcc_scripts/gdbinit exe/blinky.axf
GNU gdb (7.6.50.20131218-0ubuntu1+1) 7.6.50.20131218-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from exe/blinky.axf...done.
Open On-Chip Debugger 0.8.0 (2014-11-13-00:51)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.sourceforge.net/doc/doxygen/bugs.html
0x0000230c in ?? ()
Loading section .text, size 0x11238 lma 0x20000000
Loading section .ARM, size 0x8 lma 0x20011238
Loading section .data, size 0x890 lma 0x20011240
Start address 0x20001bd8, load size 72400
Transfer rate: 64 KB/sec, 3620 bytes/write.
Breakpoint 1 at 0x20000cf0: file ../main.c, line 1127.

Breakpoint 1, main () at ../main.c:1127
1127    {
(gdb)
 

 

Now I need to type 'continue' in the same window, which is equivalent to clicking the run button on IAR debugger which will start running the code. To know more about the debugging commands it is recommended to read the manual for gdb. Before typing continue I should have opened a serial terminal for port  /dev/ttyUSB1 (in sudo mode if no udev rules are given). In serial terminal after typing 01 followed by /r/n it will try to connect to wifi router and if connection is successful, then RED led will glow continuously. Then typing 05 on serial terminal will send email to the receiver address if the sender address, password and SMTP server is confugured correctly.


Serial terminal Screen Shots:



Now it is waiting for commands. To connect to wifi AP I need to type 01.



Now it is connected to wifi router because Red led is stable, also it is shown in serial terminal...



 


After typing 05, it sends the email. Now the orange LED become stable, means email is sent, it is shown in the serial terminal also..



Email received in my gmail inbox !


 

GIT REPO:

https://github.com/vinodstanur/cc3200_with_gcc_email_sending



BLOG:

http://blog.vinu.co.in

Anonymous