@@ -276,7 +276,8 @@ def get_mbed_official_release(version):
276276def prepare_toolchain (src_paths , target , toolchain_name ,
277277 macros = None , options = None , clean = False , jobs = 1 ,
278278 notify = None , silent = False , verbose = False ,
279- extra_verbose = False , config = None ):
279+ extra_verbose = False , config = None ,
280+ app_config = None ):
280281 """ Prepares resource related objects - toolchain, target, config
281282
282283 Positional arguments:
@@ -294,14 +295,15 @@ def prepare_toolchain(src_paths, target, toolchain_name,
294295 verbose - Write the actual tools command lines used if True
295296 extra_verbose - even more output!
296297 config - a Config object to use instead of creating one
298+ app_config - location of a chosen mbed_app.json file
297299 """
298300
299301 # We need to remove all paths which are repeated to avoid
300302 # multiple compilations and linking with the same objects
301303 src_paths = [src_paths [0 ]] + list (set (src_paths [1 :]))
302304
303305 # If the configuration object was not yet created, create it now
304- config = config or Config (target , src_paths )
306+ config = config or Config (target , src_paths , app_config = app_config )
305307
306308 # If the 'target' argument is a string, convert it to a target instance
307309 if isinstance (target , basestring ):
@@ -369,7 +371,8 @@ def build_project(src_paths, build_path, target, toolchain_name,
369371 clean = False , notify = None , verbose = False , name = None ,
370372 macros = None , inc_dirs = None , jobs = 1 , silent = False ,
371373 report = None , properties = None , project_id = None ,
372- project_description = None , extra_verbose = False , config = None ):
374+ project_description = None , extra_verbose = False , config = None ,
375+ app_config = None ):
373376 """ Build a project. A project may be a test or a user program.
374377
375378 Positional arguments:
@@ -397,6 +400,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
397400 project_description - the human-readable version of what this thing does
398401 extra_verbose - even more output!
399402 config - a Config object to use instead of creating one
403+ app_config - location of a chosen mbed_app.json file
400404 """
401405
402406 # Convert src_path to a list if needed
@@ -415,7 +419,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
415419 toolchain = prepare_toolchain (
416420 src_paths , target , toolchain_name , macros = macros , options = options ,
417421 clean = clean , jobs = jobs , notify = notify , silent = silent , verbose = verbose ,
418- extra_verbose = extra_verbose , config = config )
422+ extra_verbose = extra_verbose , config = config , app_config = app_config )
419423
420424 # The first path will give the name to the library
421425 if name is None :
@@ -489,7 +493,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
489493 archive = True , notify = None , verbose = False , macros = None ,
490494 inc_dirs = None , jobs = 1 , silent = False , report = None ,
491495 properties = None , extra_verbose = False , project_id = None ,
492- remove_config_header_file = False ):
496+ remove_config_header_file = False , app_config = None ):
493497 """ Build a library
494498
495499 Positional arguments:
@@ -516,6 +520,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
516520 extra_verbose - even more output!
517521 project_id - the name that goes in the report
518522 remove_config_header_file - delete config header file when done building
523+ app_config - location of a chosen mbed_app.json file
519524 """
520525
521526 # Convert src_path to a list if needed
@@ -539,7 +544,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
539544 toolchain = prepare_toolchain (
540545 src_paths , target , toolchain_name , macros = macros , options = options ,
541546 clean = clean , jobs = jobs , notify = notify , silent = silent , verbose = verbose ,
542- extra_verbose = extra_verbose )
547+ extra_verbose = extra_verbose , app_config = app_config )
543548
544549 # The first path will give the name to the library
545550 if name is None :
0 commit comments