I decided to test my CC3200-Launchxl board and after pluging the board on USB it reports:
usb 3-2: new full-speed USB device number 4 using xhci_hcd
usb 3-2: New USB device found, idVendor=0451, idProduct=c32a
usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-2: Product: USB JTAG/SWD
usb 3-2: Manufacturer: FTDI
usb 3-2: SerialNumber: cc3101
Nice, but it didn’t create a ttyUSB serial interface. Fortunately I discovered this trick!
$ sudo modprobe ftdi_sio
$ sudo echo 0451 c32a > /sys/bus/usb-serial/drivers/ftdi_sio/new_id
Now the ttyUSB interface is created:
$ dmesg
...
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 3-2:1.0: FTDI USB Serial Device converter detected
usb 3-2: Detected FT2232C
usb 3-2: Number of endpoints 2
usb 3-2: Endpoint 1 MaxPacketSize 64
usb 3-2: Endpoint 2 MaxPacketSize 64
usb 3-2: Setting MaxPacketSize 64
usb 3-2: FTDI USB Serial Device converter now attached to ttyUSB0
ftdi_sio 3-2:1.1: FTDI USB Serial Device converter detected
usb 3-2: Detected FT2232C
usb 3-2: Number of endpoints 2
usb 3-2: Endpoint 1 MaxPacketSize 64
usb 3-2: Endpoint 2 MaxPacketSize 64
usb 3-2: Setting MaxPacketSize 64
usb 3-2: FTDI USB Serial Device converter now attached to ttyUSB1
Then I decide to compile NuttX for this board:
$ git clone git://git.code.sf.net/p/nuttx/git nuttx
$ cd nuttx/nuttx
$ cd tools
$ ./configure.sh cc3200-launchpad/nsh
$ cd ..
$ make menuconfig
$ make
$ cp nuttx.bin /tmp
Now is time to flash nuttx.bin in the board. First you need to put the board in bootloader mode. You need to remove the jumpers from TCK and from SOP2, then connect TCK to SOP2 using a female header wire, just connect an end of wire to TCK pin (pin nearest to TCK label) and another end of wire to pin SOP2 (pin nearest to number 2 label at SOP area). Press RESET button and execute:
# ./cc3200prog /dev/ttyUSB1 /tmp/nuttx.bin
Open UART /dev/ttyUSB1
open UART success
Getting storage list
Bootloader Version: 4
Unable to open file dll/rbtl3101_132.dll
Silicon version ES1.32 or higher
Unable to open file dll/rbtl3100s.dll
Load common boot command for PG1.33 or higher
erasing file "/sys/mcuimg.bin"
deleting file "/sys/mcuimg.bin"
erase file completed
Downloading file "/sys/mcuimg.bin" with size 54460
Open operation failed
Hmm, I need these *.dll (although its name, it is not a Windows DLL), these files are inside energia-0101E0013-*.tgz package:
$ cp -r energia-0101E0013/hardware/tools/lm4f/bin/dll .
Lets try again:
# ./cc3200prog /dev/ttyUSB1 /tmp/nuttx.bin
Open UART /dev/ttyUSB1
open UART success
Getting storage list
Bootloader Version: 4
Silicon version ES1.32 or higher
Bootloader version is 2, 1, 4, 0
It's a CC3200 device: PG1.33 or higher
Switch UART pinmux to APPS
Switch to NWP bootloader complete
Load common boot command for PG1.33 or higher
Bootloader version is 2, 0, 4, 0
BlockSize is 4096, number of blocks is 16
erasing 13 blocks starting from 0
erasing file "/sys/mcuimg.bin"
deleting file "/sys/mcuimg.bin"
erase file completed
Downloading file "/sys/mcuimg.bin" with size 54460
..............
Download complete
After resetting the board, NuttX will start and you will see it on ttyUSB1 (115200 8n1):
CC3200 init
NuttShell (NSH)
nsh>
You can remove the wire connected to TCK and SOP2 pins. Also you can return with TCK jumper, but please don’t return SOP2 jumper, otherwise NuttX will not boot from external flash.