コード例 #1
0
ファイル: arm.py プロジェクト: sirinsoftware/coretools
def tb_h_file_creation(target, source, env):
    """Compile tilebus file into only .h files corresponding to config variables for inclusion in a library"""

    files = [str(x) for x in source]

    try:
        desc = TBDescriptor(files)
    except pyparsing.ParseException as e:
        raise BuildError("Could not parse tilebus file", parsing_exception=e)

    block = desc.get_block(config_only=True)
    block.render_template(block.CommandHeaderTemplate, out_path=str(target[0]))
    block.render_template(block.ConfigHeaderTemplate, out_path=str(target[1]))
コード例 #2
0
ファイル: arm.py プロジェクト: sirinsoftware/coretools
def tb_c_file_creation(target, source, env):
    """Compile tilebus file into a .h/.c pair for compilation into an ARM object"""

    files = [str(x) for x in source]

    try:
        desc = TBDescriptor(files)
    except pyparsing.ParseException as e:
        raise BuildError("Could not parse tilebus file", parsing_exception=e)

    block = desc.get_block()
    block.render_template(block.CommandFileTemplate, out_path=str(target[0]))
    block.render_template(block.CommandHeaderTemplate, out_path=str(target[1]))
    block.render_template(block.ConfigFileTemplate, out_path=str(target[2]))
    block.render_template(block.ConfigHeaderTemplate, out_path=str(target[3]))
コード例 #3
0
def _load_mib(filename):
    path = os.path.join(os.path.dirname(__file__), filename)
    tb = TBDescriptor(path, include_dirs=[os.path.dirname(__file__)])
    tb._validate_information()
    return tb