Skip to content

Commit

Permalink
tools/psoc6/mpy-psoc6.py: Fixed terminal coloring in windows.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Nov 22, 2023
1 parent a4bf721 commit d1a2663
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/psoc6/mpy-psoc6.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def set_environment():
opsys = "linux"
elif sys.platform == "win32" or sys.platform == "cygwin":
opsys = "win"
os.system('color')
elif sys.platform == "darwin":
opsys = "mac"
raise Exception(colour_str_error("OS unsupported"))
Expand Down Expand Up @@ -340,18 +341,18 @@ def device_setup(board, version, update_dbg_fw=False, quiet=False):

print("MicroPython PSoC6 Version :: ", version)

if update_dbg_fw:
fwloader_download_install()
fwloader_update_kitprog()
fwloader_remove()

openocd_download_install()
openocd_board_conf_download(board)
mpy_firmware_download("hello-world", board, "v0.3.0")
mpy_firmware_download("mpy-psoc6", board, version)

if not quiet:
wait_and_request_board_connect()

if update_dbg_fw:
fwloader_download_install()
fwloader_update_kitprog()
fwloader_remove()

mpy_firmware_deploy("hello-world", board)
mpy_firmware_deploy("mpy-psoc6", board)
Expand Down

0 comments on commit d1a2663

Please sign in to comment.