Skip to content
Merged
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
5 changes: 3 additions & 2 deletions pylink/jlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import logging
import math
import operator
import os
import sys
import time
import six
Expand Down Expand Up @@ -827,7 +828,7 @@ def set_log_file(self, file_path):
Raises:
JLinkException: if the path specified is invalid.
"""
res = self._dll.JLINKARM_SetLogFile(file_path.encode())
res = self._dll.JLINKARM_SetLogFile(os.fsencode(file_path))
if res:
raise errors.JLinkException(res)

Expand Down Expand Up @@ -2268,7 +2269,7 @@ def flash_file(self, path, addr, on_progress=None, power_on=False):
pass

# Program the target.
bytes_flashed = self._dll.JLINK_DownloadFile(path.encode(), addr)
bytes_flashed = self._dll.JLINK_DownloadFile(os.fsencode(path), addr)
if bytes_flashed < 0:
raise errors.JLinkFlashException(bytes_flashed)

Expand Down
Loading