@@ -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+
3137def 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
477483def 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!\n The 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
494505def firmware_deploy (board , hex_file ):
0 commit comments