-
Notifications
You must be signed in to change notification settings - Fork 47
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
JLink: Add serial number argument to specify flashing target #118
base: master
Are you sure you want to change the base?
Conversation
a705ba1
to
a088a79
Compare
tockloader/jlinkexe.py
Outdated
).split(), | ||
) | ||
jtag_p = subprocess.Popen( |
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.
Huh?
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.
I don't entirely remember why this is here... I made these changes ~6 months ago but forgot to create the PR. I think this may have been an artifact of testing / debugging and shouldn't be here.
f3c1d87
to
cdd75b4
Compare
Alright, should be good to go. @bradjc I think I fixed all the todos. |
flag. | ||
|
||
tockloader [command] --jlink-serial-number [serial_number] | ||
|
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.
Why is this a separate paragraph?
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.
I was following the formatting above for this as a code block. Should I alter this?
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.
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.
No sorry I meant this is a jlink option (and only jlink) and should go with the --jlink example above.
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.
Two small typo-level things; otherwise lgtm √
-adds flag `--jlink-serial-number XXXX` to specify target board
cdd75b4
to
604756d
Compare
@@ -196,6 +199,10 @@ def _run_jtag_commands(self, commands, binary, write=True): | |||
jlink_file.name, | |||
) | |||
|
|||
# Append target selector if serial number provided. | |||
if self.jlink_serial_number: | |||
jlink_command += " -USB {}".format(self.jlink_serial_number) |
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.
Eh, I guess this could lead to weird errors if you happen to supply a "serial number" with spaces or other weird characters in there. On the other hand, I don't think we should sanitize these inputs, so this seems good to me.
Overview
Treadmill / CI tests that evaluate networking attach multiple boards to one machine. This PR adds a Tockloader flag (
jlink-serial-no
) to specify the JLink serial number of the device that should be flashed.This utilizes JLink's command to specify the serial number of the target.