Skip to content

Commit e2c2810

Browse files
authored
Merge pull request #21 from toniebox-reverse-engineering/develop
v1.2.1
2 parents 45ac89d + a26121e commit e2c2810

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CC3200 Tool v1.2.0
1+
# CC3200 Tool v1.2.1
22

33
A small tool to read and write files in TI's CC3200 SimpleLink (TM) filesystem.
44
Partial support for the CC32XX (CC3230/CC3235) series (via flash image)

cc3200tool/cc.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ def __call__(self, string):
287287
parser_read_all_files.add_argument(
288288
"--by-file-id", action="store_true",
289289
help="Read unknown filenames by its id")
290+
parser_read_all_files.add_argument(
291+
"--all-by-file-id", action="store_true",
292+
help="Read all filenames by its id")
290293

291294
parser_write_all_files = subparsers.add_parser(
292295
"write_all_files",
@@ -1281,7 +1284,7 @@ def list_filesystem(self, json_output=False, inactive=False, extended=False):
12811284
if json_output:
12821285
fat_info.print_sffs_info_json()
12831286

1284-
def read_all_files(self, local_dir, by_file_id=False):
1287+
def read_all_files(self, local_dir, by_file_id=False, all_by_file_id=False):
12851288
fat_info = self.get_fat_info(inactive=False)
12861289
fat_info.print_sffs_info()
12871290
for f in fat_info.files:
@@ -1291,12 +1294,16 @@ def read_all_files(self, local_dir, by_file_id=False):
12911294

12921295
if ccname.startswith('/'):
12931296
ccname = ccname[1:]
1297+
12941298
target_file = os.path.join(local_dir, ccname)
1299+
if all_by_file_id:
1300+
target_file = os.path.join(local_dir, str(f.index))
1301+
12951302
if not os.path.exists(os.path.dirname(target_file)):
12961303
os.makedirs(name=os.path.dirname(target_file))
12971304

12981305
try:
1299-
if by_file_id and f.fname == '':
1306+
if all_by_file_id or ( by_file_id and f.fname == '' ):
13001307
self.read_file(ccname, open(target_file, 'wb', -1), f.index)
13011308
else:
13021309
self.read_file(f.fname, open(target_file, 'wb', -1))
@@ -1423,7 +1430,7 @@ def main():
14231430
cc.list_filesystem(command.json_output, command.inactive, command.extended)
14241431

14251432
if command.cmd == "read_all_files":
1426-
cc.read_all_files(command.local_dir, command.by_file_id)
1433+
cc.read_all_files(command.local_dir, command.by_file_id, command.all_by_file_id)
14271434

14281435
if command.cmd == "write_all_files":
14291436
use_api = True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="cc3200tool",
5-
version="1.2.0",
5+
version="1.2.1",
66
description="A tool to down-/upload files form/to TI CC3200",
77
author="Kiril Zyapkov, 0xbadbee",
88
author_email="k.zyapkov@allterco.com",

0 commit comments

Comments
 (0)