Skip to content

Commit 7663fb1

Browse files
committed
Doc: clean docstring comments
1 parent a6bfbda commit 7663fb1

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

tools/xmc-flasher.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,6 @@ def remove_console_output_file(console_output_file):
8484
os.remove(console_output_file)
8585

8686
def jlink_commander(device, serial_num, cmd_file, console_output=False):
87-
"""
88-
Executes J-Link Commander with the specified device, serial number, command file, and console output option.
89-
Args:
90-
device (str): The device name.
91-
serial_num (str): The serial number of the J-Link device.
92-
cmd_file (str): The path to the command file.
93-
console_output (bool, optional): Specifies whether to enable console output. Defaults to False (print the log rather than store in a file).
94-
Raises:
95-
Exception: If there is an error with J-Link.
96-
"""
9787
jlink_cmd = [jlinkexe, '-autoconnect', '1','-exitonerror', '1', '-nogui', '1', '-device', device, '-selectemubysn', serial_num, '-if', 'swd', '-speed', '4000', '-commandfile', cmd_file]
9888

9989
#if console_output is True:
@@ -211,19 +201,9 @@ def check_mem(device, port):
211201

212202

213203
def upload(device, port, binfile, enable_jlink_log):
214-
"""
215-
Uploads a binary file to a device using XMC flasher.
216-
Args:
217-
device (str): The device name or ID.
218-
port (str): The port to connect to the device.
219-
binfile (str): The path to the binary file to upload.
220-
enable_jlink_log (bool): Whether to enable J-Link logging.
221-
Returns:
222-
None
223-
"""
224204
serial_num = get_device_serial_number(port)
225205
jlink_cmd_file = create_jlink_loadbin_command_file(binfile)
226-
jlink_commander(device, serial_num, jlink_cmd_file, console_output=not enable_jlink_log)
206+
jlink_commander(device, serial_num, jlink_cmd_file, console_output=not enable_jlink_log) # console_output = true will store the log to file instead of printing
227207
remove_jlink_command_file(jlink_cmd_file)
228208

229209
def erase(device, port):

0 commit comments

Comments
 (0)