diff --git a/build_rts.py b/build_rts.py index 70b3b30c..6b2036e2 100755 --- a/build_rts.py +++ b/build_rts.py @@ -370,6 +370,11 @@ def main(): parser.add_argument( "target", nargs="+", help="List of target boards to generate runtimes for" ) + parser.add_argument( + "--profiles", + type=str, + help="Comma seperated list of profiles to generate runtimes for", + ) args = parser.parse_args() if args.verbose: @@ -417,7 +422,11 @@ def main(): print("install runtime sources for %s" % board.name) sys.stdout.flush() installer = Installer(board) - projects += installer.install(dest, rts_descriptor=args.rts_src_descriptor) + projects += installer.install( + dest, + rts_descriptor=args.rts_src_descriptor, + profiles=args.profiles.split(","), + ) # and build them if args.build: diff --git a/support/bsp_sources/installer.py b/support/bsp_sources/installer.py index ad4838ed..540feb52 100644 --- a/support/bsp_sources/installer.py +++ b/support/bsp_sources/installer.py @@ -172,7 +172,7 @@ def _get_rts_dirs(self, rts_source_item, scenarios): ret += self._get_rts_dirs(sub, scenarios) return ret - def install(self, destination, rts_descriptor=None): + def install(self, destination, rts_descriptor=None, profiles=None): # Build target directories destination = os.path.abspath(destination) if not os.path.exists(destination): @@ -183,6 +183,11 @@ def install(self, destination, rts_descriptor=None): projects = [] for rts_base_name, rts_obj in self.tgt.runtimes.items(): + # If we have been given a list of profiles, skip the profiles that + # are not in the list. + if profiles is not None and rts_base_name not in profiles: + continue + if self.tgt.is_native or self.tgt.is_legacy_format: rtsname = "rts-%s" % rts_base_name if self.tgt.name.endswith("vx7r2cert-rtp"): diff --git a/support/bsp_sources/target.py b/support/bsp_sources/target.py index 28c149c7..12a5c097 100644 --- a/support/bsp_sources/target.py +++ b/support/bsp_sources/target.py @@ -339,7 +339,7 @@ def dump_runtime_xml(self, rts_name, rts): ret += "\n" - for lang in ("Ada", "C", "Asm", "Asm2", "Asm_Cpp"): + for lang in ("Ada", "C", "C++", "Asm", "Asm2", "Asm_Cpp"): w = " " ret += w + 'for Leading_Required_Switches ("%s") use\n' % lang w = " "