首页 新闻 会员 周边

请教,哪位能给我讲解讲解这个文件,文件是 Micro Framework 的 Scatterfile

0
悬赏园豆:50 解决于 2008-11-19 20:09

<?xml version="1.0"?>
<ScatterFile xmlns="http://schemas.microsoft.com/netmf/ScatterfileSchema.xsd">

    <!-- Freescale MC9328 No SRAM, SDRAM 32M/64M -->

    <Set Name="Valid" Value="false"/>

    <!-- ################################################################################ -->

    <Set Name="Heap_Begin"          Value="0x08100000"/>
    <Set Name="Heap_End"            Value="0x084FFFFC"/>
    <Set Name="Stack_Bottom"        Value="+0"/>
    <Set Name="Stack_Top"           Value="0x08502000"/>
   
    <IfDefined Name="PROFILE_BUILD">
        <Set Name="ProfileBuffer_Begin" Value="0x081F0000"/>
        <Set Name="ProfileBuffer_End"   Value="0x081FFFFC"/>
        <Set Name="Heap_Begin"          Value="0x08200000"/>
    </IfDefined>
   
    <IfDefined Name="FIQ_SAMPLING_PROFILER">
        <Set Name="ProfileBuffer_Begin" Value="0x081F0000"/>
        <Set Name="ProfileBuffer_End"   Value="0x081FFFFC"/>
        <Set Name="Heap_Begin"          Value="0x08200000"/>
    </IfDefined>
   
    <If Name="TARGETLOCATION" Value="FLASH">
   
        <!-- iMXS has 8MB of 32-bit FLASH at 0x10000000-->
        <Set Name="Config_BaseAddress"  Value="0x10020000"/>   
        <Set Name="Config_Size"         Value="0x00020000"/>
        <Set Name="Code_BaseAddress"    Value="0x10300000"/>
        <Set Name="Code_Size"           Value="0x00100000"/>
        <Set Name="Valid"               Value="true"/>

        <!-- -->
       
        <IfDefined Name="ALTERNATEFLASHLOCATION">
            <Set Name="Code_BaseAddress" Value="%Code_BaseAddress + Code_Size%"/>
        </IfDefined>

    </If>

    <If Name="TARGETLOCATION" Value="RAM">
        <Set Name="Heap_Begin"          Value="0x08300000"/>
        <Set Name="Heap_End"            Value="0x084FEFFC"/>
        <IfDefined Name="PROFILE_BUILD">
            <Set Name="ProfileBuffer_Begin" Value="0x08300000"/>
            <Set Name="ProfileBuffer_End"   Value="0x083FFFFC"/>
            <Set Name="Heap_Begin"          Value="0x08400000"/>
        </IfDefined>
        <IfDefined Name="FIQ_SAMPLING_PROFILER">
            <Set Name="ProfileBuffer_Begin" Value="0x08300000"/>
            <Set Name="ProfileBuffer_End"   Value="0x083FFFFC"/>
            <Set Name="Heap_Begin"          Value="0x08400000"/>
        </IfDefined>

        <Set Name="Code_BaseAddress" Value="0x08020000"/>
        <Set Name="Code_Size"        Value="0x000D0000"/>
        <Set Name="Valid"            Value="true"/>

    </If>


    <!-- ################################################################################ -->

    <If Name="Valid" Value="false">
        <Error Message="Configuration not recognized"/>
    </If>

    <!-- we start at 0x10080000 since PortBooter lives at 0x10000000 -->
    <!-- the address and sizes for both load regions (LR_*) are chosen to start and completely fill a flash partition in the 28F320W18 flash chip -->


    <LoadRegion Name="LR_%TARGETLOCATION%" Base="%Code_BaseAddress%" Options="ABSOLUTE" Size="%Code_Size%">

        <!-- we have arbitrarily asigned 0x00080000 offset in FLASH for the CLR code, and size of 0x00080000 -->

        <ExecRegion Name="ER_%TARGETLOCATION%" Base="%Code_BaseAddress%" Options="FIXED" Size="">

            <FileMapping Name="FirstEntry.obj"   Options="(+RO, +FIRST)" /> <!-- the entry pointer section goes into this region -->
            <FileMapping Name="ramtest.obj"      Options="(+RO)"         /> <!-- this must live somewhere other than RAM, for all but RAM builds -->
            <FileMapping Name="*" Options="(SectionForBootstrapOperations)" />
            <FileMapping Name="*" Options="(+RO-CODE)" />
            <FileMapping Name="*" Options="(+RO-DATA)" />

        </ExecRegion>

        <!-- skip vector area -->

        <ExecRegion Name="ER_RAM_RO" Base="0x00000000" Options="ABSOLUTE" Size="">

            <!-- all code and constants are in RAM, 0-WS, 32-bit wide -->

            <FileMapping Name="VectorsTrampolines.obj" Options="(+RO, +FIRST)" /> <!-- for vector handlers to be far from the vectors -->
            <FileMapping Name="*"                      Options="(SectionForFlashOperations)" />
   
            <!-- Fiq profile -->
            <IfDefined Name="FIQ_SAMPLING_PROFILER">
                <FileMapping Name="FiqSubhandler_MC9328.obj"  Options="(+RO)" /> <!-- for vector handlers to be far from the vectors -->               
                <FileMapping Name="sampling_profiler_RAM.obj" Options="(+RO)" /> <!-- for flashing without running from flash -->
            </IfDefined>           

        </ExecRegion>

        <ExecRegion Name="ER_RAM_RW" Base="+0" Options="ABSOLUTE" Size="">
            <FileMapping Name="*"                Options="(+RW-DATA, +ZI)" />
        </ExecRegion>
     
        <IfDefined Name="FIQ_SAMPLING_PROFILER">
            <ExecRegion Name="ER_PROFILERBUFFER_BEGIN" Base="%ProfileBuffer_Begin%" Options="ABSOLUTE" Size="UNINIT">
                <FileMapping Name="*" Options="(SectionForProfilerBufferBegin)" />
            </ExecRegion>

            <!-- everything between profilebufferbegin and profilebufferend will be allocated for a buffer -->

            <ExecRegion Name="ER_PROFILERBUFFER_END" Base="%ProfileBuffer_End%" Options="ABSOLUTE" Size="UNINIT">
                <FileMapping Name="*" Options="(SectionForProfilerBufferEnd)" />
            </ExecRegion>
        </IfDefined>

        <IfDefined Name="PROFILE_BUILD">
            <ExecRegion Name="ER_PROFILERBUFFER_BEGIN" Base="%ProfileBuffer_Begin%" Options="ABSOLUTE" Size="UNINIT">
                <FileMapping Name="*" Options="(SectionForProfilerBufferBegin)" />
            </ExecRegion>
            <!-- everything between profilebufferbegin and profilebufferend will be allocated for a buffer -->
            <ExecRegion Name="ER_PROFILERBUFFER_END" Base="%ProfileBuffer_End%" Options="ABSOLUTE" Size="UNINIT">
                <FileMapping Name="*" Options="(SectionForProfilerBufferEnd)" />
            </ExecRegion>
        </IfDefined>


        <ExecRegion Name="ER_HEAP_BEGIN" Base="%Heap_Begin%" Options="ABSOLUTE" Size="UNINIT">
            <FileMapping Name="*" Options="(SectionForHeapBegin)" />
        </ExecRegion>

        <!-- everything between heapbegin and heapend will be allocated for a heap -->
        <ExecRegion Name="ER_HEAP_END" Base="%Heap_End%" Options="ABSOLUTE" Size="UNINIT">
            <FileMapping Name="*" Options="(SectionForHeapEnd)" />
        </ExecRegion>

        <!-- this must go last here to provide a low water mark on the stack -->
        <ExecRegion Name="ER_STACK_BOTTOM" Base="%Stack_Bottom%" Options="ABSOLUTE" Size="UNINIT">
            <FileMapping Name="*" Options="(SectionForStackBottom)" />
        </ExecRegion>
       
        <ExecRegion Name="ER_STACK_TOP" Base="%Stack_Top%" Options="ABSOLUTE" Size="UNINIT">
            <FileMapping Name="*" Options="(SectionForStackTop)" />
        </ExecRegion>
    </LoadRegion>

    <IfDefined Name="Config_BaseAddress">
        <LoadRegion Name="LR_CONFIG" Base="%Config_BaseAddress%" Options="ABSOLUTE" Size="%Config_Size%">
            <ExecRegion Name="ER_CONFIG" Base="%Config_BaseAddress%" Options="FIXED" Size="%Config_Size%">
                <FileMapping Name="*" Options="(SectionForConfig)" />

            </ExecRegion>

        </LoadRegion>

    </IfDefined>

</ScatterFile>

问题补充: 知道多少是多少,对我有帮助就给分!如果讲的特别好的话就加分!
Hill.Chang的主页 Hill.Chang | 初学一级 | 园豆:135
提问于:2008-11-08 16:55
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册