주요 콘텐츠

getBuildToolOfType

Search for type of build tool

Since R2026a

Description

buildToolObj=myToolchain.getBuildToolOfType(toolType) searches for the specified tool type in the Tools property of the target.Toolchain object and returns a target.BuildTool object.

example

Input Arguments

expand all

Specify tool type to search for. Provided the tool is defined in the toolchain, you can specify one of these options:

  • 'Assembler'

  • 'C Compiler'

  • 'C++ Compiler'

  • 'Archiver'

  • 'Linker'

  • 'C++ Linker'

  • 'Make Tool'

  • 'HEX Converter'

  • 'BIN Converter'

  • 'Executable Size'

Output Arguments

expand all

target.BuildTool object that describes the build tool.

Examples

expand all

This code snippet shows how you can specify file extensions for a tool (for example, the assembler) in a toolchain.

tc = target.create('Toolchain', ...
                   'Name', 'myToolchain', ...
                   'Family', 'GNU', ...
                   'ToolPrefix', 'powerpc64-linux-gnu');
asm = tc.getBuildToolOfType('Assembler');
asm.setFileExtensions('Source', {'.s', '.S', '.asm'});

Version History

Introduced in R2026a