Skip to content

Commit e6a0607

Browse files
committed
tools/psoc6/mpy-psoc6.py: Adding new AI kit to erase cmd. New erase bin.
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
1 parent 1f1b7c0 commit e6a0607

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tools/psoc6/mpy-psoc6.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def colour_str_highlight(msg):
2828
return purple_str_start + msg + str_color_end
2929

3030

31+
def colour_str_warn(msg):
32+
yellow_str_start = "\x1b[1;33;40m"
33+
str_color_end = "\x1b[0m"
34+
return yellow_str_start + msg + str_color_end
35+
36+
3137
def set_environment():
3238
global opsys
3339
if sys.platform == "linux" or sys.platform == "linux2":
@@ -475,7 +481,7 @@ def wait_for_dev_restart():
475481

476482

477483
def device_erase(board, quiet=False):
478-
if board != "CY8CPROTO-062-4343W":
484+
if (board != "CY8CPROTO-062-4343W") and (board != "CY8CKIT-062S2-AI"):
479485
sys.exit(colour_str_error("error: board is not supported"))
480486

481487
if not quiet:
@@ -484,11 +490,16 @@ def device_erase(board, quiet=False):
484490
openocd_download_install()
485491
openocd_board_conf_download(board)
486492

487-
mpy_firmware_download("device-erase", board, "v0.3.0")
493+
mpy_firmware_download("device-erase", board, "v0.10.0")
488494

489495
mpy_firmware_deploy("device-erase", board)
490496

491-
print(colour_str_success("Device erase completed :)"))
497+
print(
498+
colour_str_warn(
499+
"Attention!\nThe on-board user LED will start blinking when the erasing is completed."
500+
)
501+
)
502+
print(colour_str_warn("This can take up to a few minutes if the device memory is very full."))
492503

493504

494505
def firmware_deploy(board, hex_file):

0 commit comments

Comments
 (0)