Skip to main content

CC3200 development on Linux

Submitted by mcfish on Sun, 04/12/2016 - 19:53

This article shows how to compile and install NuttX real-time OS to CC3200 launchpad using Fedora (26) Linux.

--

Link between Linux and CC3200:

Connecting the board to usb port on stock kernel (4.11.xx) produces this:

[...] usb 1-1.4: new full-speed USB device number 6 using ehci-pci
[...] usb 1-1.4: New USB device found, idVendor=0451, idProduct=c32a
[...] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[...] usb 1-1.4: Product: USB <-> JTAG/SWD
[...] usb 1-1.4: Manufacturer: FTDI
[...] usb 1-1.4: SerialNumber: cc3101
[...] usbcore: registered new interface driver ftdi_sio
[...] usbserial: USB Serial support registered for FTDI USB Serial Device
[...] usb 1-1.4: Ignoring serial port reserved for JTAG
[...] ftdi_sio 1-1.4:1.1: FTDI USB Serial Device converter detected
[...] usb 1-1.4: Detected FT2232C
[...] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0

and voilà, you don't need to do anything else. Actually only reason this section even exists, is because in the previous version of the article (with fedora 24 and kernel 4.2) you had to manually insert ftdi_sio kernel module to get working tty. So if you are wondering where those instructions went, well you don't need them anymore.

Installing development packages:

OpenOCD 0.10 / Arm compiler + gdb debugger / apps to compile utilities

dnf install openocd arm-none-eabi-gdb arm-none-eabi-gcc-cs gperf flex bison ncurses-devel minicom autoconf automake libtool

Install kconf tools:

Version provided by NuttX tools repo, is unfortunately too old to compile in F26, but this problem is easy to avoid. Just use the tool from the original author:

git clone git://ymorin.is-a-geek.org/kconfig-frontends
cd kconfig-frontends
autoreconf -fi
./configure --enable-mconf
make
sudo make install

Download and compile NuttX:

Download latest stable version (you need both packages):

https://bitbucket.org/nuttx/nuttx/downloads/nuttx-7.22.tar.gz

https://bitbucket.org/nuttx/nuttx/downloads/apps-7.22.tar.gz

Extract packages, apps package should go inside the nuttx folder:

tar xf ~/nuttx-7.22.tar.gz
tar xf ~/apps-7.22.tar.gz -C nuttx-7.22/

After you have downloaded and extracted packages, you can compile the nuttx:

cd nuttx-7.22/tools
./configure.sh -a apps-7.22 cc3200-launchpad/nsh
cd ..
make menuconfig
make

Here are some places to visit while in menuconfig section:

  • RTOS Features / Clocks and Timers
    • Set today as start year/month/day

Programming NuttX to board:

To program cc3200 board, you need to set jumpers like in the picture below.

J6 & J7 (middle) = Flash setting<
J8 (left side) = Connected
SOP (right side) = col 2 connected, col 1 & 0 .. not connected

--

Now to program (and debug) CC3200, you need to first fire up openocd.

openocd -f /usr/share/openocd/scripts/board/ti-cc3200-launchxl.cfg

And if everything went fine, you should see the following:

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 100 kHz
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Info : clock speed 100 kHz
Info : JTAG tap: cc32xx.jrc tap/device found: 0x0b97c02f (mfg: 0x017 (Texas Instruments), part: 0xb97c, ver: 0x0)
Info : JTAG tap: cc32xx.dap enabled
Info : cc32xx.cpu: hardware has 6 breakpoints, 4 watchpoints

Now leave the openocd running in terminal, and open new terminal. Go to the nuttx directory (you should have nuttx binary in this folder), and start up gdb debugger:

arm-none-eabi-gdb

Type in the following commands (bolded).

(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x00000000 in ?? ()

(gdb) load nuttx

Loading section .text, size 0xe207 lma 0x20004000
Loading section .ARM.exidx, size 0x8 lma 0x20012208
Loading section .data, size 0x5c lma 0x20012210
Start address 0x20004488, load size 57963
Transfer rate: 7 KB/sec, 9660 bytes/write.

Now reset the board and connect to NuttX using minicom:

minicom -o -D /dev/ttyUSB1

If everything works, you should be greeted with screen like this:

But if nothing happens, visit minicom settings (press "Ctrl+a" then right after "o"-letter, and select serial port setup) and make sure you have settings like these:

--

Changes to the article:

  • 29.1.2016 - Updated article to use nuttx 7.14 (from 7.12) and Energia 17 (from 16)
  • 13.9.2016 - Updated article to use nuttx 7.17, Fedora 24 and Energia 18
  • 9.10.2017 - Updated article to use nuttx 7.22, Fedora 26 and ditched energia (as the project is now dead)

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
12 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.