⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 custom_build.xml

📁 AMIS單晶片開發範本
💻 XML
字号:
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_build.Template" default="noop" basedir=".">

    <!--
        This script creates an EEPROM image for the sample application.
      -->

        <property name="eeprom.address" value="0x03C0" />
        <property name="entry.point" value="P1000" />
        <property name="eeprom.address.arg"
                  value="eeprom_address: ${eeprom.address}" />
        <property name="application.start.arg"
                  value="application_start: ${entry.point}" />

    <!--
        The 'pre-build' target. This target must be present and is called by
        the build system before the compile step of each build configuration.
      -->
    <target name="pre-build"
            description="Global pre-build hook called for every build configuration.">
        <!-- ***************************************************************
            Delete any old .eeprom files.
          ****************************************************************** -->
        <delete  failonerror="false">
            <fileset dir="${config.output.location}" includes="*.eeprom" />
        </delete>
        <!-- ***************************************************************
            Delete any old .o files.
          ****************************************************************** -->
        <delete  failonerror="false">
            <fileset dir="${config.output.location}" includes="*.o" />
        </delete>
    </target>


    <!--
        The 'post-build' target. This target must be present and is called by
        the build system after the link step of each build configuration.
      -->
    <target name="post-build"
            description="Global post-build hook called for every build configuration.">

        <basename file="${config.target.name}" suffix=".abs" property="config.target.basename"/>

        <antcall target="generate.dot.o" />
        <antcall target="build.eeprom.image" />
    </target>

    <target name="generate.dot.o"
            description="Generate a .o file from the target.">
        <!-- ***************************************************************
            Run absdump on the output target.
          ****************************************************************** -->
        <echo message="Creating ${config.output.location}/${config.target.basename}.o" />
        <exec executable="absdump" dir="${config.output.location}"
              failonerror="true"
              description="Create a .o file from the .abs file created by the build configuration.">
            <arg value="-o" />
            <arg file="${config.output.location}/${config.target.basename}.o"/>
            <arg file="${config.output.location}/${config.target.name}" />
        </exec>
    </target>

    <target name="build.eeprom.image"
            description="Build eeprom images from the executable.">
        <!-- ***************************************************************
            Call EEMGR to build the .eeprom file.
          ****************************************************************** -->
        <echo message="Creating eeprom image: ${config.output.location}/${config.target.basename}.eeprom" />
        <exec executable="eemgr" dir="${config.output.location}"
              failonerror="true"
              description="Create a .eeprom file from the .abs file created by the build configuration.">
            <arg value="-b" />
            <arg value="--edf=&lt;FAT&gt; filename: '${config.target.name}' ${eeprom.address.arg} ${application.start.arg}" />
            <arg value="-o" />
            <arg file="${config.output.location}/${config.target.basename}.eeprom" />
        </exec>
    </target>

    <target name="noop">
        <echo message="This script is not intended to be executed directly."
              level="error" />
    </target>

</project>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -