mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
idf.py: add --list-targets option to list support targets
This commit is contained in:
@@ -164,6 +164,15 @@ def action_extensions(base_actions, project_path):
|
|||||||
print("ESP-IDF %s" % version)
|
print("ESP-IDF %s" % version)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
def list_targets_callback(ctx, param, value):
|
||||||
|
if not value or ctx.resilient_parsing:
|
||||||
|
return
|
||||||
|
|
||||||
|
for target in SUPPORTED_TARGETS:
|
||||||
|
print(target)
|
||||||
|
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
root_options = {
|
root_options = {
|
||||||
"global_options": [
|
"global_options": [
|
||||||
{
|
{
|
||||||
@@ -173,6 +182,13 @@ def action_extensions(base_actions, project_path):
|
|||||||
"expose_value": False,
|
"expose_value": False,
|
||||||
"callback": idf_version_callback
|
"callback": idf_version_callback
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"names": ["--list-targets"],
|
||||||
|
"help": "Print list of supported targets and exit.",
|
||||||
|
"is_flag": True,
|
||||||
|
"expose_value": False,
|
||||||
|
"callback": list_targets_callback
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"names": ["-C", "--project-dir"],
|
"names": ["-C", "--project-dir"],
|
||||||
"help": "Project directory.",
|
"help": "Project directory.",
|
||||||
@@ -263,7 +279,8 @@ def action_extensions(base_actions, project_path):
|
|||||||
"The default value is \"aquatic\". It is possible to customize these themes further "
|
"The default value is \"aquatic\". It is possible to customize these themes further "
|
||||||
"as it is described in the Color schemes section of the kconfiglib documentation."),
|
"as it is described in the Color schemes section of the kconfiglib documentation."),
|
||||||
"default": os.environ.get('MENUCONFIG_STYLE', 'aquatic'),
|
"default": os.environ.get('MENUCONFIG_STYLE', 'aquatic'),
|
||||||
}],
|
}
|
||||||
|
],
|
||||||
},
|
},
|
||||||
"confserver": {
|
"confserver": {
|
||||||
"callback": build_target,
|
"callback": build_target,
|
||||||
|
Reference in New Issue
Block a user