Skip to content

toolkit: validate arguments *after* modification is complete #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions toolkit/app-write-mram.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,12 @@ def main():
argList = args.images

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

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

if sys.platform == "linux" or sys.platform == "darwin":
argList = argList.replace("../", "")

print("[INFO]", action + argList)

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

if (
burn_mram_isp(
Expand Down
8 changes: 4 additions & 4 deletions toolkit/bin/application_package.ds
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set semihosting args ../build/AppTocPackage.bin 0x8057bf50
continue
wait
reset reset.hardware
set semihosting args build/AppTocPackage.bin 0x8057bf50
continue
wait
reset reset.hardware