@@ -478,12 +478,10 @@ def build_project(src_paths, build_path, target, toolchain_name,
478
478
src_paths .extend (libraries_paths )
479
479
inc_dirs .extend (map (dirname , libraries_paths ))
480
480
481
- # Build Directory
482
481
if clean and exists (build_path ):
483
482
rmtree (build_path )
484
483
mkdir (build_path )
485
484
486
- # Pass all params to the unified prepare_toolchain()
487
485
toolchain = prepare_toolchain (
488
486
src_paths , build_path , target , toolchain_name , macros = macros ,
489
487
clean = clean , jobs = jobs , notify = notify , silent = silent , verbose = verbose ,
@@ -513,6 +511,10 @@ def build_project(src_paths, build_path, target, toolchain_name,
513
511
try :
514
512
# Call unified scan_resources
515
513
resources = scan_resources (src_paths , toolchain , inc_dirs = inc_dirs )
514
+ if (hasattr (toolchain .target , "release_versions" ) and
515
+ "5" not in toolchain .target .release_versions and
516
+ "rtos" in toolchain .config .lib_config_data ):
517
+ raise NotSupportedException ("Target does not support mbed OS 5" )
516
518
517
519
# Change linker script if specified
518
520
if linker_script is not None :
0 commit comments