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():
11291129
11301130def parse_BoardFile (fileName ):
11311131 print (" * Board file: '%s'" % (fileName ))
1132- board_file = open (board_file_name , "r" )
1132+ board_file = open (fileName , "r" )
11331133 # IOC_PIN_pattern = re.compile(r'(P[A-I][\d]*).*\.([\w]*)=(.*)')
11341134 IOC_PIN_pattern = re .compile (r'(.*)\.([\w]*)=(.*)' )
11351135 for line in board_file .readlines ():
@@ -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+
12511255args = parser .parse_args ()
12521256
12531257if not (os .path .isdir (cubemxdir )):
@@ -1364,6 +1368,11 @@ 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+ TargetName = ""
1375+
13671376for mcu_file in mcu_list :
13681377 if args .mcu :
13691378 TargetName = os .path .splitext (mcu_file )[0 ]
You can’t perform that action at this time.
0 commit comments