Skip to content

Commit

Permalink
Fix: adapt flasher script for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
LinjingZhang committed Aug 26, 2024
1 parent 7663fb1 commit 593cd19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ recipe.size.regex.data=^(?:\.data|\.VENEER_Code|\.ram_code|\.bss|\.no_init|\Stac
tools.xmcflasher.path={runtime.platform.path}/tools
tools.xmcflasher.cmd.path={path}/xmc-flasher.py
tools.xmcflasher.erase.params=-d XMC{build.board.version}-{build.board.v} -p {serial.port}
tools.xmcflasher.erase.pattern=python {cmd.path} erase {erase.params}
tools.xmcflasher.erase.pattern=python3 {cmd.path} erase {erase.params}
tools.xmcflasher.erase.pattern.windows=python {cmd.path} erase {erase.params}
tools.xmcflasher.upload.protocol=
tools.xmcflasher.upload.params.verbose=--verbose
tools.xmcflasher.upload.params.quiet=
tools.xmcflasher.upload.params=-d XMC{build.board.version}-{build.board.v} -p {serial.port} -f {build.path}/{build.project_name}.hex {upload.verbose}
tools.xmcflasher.upload.pattern=python {cmd.path} upload {upload.params}
tools.xmcflasher.upload.pattern=python3 {cmd.path} upload {upload.params}
tools.xmcflasher.upload.pattern.windows=python {cmd.path} upload {upload.params}
4 changes: 1 addition & 3 deletions tools/xmc-flasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def set_environment():
elif sys.platform == 'win32' or sys.platform == 'cygwin':
jlinkexe = rf"{get_jlink_install_path()}\jlink.exe"
elif sys.platform == 'darwin':
jlinkexe = 'jlink'
print('warning: mac os not validated')
#raise Exception('mac os not supported?')
jlinkexe = 'JLinkExe'

def discover_devices():
ports = comports()
Expand Down

0 comments on commit 593cd19

Please sign in to comment.