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.

.run_from_ram:load=FLASH_EXCUTE,run=RAM_EXCUTE 报错

Other Parts Discussed in Thread: MSP430I2041

我使用的是MSP430I2041芯片,CCS6.2开发环境以及WIN7 32位操作系统。

原本想在FLASH区装载且RAM区运行我的程序,用以优化算法运算速度。

具体操作步骤,我参考了TI的资料:http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/MSP430/1531

当我在CMD文件中添加.run_from_ram:load=FLASH_EXCUTE,run=RAM_EXCUTE此语句后,编译器通报以下错误信息:

Description Resource Path Location Type
#10010 errors encountered during linking; "TA V1.0.out" not built TA V1.0    C/C++ Problem
#10026-D expecting output section, GROUP, or UNION instead of "," lnk_msp430i2041.cmd /TA V1.0 line 95 C/C++ Problem
#10026-D expecting output section, GROUP, or UNION instead of "=" lnk_msp430i2041.cmd /TA V1.0 line 95 C/C++ Problem
gmake: *** [TA V1.0.out] Error 1 TA V1.0    C/C++ Problem
gmake: Target 'all' not remade because of errors. TA V1.0    C/C++ Problem

小白甚感迷茫,求大神拯救我!!!!!!!!

  • 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. */
    /* ============================================================================ */

    /******************************************************************************/
    /* lnk_msp430i2041.cmd - LINKER COMMAND FILE FOR LINKING MSP430i2041 PROGRAMS */
    /* */
    /* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */
    /* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */
    /* */
    /*----------------------------------------------------------------------------*/
    /* These linker options are for command line linking only. For IDE linking, */
    /* you should set your linker options in Project Properties */
    /* -c LINK USING C CONVENTIONS */
    /* -stack 0x0100 SOFTWARE STACK SIZE */
    /* -heap 0x0100 HEAP AREA SIZE */
    /* */
    /*----------------------------------------------------------------------------*/
    /* Version: 1.192 */
    /*----------------------------------------------------------------------------*/

    /****************************************************************************/
    /* Specify the system memory map */
    /****************************************************************************/

    MEMORY
    {
    SFR : origin = 0x0000, length = 0x0010
    PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
    PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
    RAM_EXECUTE : origin = 0x0200, length = 0x0200
    RAM : origin = 0x0400, length = 0x0600//添加了RAM_EXCUTE区域,原码为:RAM : origin = 0x0200, length = 0x0800
    INFOA : origin = 0x1000, length = 0x0400
    FLASH_EXECUTE : origin = 0x8000, length = 0x0200
    FLASH : origin = 0x8200, length = 0x7DDC//添加了FLASH_EXCUTE区域,原码为:FLASH : origin = 0x8000, length = 0x7FDC
    JTAGSIGNATURE : origin = 0xFFDC, length = 0x0004, fill = 0xFFFF
    INT00 : origin = 0xFFE0, length = 0x0002
    INT01 : origin = 0xFFE2, length = 0x0002
    INT02 : origin = 0xFFE4, length = 0x0002
    INT03 : origin = 0xFFE6, length = 0x0002
    INT04 : origin = 0xFFE8, length = 0x0002
    INT05 : origin = 0xFFEA, length = 0x0002
    INT06 : origin = 0xFFEC, length = 0x0002
    INT07 : origin = 0xFFEE, length = 0x0002
    INT08 : origin = 0xFFF0, length = 0x0002
    INT09 : origin = 0xFFF2, length = 0x0002
    INT10 : origin = 0xFFF4, length = 0x0002
    INT11 : origin = 0xFFF6, length = 0x0002
    INT12 : origin = 0xFFF8, length = 0x0002
    INT13 : origin = 0xFFFA, length = 0x0002
    INT14 : origin = 0xFFFC, length = 0x0002
    RESET : origin = 0xFFFE, length = 0x0002
    }

    /****************************************************************************/
    /* Specify the sections allocation into memory */
    /****************************************************************************/

    SECTIONS
    {
    .bss : {} > RAM /* Global & static vars */
    .data : {} > RAM /* Global & static vars */
    .TI.noinit : {} > RAM /* For #pragma noinit */
    .sysmem : {} > RAM /* Dynamic memory allocation area */
    .stack : {} > RAM (HIGH) /* Software system stack */

    .run_from_ram:load=FLASH_EXECUTE,run=RAM_EXECUTE//添加行,原码无。

    .text : {} > FLASH /* Code */
    .cinit : {} > FLASH /* Initialization tables */
    .const : {} > FLASH /* Constant data */
    .jtagsignature : {} > JTAGSIGNATURE /* JTAG Signature */
    .cio : {} > RAM /* C I/O Buffer */

    .pinit : {} > FLASH /* C++ Constructor tables */
    .binit : {} > FLASH /* Boot-time Initialization tables */
    .init_array : {} > FLASH /* C++ Constructor tables */
    .mspabi.exidx : {} > FLASH /* C++ Constructor tables */
    .mspabi.extab : {} > FLASH /* C++ Constructor tables */
    #ifdef __TI_COMPILER_VERSION__
    #if __TI_COMPILER_VERSION__ >= 15009000
    #ifndef __LARGE_DATA_MODEL__
    .TI.ramfunc : {} load=FLASH, run=RAM, table(BINIT)
    #else
    .TI.ramfunc : {} load=FLASH | FLASH2, run=RAM, table(BINIT)
    #endif
    #endif
    #endif

    .infoA : {} > INFOA /* MSP430 INFO FLASH Memory segments */

    /* MSP430 Interrupt vectors */
    .int00 : {} > INT00
    PORT2 : { * ( .int01 ) } > INT01 type = VECT_INIT
    .int02 : {} > INT02
    .int03 : {} > INT03
    PORT1 : { * ( .int04 ) } > INT04 type = VECT_INIT
    TIMER0_A1 : { * ( .int05 ) } > INT05 type = VECT_INIT
    TIMER0_A0 : { * ( .int06 ) } > INT06 type = VECT_INIT
    SD24 : { * ( .int07 ) } > INT07 type = VECT_INIT
    USCI_B0 : { * ( .int08 ) } > INT08 type = VECT_INIT
    USCI_A0 : { * ( .int09 ) } > INT09 type = VECT_INIT
    WDT : { * ( .int10 ) } > INT10 type = VECT_INIT
    VMON : { * ( .int11 ) } > INT11 type = VECT_INIT
    TIMER1_A1 : { * ( .int12 ) } > INT12 type = VECT_INIT
    TIMER1_A0 : { * ( .int13 ) } > INT13 type = VECT_INIT
    NMI : { * ( .int14 ) } > INT14 type = VECT_INIT
    .reset : {} > RESET /* MSP430 Reset vector */
    }

    /****************************************************************************/
    /* Include peripherals memory map */
    /****************************************************************************/

    -l msp430i2041.cmd
  • 第95行 .run_from_ram: load = FLASH_EXECUTE, run = RAM_EXECUTE 和您的代码对比,多了空格。您可以先尝试加空格试试。另外建议您参考下 embedded-funk.net/.../

    E2E链接 e2e.ti.com/.../1001459

    若是还不能解决问题,您可以在 e2e.ti.com/.../343 或者 e2e.ti.com/.../166 发帖询问
  • 能不能具体说一下你的问题?

    另外,有一个帖子可能有帮助: 

  • 谢谢你,真的是空格问题。比较好奇的问一下,为什么需要空格呢?CMD文件编程有没有什么教程,再次感谢!

  • 很高兴您能解决问题!

    关于CMD的编程问题,您可以参考
    software-dl.ti.com/.../sdto_cgt_Linker-Command-File-Primer.html
    以及
    www.ti.com/.../as_8.pdf
  • 非常感谢。您的回复对我很有帮助。