allterco / cc3200tool Goto Github PK
View Code? Open in Web Editor NEWA small tool to write files in TI's CC3200 SimpleLink (TM) filesystem.
License: GNU General Public License v2.0
A small tool to write files in TI's CC3200 SimpleLink (TM) filesystem.
License: GNU General Public License v2.0
$ cc3200tool
Traceback (most recent call last):
File "/usr/local/bin/cc3200tool", line 22, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/cc3200tool/cc.py", line 695, in main
args = commands[0]
IndexError: list index out of range
This tool was born out of necessity, but is no longer actively used in Allterco. There are now a few pull requests, and a few tasks that need to be done, Python3 support probably being the most important one as well as CC3220 support.
There are now a number of active forks, some of which implement both of the above, as well as other neat features. I wish there was a single, well-maintained, authoritative source where development progresses. This is a callout to @AlexLisnitski, @otsaregorodtsev, @s1ider, @SciLor, @mon and everyone else who contributed to this project in the past -- would you like to take over maintenance and integration of new features?
Thanks for the tool! It's a pity that TI does not provide a way to program the device in CLI.
When I do a format or a write file there is no error, but when I try to read a file it returns: "/sys/mcuimg.bin does not exist on target"
Do you have any idea what could be the source of the issue?
See the whole logs below if it can help:
C:\Users\cedric\AppData\Local\Programs\Python\Python36\python.exe C:/workspace/cc3200tool/cc3200tool/cc.py -p COM3 --sop2 ~dtr --reset ~rts read_file /sys/mcuimg.bin -
2017-11-13 11:02:50,561 -- Connecting to target...
2017-11-13 11:02:55,863 -- timed out while waiting for ack
2017-11-13 11:02:56,065 -- Connected, reading version...
2017-11-13 11:02:56,067 -- connected to target
2017-11-13 11:02:56,067 -- Version: CC3x00VersionInfo(<memory at 0x000001C98E529AC8>, <memory at 0x000001C98E529B88>, <memory at 0x000001C98E529C48>, <memory at 0x000001C98E529D08>, <memory at 0x000001C98E529DC8>)
2017-11-13 11:02:56,067 -- This is a CC3200 device
2017-11-13 11:02:56,067 -- Switching to NWP bootloader...
2017-11-13 11:02:56,082 -- Switching UART to APPS...
2017-11-13 11:02:56,098 -- Resetting communications ...
2017-11-13 11:02:57,314 -- Uploading rbtl3100s.dll...
2017-11-13 11:02:57,315 -- Getting storage list...
2017-11-13 11:02:57,332 -- Getting storage info...
2017-11-13 11:02:57,346 -- storage info bytes: 0x10, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0
2017-11-13 11:02:58,050 -- APPS version: CC3x00VersionInfo(<memory at 0x000001C98E97E288>, <memory at 0x000001C98E97E348>, <memory at 0x000001C98E97E408>, <memory at 0x000001C98E97E4C8>, <memory at 0x000001C98E97E588>)
Traceback (most recent call last):
File "C:/workspace/cc3200tool/cc3200tool/cc.py", line 813, in
main()
File "C:/workspace/cc3200tool/cc3200tool/cc.py", line 801, in main
cc.read_file(command.cc_filename, command.local_file)
File "C:/workspace/cc3200tool/cc3200tool/cc.py", line 694, in read_file
raise CC3200Error("{} does not exist on target".format(cc_fname))
main.CC3200Error: /sys/mcuimg.bin does not exist on target
On a related subject, In Uniflash there is the option to "List file System". Is it possible to implement this without too much reverse engineering?
Hi,
I am trying this cc3200tool on Windows 7 64-bit laptop and got an issue. The following is the message. Should it work on Windows machine?
Thanks,
2017-02-02 15:04:02,364 -- Connecting to target...
2017-02-02 15:04:02,566 -- Connected, reading version...
2017-02-02 15:04:02,566 -- connected to target
2017-02-02 15:04:02,566 -- Version: CC3x00VersionInfo((0, 4, 1, 2), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (16, 0, 0, 0))
2017-02-02 15:04:02,566 -- This is a CC3200 device
2017-02-02 15:04:02,582 -- Switching to NWP bootloader...
2017-02-02 15:04:02,582 -- Switching UART to APPS...
2017-02-02 15:04:02,598 -- Resetting communications ...
2017-02-02 15:04:03,815 -- Uploading rbtl3100s.dll...
2017-02-02 15:04:03,815 -- Getting storage list...
2017-02-02 15:04:03,831 -- Getting storage info...
2017-02-02 15:04:03,845 -- storage info bytes: 0x10, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0
Traceback (most recent call last):
File "cc3200tool.py", line 761, in
File "cc3200tool.py", line 737, in main
File "cc3200tool.py", line 545, in switch_to_nwp_bootloader
File "cc3200tool.py", line 440, in _raw_write
TypeError: object of type 'NoneType' has no len()
Failed to execute script cc3200tool
Gang image programming
cc3200tool -p /dev/ttyUSB0 write_flash gangimage.bin
fails with:
TypeError: _send_packet() takes at least 2 arguments (1 given)
After changing line 424 of cc.py from
self._send_packet()
to
self._send_packet(command)
I get a new error:
cc3200tool.cc.CC3200Error: No ack for packet opcode=0x30
Using the --no-erase
option makes write_flash work,
cc3200tool -p /dev/ttyUSB0 write_flash --no-erase true gangimage.bin
however, the written gang image does not boot (presumably because the flash was not initially empty).
Hi, I've started to look at the cc3220.
After a minor adaption of your tool to handle the new version (and playing around with various settings in uniflash 4.3) , I managed to connect to a device in development mode.
Differences I found:
1: The system version is different:
Launchpad cc3220SF version = CC3x00VersionInfo((0, 1, 0, 3), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (25, 48, 0, 0))
2: The file info is different:
File without security on cc3220
0x0 0x4 0x1 0x2a 0x0 0x0 0x0 0x1 0x0 0x0 0xe 0x48 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x1
File without security on cc3200
0x1 0x8 0x0 0x2a 0x0 0x0 0x0 0x2 0x0 0x0 0xe 0x48 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
3: Files must be defined without the "/"
Otherwise everything seems to be working ok in Development mode.
Production mode
When programming the device with Uniflash in Production mode, I can call the device actions like GetVersionInfo but when doing something on a file I get nack response (open_file and get_file_info for example). I would expect it only for secure file, but I get it on any type of file.
By any chance, have you tested something on the cc3220?
If I build a release version of my program the image winds up being 77176 and it flashed fine using cc3200tool.
However, when I try to flash by debug build (175896 bytes), it fails to flash.
2614 >./flash.sh
+ cc3200tool -p /dev/ttyUSB1 --sop2 '~dtr' --reset prompt write_file target/thumbv7em-none-eabi/debug/sensorweb-firmware.bin /sys/mcuimg.bin
2016-12-01 20:30:15,145 -- Connecting to target...
Reset the device with SOP2 asserted and press Enter
2016-12-01 20:30:25,292 -- Connected, reading version...
2016-12-01 20:30:25,294 -- connected to target
2016-12-01 20:30:25,294 -- Version: CC3x00VersionInfo((0, 4, 1, 2), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (16, 0, 0, 0))
2016-12-01 20:30:25,294 -- This is a CC3200 device
2016-12-01 20:30:25,295 -- Switching to NWP bootloader...
2016-12-01 20:30:25,296 -- Switching UART to APPS...
2016-12-01 20:30:25,298 -- Resetting communications ...
2016-12-01 20:30:28,558 -- timed out while waiting for ack
2016-12-01 20:30:28,813 -- Uploading rbtl3100s.dll...
2016-12-01 20:30:28,814 -- Getting storage list...
2016-12-01 20:30:28,816 -- Getting storage info...
2016-12-01 20:30:28,818 -- storage info bytes: 0x10, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0
2016-12-01 20:30:29,504 -- APPS version: CC3x00VersionInfo((0, 4, 0, 2), (0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0), (16, 0, 0, 0))
2016-12-01 20:30:29,507 -- File exists on target, erasing
2016-12-01 20:30:29,510 -- Erasing file /sys/mcuimg.bin...
2016-12-01 20:30:29,597 -- Uploading file target/thumbv7em-none-eabi/debug/sensorweb-firmware.bin -> /sys/mcuimg.bin [175896]...
2016-12-01 20:30:39,607 -- timed out while waiting for ack
Traceback (most recent call last):
File "/usr/local/bin/cc3200tool", line 22, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/cc3200tool/cc.py", line 746, in main
command.signature, command.file_size)
File "/usr/local/lib/python2.7/dist-packages/cc3200tool/cc.py", line 621, in write_file
self._open_file_for_write(cc_filename, alloc_size)
File "/usr/local/lib/python2.7/dist-packages/cc3200tool/cc.py", line 485, in _open_file_for_write
return self._open_file(filename, flags)
File "/usr/local/lib/python2.7/dist-packages/cc3200tool/cc.py", line 493, in _open_file
self._send_packet(command)
File "/usr/local/lib/python2.7/dist-packages/cc3200tool/cc.py", line 370, in _send_packet
"No ack for packet opcode=0x{:02x}".format(ord(data[0])))
cc3200tool.cc.CC3200Error: No ack for packet opcode=0x21
I tried doubling the timeout on line 270 from 5 to 10 with no change. I'm running on Ubuntu 16.04 and trying to flash a cc3200 LAUNCHXL board.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.