File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1129,7 +1129,7 @@ def parse_pins():
1129
1129
1130
1130
def parse_BoardFile (fileName ):
1131
1131
print (" * Board file: '%s'" % (fileName ))
1132
- board_file = open (board_file_name , "r" )
1132
+ board_file = open (fileName , "r" )
1133
1133
# IOC_PIN_pattern = re.compile(r'(P[A-I][\d]*).*\.([\w]*)=(.*)')
1134
1134
IOC_PIN_pattern = re .compile (r'(.*)\.([\w]*)=(.*)' )
1135
1135
for line in board_file .readlines ():
@@ -1248,6 +1248,10 @@ def parse_BoardFile(fileName):
1248
1248
Parameter can be a filter like L496 (only the first file found will be parsed).
1249
1249
''' ))
1250
1250
1251
+ group .add_argument ("-c" , "--custom" , help = textwrap .dedent ('''\
1252
+ specify a custom board .ioc file description to use (use double quotes).
1253
+ ''' ))
1254
+
1251
1255
args = parser .parse_args ()
1252
1256
1253
1257
if not (os .path .isdir (cubemxdir )):
@@ -1364,6 +1368,11 @@ def parse_BoardFile(fileName):
1364
1368
else :
1365
1369
quit ()
1366
1370
1371
+ # Parse the user's custom board .ioc file
1372
+ if args .custom :
1373
+ parse_BoardFile (args .custom )
1374
+ TargetName = ""
1375
+
1367
1376
for mcu_file in mcu_list :
1368
1377
if args .mcu :
1369
1378
TargetName = os .path .splitext (mcu_file )[0 ]
You can’t perform that action at this time.
0 commit comments