Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
/ cc3200tool Public archive
forked from ALLTERCO/cc3200tool

A small tool to write files in TI's CC3200 SimpleLink (TM) filesystem.

License

Notifications You must be signed in to change notification settings

mon/cc3200tool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CC3200 Tool

A small tool to write files in TI's CC3200 SimpleLink (TM) filesystem.

Copyright (C) 2016-2020 Allterco Robotics

Archived

I no longer work with the CC3200, so no longer have the motivation to update this tool. If you want active development, please migrate to the toniebox-reverse-engineering fork. It contains improvements such as

  • Reading/writing all files at once
  • Reading from image file dumps instead of a live device
  • Improved support for the CC3220

Rationale

The only other tool which can officially do this is Uniflash, but good luck using that on a modern Linux system.

There is also cc3200prog which Energia sneak in their toolchain tarball, but it's not open source and can only write to /sys/mcuimg.bin.

Finally, there's the great guys at Cesanta who reversed the CC3200 bootloader protocol just enough to make day-to-day development on the platform possible. However, their tool is specific to smart.js and feeds on specially-crafted zip archives.

This tool is based on the work done by Cesanta but is written in Python and exposes a generic cli interface for uploading user files and application binaries on a CC3200-attached serial flash.

cc3200tool can upload NWP/MAC/PHY firmwares (/sys/servicepack.ucf), but it seems this only works on a clean FS. The tool also implements the functionality described in TI's Application Note CC3100/CC3200 Embedded Programming.

Installation

This runs on Python >=3.6 with recent pySerial.

To install, if you have pip and want system-wide:

pip install git+git://github.com/mon/cc3200tool.git

or clone this repǫ

git clone http://github.com/mon/cc3200tool.git
cd cc3200tool

then it's just like any other python package:

python setup.py install # as root, system-wide

# or in a virtualenv with pip
virtualenv env && ./env/bin/activate
pip install -e .
# then get updates with
git pull

Usage

You need a serial port connected to the target's UART interface. For programming to work, SOP2 needs to be asserted (i.e. tied to VCC) and a reset has to be peformed to switch the chip in bootloader mode. cc3200tool can optionally use the RTS and DTR lines of the serial port controller to automatically perform these actions via the --sop2 and --reset options.

See cc3200tool -h and cc3200tool <subcommand> -h for complete description of arguments. Some examples:

# upload an application
cc3200tool -p /dev/ttyUSB2 --sop2 ~dtr --reset prompt \
    write_file ./exe/myapp.bin /sys/mcuimg.bin

# format and upload an application binary
cc3200tool -p /dev/ttyUSB2 \
    format_flash --size 1M \
    write_file exe/program.bin /sys/mcuimg.bin

# dump a file on stdout
cc3200tool read_file /sys/mcuimg.bin -

# format the flash, upload a servciepack and two files
cc3200tool -p /dev/ttyUSB2 --sop2 ~rts --reset dtr \
    format_flash --size=1M \
    write_file --file-size=0x20000 \
        --signature ../servicepack-ota/ota_1.0.1.6-2.6.0.5.ucf.signed.bin \
        ../servicepack-ota/ota_1.0.1.6-2.6.0.5.ucf.ucf /sys/servicepack.ucf \
    write_file ../application_bootloader/gcc/exe/application_bootloader.bin /sys/mcuimg.bin \
    write_file yourapp.bin /sys/mcuimg1.bin

# list file and filesystem statistics (occupied and free block sequences)
cc3200tool -p /dev/ttyUSB2 list_filesystem

# Reads all files to a directory and creates subdirectory structure
cc3200tool -p /dev/ttyUSB2 read_all_files extract/

# Writes all files from a directory and its subdirectories (add --simulate to skip writing)
cc3200tool -p /dev/ttyUSB2 write_all_files extract/

About

A small tool to write files in TI's CC3200 SimpleLink (TM) filesystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%