This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TM4C1292NCPDT:默认存储器范围与现有存储器范围闪存重叠

Guru**** 2388040 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1163416/tm4c1292ncpdt-default-memory-range-overlaps-existing-memory-range-flash

器件型号:TM4C1292NCPDT

您好!

我在编译项目时遇到以下错误:

我要附加下面链接器.cmd 文件的屏幕截图:

请帮助我解决此错误。

谢谢、

Kiranjit

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     您是否知道您的计划有多大? 您可以检查 Debug 目录中的映射文件。 请参见下面的。 我看到您在0x84000处启动闪存部分。 您没有为代码保留的空间大于0.5 MB。 您为什么要这么做? 如果您的代码大于0.5Mb、则它将不适合在0x84000和0x100000之间。 另一个注释是您将闪存声明为(RXW)。 您应该更改为(RX)。 请参阅其中一个 TivaWare 示例以供参考。  

      

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    [引用 userid="93620" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1163416/tm4c1292ncpdt-default-memory-range-overlaps-existing-memory-range-flash/4376026 #4376026")您是否知道您的计划有多大? 您可以检查 Debug 目录中的映射文件。 请参见下面的。 我看到您在0x84000处启动闪存部分。 您没有为代码保留的空间大于0.5 MB。 您为什么要这么做? 如果您的代码大于0.5Mb、则它将不适合在0x84000和0x100000之间。 另一个注释是您将闪存声明为(RXW)。 您应该更改为(RX)。 请参阅其中一个 TivaWare 示例以供参考。

    我进行了建议的更改。 以下是我的映射文件。

    我更新的 linker.cmd 文件为:

    现在的错误是:

    此致、

    Kiran

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     您能否尝试两件事:

     -尝试导入现有的 TI-RTOS 示例。 它应该开箱即用。 使用示例使用的.cmd 文件。 启动新项目的最佳方法是使用现有示例作为起始点、其中已为您设置了所有系统变量.cmd 等。 我不确定您从哪里获取初始.cmd 文件。 如果您从一个工作示例开始、您将会有一段轻松得多的时间。  

     或尝试使用以下.cmd 文件。 这是其中一个 TI-RTOS 示例的.cmd。  

    /*
     * Copyright (c) 2016, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    /*
     *  ======== EK_TM4C1294XL.cmd ========
     *  Define the memory block start/length for the EK_TM4C1294XL M4
     */
    
    MEMORY
    {
        FLASH (RX) : origin = 0x00000000, length = 0x00100000
        SRAM (RWX) : origin = 0x20000000, length = 0x00040000
    }
    
    /* Section allocation in memory */
    
    SECTIONS
    {
        .text   :   > FLASH
        .const  :   > FLASH
        .cinit  :   > FLASH
        .pinit  :   > FLASH
        .init_array : > FLASH
    
        .data   :   > SRAM
        .bss    :   > SRAM
        .sysmem :   > SRAM
        .stack  :   > SRAM
    }