Skip to content

Commit 4eb172f

Browse files
authored
Merge pull request #7 from tinyvision-ai-inc/pr-fix-path-validation
toolkit: validate arguments *after* modification is complete
2 parents 63698ef + 2f1d6cc commit 4eb172f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

toolkit/app-write-mram.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,12 @@ def main():
291291
argList = args.images
292292

293293
if args.skip:
294-
idx = argList.find("../build/AppTocPackage.bin 0x")
295-
argList = argList[idx : idx + 37]
294+
idx = argList.find("build/AppTocPackage.bin 0x")
295+
argList = argList[idx : idx + 35]
296296

297297
# validate all parameters
298298
argList = validateArgList(action, argList.strip(), args.pad)
299299

300-
if sys.platform == "linux" or sys.platform == "darwin":
301-
argList = argList.replace("../", "")
302-
303300
print("[INFO]", action + argList)
304301

305302
if method == "jtag" and not args.erase: # erase via jtag not yet supported!
@@ -438,7 +435,6 @@ def main():
438435
addr = items[e]
439436
address = int(addr, base=16)
440437
fileName = items[e - 1]
441-
fileName = fileName.replace("..\\", "")
442438

443439
if (
444440
burn_mram_isp(

toolkit/bin/application_package.ds

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set semihosting args ../build/AppTocPackage.bin 0x8057bf50
2-
continue
3-
wait
4-
reset reset.hardware
1+
set semihosting args build/AppTocPackage.bin 0x8057bf50
2+
continue
3+
wait
4+
reset reset.hardware

0 commit comments

Comments
 (0)