@@ -276,7 +276,8 @@ def get_mbed_official_release(version):
276
276
def prepare_toolchain (src_paths , target , toolchain_name ,
277
277
macros = None , options = None , clean = False , jobs = 1 ,
278
278
notify = None , silent = False , verbose = False ,
279
- extra_verbose = False , config = None ):
279
+ extra_verbose = False , config = None ,
280
+ app_config = None ):
280
281
""" Prepares resource related objects - toolchain, target, config
281
282
282
283
Positional arguments:
@@ -294,14 +295,15 @@ def prepare_toolchain(src_paths, target, toolchain_name,
294
295
verbose - Write the actual tools command lines used if True
295
296
extra_verbose - even more output!
296
297
config - a Config object to use instead of creating one
298
+ app_config - location of a chosen mbed_app.json file
297
299
"""
298
300
299
301
# We need to remove all paths which are repeated to avoid
300
302
# multiple compilations and linking with the same objects
301
303
src_paths = [src_paths [0 ]] + list (set (src_paths [1 :]))
302
304
303
305
# 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 )
305
307
306
308
# If the 'target' argument is a string, convert it to a target instance
307
309
if isinstance (target , basestring ):
@@ -369,7 +371,8 @@ def build_project(src_paths, build_path, target, toolchain_name,
369
371
clean = False , notify = None , verbose = False , name = None ,
370
372
macros = None , inc_dirs = None , jobs = 1 , silent = False ,
371
373
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 ):
373
376
""" Build a project. A project may be a test or a user program.
374
377
375
378
Positional arguments:
@@ -397,6 +400,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
397
400
project_description - the human-readable version of what this thing does
398
401
extra_verbose - even more output!
399
402
config - a Config object to use instead of creating one
403
+ app_config - location of a chosen mbed_app.json file
400
404
"""
401
405
402
406
# Convert src_path to a list if needed
@@ -415,7 +419,7 @@ def build_project(src_paths, build_path, target, toolchain_name,
415
419
toolchain = prepare_toolchain (
416
420
src_paths , target , toolchain_name , macros = macros , options = options ,
417
421
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 )
419
423
420
424
# The first path will give the name to the library
421
425
if name is None :
@@ -489,7 +493,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
489
493
archive = True , notify = None , verbose = False , macros = None ,
490
494
inc_dirs = None , jobs = 1 , silent = False , report = None ,
491
495
properties = None , extra_verbose = False , project_id = None ,
492
- remove_config_header_file = False ):
496
+ remove_config_header_file = False , app_config = None ):
493
497
""" Build a library
494
498
495
499
Positional arguments:
@@ -516,6 +520,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
516
520
extra_verbose - even more output!
517
521
project_id - the name that goes in the report
518
522
remove_config_header_file - delete config header file when done building
523
+ app_config - location of a chosen mbed_app.json file
519
524
"""
520
525
521
526
# Convert src_path to a list if needed
@@ -539,7 +544,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
539
544
toolchain = prepare_toolchain (
540
545
src_paths , target , toolchain_name , macros = macros , options = options ,
541
546
clean = clean , jobs = jobs , notify = notify , silent = silent , verbose = verbose ,
542
- extra_verbose = extra_verbose )
547
+ extra_verbose = extra_verbose , app_config = app_config )
543
548
544
549
# The first path will give the name to the library
545
550
if name is None :
0 commit comments