Skip to content

Commit 593cd19

Browse files
committed
Fix: adapt flasher script for macOS
1 parent 7663fb1 commit 593cd19

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

platform.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ recipe.size.regex.data=^(?:\.data|\.VENEER_Code|\.ram_code|\.bss|\.no_init|\Stac
148148
tools.xmcflasher.path={runtime.platform.path}/tools
149149
tools.xmcflasher.cmd.path={path}/xmc-flasher.py
150150
tools.xmcflasher.erase.params=-d XMC{build.board.version}-{build.board.v} -p {serial.port}
151-
tools.xmcflasher.erase.pattern=python {cmd.path} erase {erase.params}
151+
tools.xmcflasher.erase.pattern=python3 {cmd.path} erase {erase.params}
152+
tools.xmcflasher.erase.pattern.windows=python {cmd.path} erase {erase.params}
152153
tools.xmcflasher.upload.protocol=
153154
tools.xmcflasher.upload.params.verbose=--verbose
154155
tools.xmcflasher.upload.params.quiet=
155156
tools.xmcflasher.upload.params=-d XMC{build.board.version}-{build.board.v} -p {serial.port} -f {build.path}/{build.project_name}.hex {upload.verbose}
156-
tools.xmcflasher.upload.pattern=python {cmd.path} upload {upload.params}
157+
tools.xmcflasher.upload.pattern=python3 {cmd.path} upload {upload.params}
158+
tools.xmcflasher.upload.pattern.windows=python {cmd.path} upload {upload.params}

tools/xmc-flasher.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ def set_environment():
3535
elif sys.platform == 'win32' or sys.platform == 'cygwin':
3636
jlinkexe = rf"{get_jlink_install_path()}\jlink.exe"
3737
elif sys.platform == 'darwin':
38-
jlinkexe = 'jlink'
39-
print('warning: mac os not validated')
40-
#raise Exception('mac os not supported?')
38+
jlinkexe = 'JLinkExe'
4139

4240
def discover_devices():
4341
ports = comports()

0 commit comments

Comments
 (0)