You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description="Command-line code management tool for ARM mbed OS - http://www.mbed.com\nversion %s\n\nUse 'mbed <command> -h|--help' for detailed help.\nOnline manual and guide available at https://github.com/ARMmbed/mbed-cli"%ver,
error("The '-f/--flash' option requires that the 'mbed-greentea' python module is installed.\nYou can install mbed-ls by running 'pip install mbed-greentea'.", 1)
error("The '-f/--flash' option requires that the 'mbed-greentea' python module is installed.\nYou can install mbed-ls by running 'pip install mbed-greentea'.", 1)
error("Unable to reset the target board connected to your system.\nThis might be caused by an old interface firmware.\nPlease check the board page for new firmware.", 1)
dict(name=['-s', '--sterm'], dest='sterm', action='store_true', help='Open serial terminal for detected targets'),
2636
2737
hidden_aliases=['det'],
2637
2738
help='Detect connected mbed targets/boards\n\n',
2638
2739
description=(
2639
2740
"Detects mbed targets/boards connected to this system and shows supported\n"
2640
2741
"toolchain matrix."))
2641
-
defdetect():
2742
+
defdetect(reset=False, sterm=False):
2642
2743
# Gather remaining arguments
2643
2744
args=remainder
2644
2745
# Find the root of the program
@@ -2661,7 +2762,7 @@ def detect():
2661
2762
ifvery_verbose:
2662
2763
error(str(e))
2663
2764
else:
2664
-
warning("The mbed tools were not found in \"%s\". \nLimited information will be shown about connected mbed targets/boards"%program.path)
2765
+
warning("The mbed OS tools were not found in \"%s\". \nLimited information will be shown about connected mbed targets/boards"%program.path)
2665
2766
targets=program.get_detected_targets()
2666
2767
iftargets:
2667
2768
unknown_found=False
@@ -2671,10 +2772,13 @@ def detect():
2671
2772
action("Detected unknown target connected to \"%s\" and using com port \"%s\""% (target['mount'], target['serial']))
2672
2773
else:
2673
2774
action("Detected \"%s\" connected to \"%s\" and using com port \"%s\""% (target['name'], target['mount'], target['serial']))
2775
+
cdc(target['serial'], reset=reset, sterm=sterm)
2674
2776
2675
2777
ifunknown_found:
2676
2778
warning("If you're developing a new target, you can mock the device to continue your development. "
2677
2779
"Use 'mbedls --mock ID:NAME' to do so (see 'mbedls --help' for more information)")
2780
+
else:
2781
+
error("This command requires that the 'mbed-greentea' python module is installed.\nYou can install mbed-ls by running 'pip install mbed-greentea'.", 1)
0 commit comments