Skip to content

Commit 1a9416a

Browse files
committed
[stm32variant] Comment option to generate from one mcu file
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent a231311 commit 1a9416a

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

CI/utils/stm32variant.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ def manage_repo():
16681668
templates_dir = cur_dir / "templates"
16691669
mcu_family_dir = ""
16701670
filtered_family = ""
1671-
filtered_mcu_file = ""
1671+
# filtered_mcu_file = ""
16721672
periph_c_filename = "PeripheralPins.c"
16731673
pinvar_h_filename = "PinNamesVar.h"
16741674
config_filename = Path("variant_config.json")
@@ -1730,18 +1730,18 @@ def manage_repo():
17301730
help="list available xml files description in database",
17311731
action="store_true",
17321732
)
1733-
group.add_argument(
1734-
"-m",
1735-
"--mcu",
1736-
metavar="xml",
1737-
help=textwrap.dedent(
1738-
"""\
1739-
Generate all files for specified mcu xml file description in database.
1740-
This xml file can contain non alpha characters in its name,
1741-
you should call it with double quotes.
1742-
"""
1743-
),
1744-
)
1733+
# group.add_argument(
1734+
# "-m",
1735+
# "--mcu",
1736+
# metavar="xml",
1737+
# help=textwrap.dedent(
1738+
# """\
1739+
# Generate all files for specified mcu xml file description in database.
1740+
# This xml file can contain non alpha characters in its name,
1741+
# you should call it with double quotes.
1742+
# """
1743+
# ),
1744+
# )
17451745

17461746
group.add_argument(
17471747
"-f",
@@ -1806,16 +1806,16 @@ def manage_repo():
18061806
db_release = release_match.group(1)
18071807
print("CubeMX DB release {}\n".format(db_release))
18081808

1809-
if args.mcu:
1810-
# Check input file exists
1811-
if not ((dirMCU / args.mcu).is_file()):
1812-
print("\n" + args.mcu + " file not found")
1813-
print("\nCheck in " + dirMCU + " the correct name of this file")
1814-
print("\nYou may use double quotes for file containing special characters")
1815-
quit()
1816-
# Get the family of the desired mcu file
1817-
filtered_mcu_file = dirMCU / args.mcu
1818-
filtered_family = get_mcu_family(filtered_mcu_file)
1809+
# if args.mcu:
1810+
# # Check input file exists
1811+
# if not ((dirMCU / args.mcu).is_file()):
1812+
# print("\n" + args.mcu + " file not found")
1813+
# print("\nCheck in " + dirMCU + " the correct name of this file")
1814+
# print("\nYou may use double quotes for file containing special characters")
1815+
# quit()
1816+
# # Get the family of the desired mcu file
1817+
# filtered_mcu_file = dirMCU / args.mcu
1818+
# filtered_family = get_mcu_family(filtered_mcu_file)
18191819
if args.family:
18201820
filtered_family = args.family.upper()
18211821
# Get all xml files
@@ -1903,7 +1903,7 @@ def manage_repo():
19031903
xml_mcu.unlink()
19041904
xml_gpio.unlink()
19051905

1906-
# Aggregating all genertaed files
1906+
# Aggregating all generated files
19071907
print("Aggregating all generated files...")
19081908
periperalpins_regex = re.compile(r"\S+\.xml")
19091909
variant_regex = re.compile(r"defined\(ARDUINO_GENERIC_[^\s&|]*\)")

0 commit comments

Comments
 (0)