-
Notifications
You must be signed in to change notification settings - Fork 1
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
toolkit: validate arguments *after* modification is complete #7
toolkit: validate arguments *after* modification is complete #7
Conversation
Whoa I'm surprised to see you here!
It's fine, improvements to the tools are welcome! How are you liking the tools so far? Are going in the right direction? |
I like MicroPython. :) Small world!
The ideal direction really! |
Thanks for the contribution! But, would it be simpler to just adjust --- a/toolkit/bin/application_package.ds
+++ b/toolkit/bin/application_package.ds
@@ -1,4 +1,4 @@
-set semihosting args ../build/AppTocPackage.bin 0x8057bf50
+set semihosting args build/AppTocPackage.bin 0x8057bf50^M
continue
wait
reset reset.hardware ? |
Actually, your fix is correct, the code should definitely validate the paths after modifying them. But, IMO the modification to strip out |
Agreed. I aimed for lightest modification to the tools assuming new releases coming, should I try again by performing a bit more rework? |
Yes, that makes a lot of sense, that's also the approach we took. But, I think in this case, removing the code that strips out
Yes please! |
First an extra commit to illustrate the various locations where the It seems like the AlifSemi team prefers The long-term solution might be to use a Below just the fix discussed: |
The configuration file bin/application_package.ds was using a relative path, which had to be stripped away from every other location. This removes the "../" from both the configuration file and the "app-write-mrap.py" script Signed-off-by: Josuah Demangeon <[email protected]>
3fd8e5e
to
2f1d6cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for updating!
I tested it on a board, deploying the firmware, and it still works like it did before this PR.
The current toolkit modifies path on MacOS and Linux platforms. Perform this validation only after the path is modified to allow the script to be run on Linux and MacOSX without error.
Before:
After:
P.S.: Since we I benefit from this repo I try to contribute back... but we can silently maintain our own fork to avoid burdening MicroPython with extra Alif maintenance work.