Skip to content

Commit 111a65b

Browse files
committed
Added ability to list ides
1 parent f142939 commit 111a65b

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

tools/export/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@
6868
To export this project please <a href='http://mbed.org/compiler/?import=http://mbed.org/users/mbed_official/code/mbed-export/k&mode=lib' target='_blank'>import the export version of the mbed library</a>.
6969
"""
7070

71+
def mcu_ide_list():
72+
"""Shows list of exportable ides
73+
74+
"""
75+
supported_ides = sorted(EXPORTERS.keys())
76+
return "\n".join(supported_ides)
77+
78+
7179
def mcu_ide_matrix(verbose_html=False):
7280
"""Shows target map using prettytable
7381

tools/project.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,11 @@ def main():
145145
help="list available programs in order and exit")
146146

147147
group.add_argument("-S", "--list-matrix",
148-
action="store_true",
149148
dest="supported_ides",
150149
default=False,
150+
const="matrix",
151+
choices=["matrix", "ides"],
152+
nargs="?",
151153
help="displays supported matrix of MCUs and IDEs")
152154

153155
parser.add_argument("-E",
@@ -188,7 +190,10 @@ def main():
188190

189191
# Only prints matrix of supported IDEs
190192
if options.supported_ides:
191-
print_large_string(mcu_ide_matrix())
193+
if options.supported_ides == "matrix":
194+
print_large_string(mcu_ide_matrix())
195+
elif options.supported_ides == "ides":
196+
print mcu_ide_list()
192197
exit(0)
193198

194199
# Only prints matrix of supported IDEs

0 commit comments

Comments
 (0)