@@ -438,6 +438,18 @@ def scan_resources(src_paths, toolchain, dependencies_paths=None,
438
438
# Set the toolchain's configuration data
439
439
toolchain .set_config_data (toolchain .config .get_config_data ())
440
440
441
+ if (hasattr (toolchain .target , "release_versions" ) and
442
+ "5" not in toolchain .target .release_versions and
443
+ "rtos" in toolchain .config .lib_config_data ):
444
+ if "Cortex-A" in toolchain .target .core :
445
+ raise NotSupportedException (
446
+ ("%s Will be supported in mbed OS 5.6. "
447
+ "To use the %s, please checkout the mbed OS 5.4 release branch. "
448
+ "See https://developer.mbed.org/platforms/Renesas-GR-PEACH/#important-notice "
449
+ "for more information" ) % (toolchain .target .name , toolchain .target .name ))
450
+ else :
451
+ raise NotSupportedException ("Target does not support mbed OS 5" )
452
+
441
453
return resources
442
454
443
455
def build_project (src_paths , build_path , target , toolchain_name ,
@@ -519,17 +531,6 @@ def build_project(src_paths, build_path, target, toolchain_name,
519
531
try :
520
532
# Call unified scan_resources
521
533
resources = scan_resources (src_paths , toolchain , inc_dirs = inc_dirs )
522
- if (hasattr (toolchain .target , "release_versions" ) and
523
- "5" not in toolchain .target .release_versions and
524
- "rtos" in toolchain .config .lib_config_data ):
525
- if "Cortex-A" in toolchain .target .core :
526
- raise NotSupportedException (
527
- ("%s Will be supported in mbed OS 5.6. "
528
- "To use the %s, please checkout the mbed OS 5.4 release branch. "
529
- "See https://developer.mbed.org/platforms/Renesas-GR-PEACH/#important-notice "
530
- "for more information" ) % (toolchain .target .name , toolchain .target .name ))
531
- else :
532
- raise NotSupportedException ("Target does not support mbed OS 5" )
533
534
534
535
# Change linker script if specified
535
536
if linker_script is not None :
0 commit comments