Skip to content

Commit bcd8ebb

Browse files
committed
Added custom board option to STM Pins generation script
1 parent 7fce7f5 commit bcd8ebb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/targets/STM32_gen_PeripheralPins.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,10 @@ def parse_BoardFile(fileName):
12481248
Parameter can be a filter like L496 (only the first file found will be parsed).
12491249
'''))
12501250

1251+
group.add_argument("-c", "--custom", help=textwrap.dedent('''\
1252+
specify a custom board .ioc file description to use (use double quotes).
1253+
'''))
1254+
12511255
args = parser.parse_args()
12521256

12531257
if not(os.path.isdir(cubemxdir)):
@@ -1364,6 +1368,10 @@ def parse_BoardFile(fileName):
13641368
else:
13651369
quit()
13661370

1371+
# Parse the user's custom board .ioc file
1372+
if args.custom:
1373+
parse_BoardFile(args.custom)
1374+
13671375
for mcu_file in mcu_list:
13681376
if args.mcu:
13691377
TargetName = os.path.splitext(mcu_file)[0]

0 commit comments

Comments
 (0)