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.

CC2650: CCS: "FLASH memory range has already been specified" error when copying a project

Part Number: CC2650

I have a project that is based on the simple_peripheral example.  It builds and runs successfully.  Now, I want to make a variant so I copied the CCS project and pasted to a new one.  When I try to do a clean build on the new copy, I get these errors:

Description Resource Path Location Type
#10010 errors encountered during linking; "Power10.out" not built Power10 C/C++ Problem
#10263 FLASH memory range has already been specified cc26x0f128.cmd /Power10 line 78 C/C++ Problem
#10263 SRAM memory range has already been specified cc26x0f128.cmd /Power10 line 80 C/C++ Problem
#10264 FLASH memory range overlaps existing memory range FLASH cc26x0f128.cmd /Power10 line 78 C/C++ Problem
#10264 FLASH memory range overlaps existing memory range FLASH_LAST_PAGE cc26x0f128.cmd /Power10 line 78 C/C++ Problem
#10264 SRAM memory range overlaps existing memory range SRAM cc26x0f128.cmd /Power10 line 80 C/C++ Problem
gmake: *** [all] Error 2 Power10 C/C++ Problem
gmake[1]: *** [Power10.out] Error 1 Power10 C/C++ Problem
#10190-D absolute symbol "__STACK_TOP" being redefined cc26x0f128.cmd /Power10 line 124 C/C++ Problem
#69-D integer conversion resulted in a change of sign simple_peripheral.c /Power10/Application line 297 C/C++ Problem

The errors occur in cc26x0f128.cmd which says that it is auto-generated.  What tool does the generation?  Is there something specific I need to do when copying a CCS project?

I'm using CCS version 10.2.0.00009

Thanks for any pointers!

  • Hi Jim,

    Did you copy-paste the project in the CCS project explorer environment or in your File Explorer?
    When you open the simple_peripheral example in your workspace for the first time did you check the box below?

    This box allows you to modify the example without impact on the original one, the SDK one. Thus, you can directly apply your modification in this file, without copy-paste.

    Regards,

    PS: Make sure all your projects have not the same name.

  • Hi Guillaume,

    I did the recent copy/paste in the CCS project explorer window.  That project builds ok and works as required.  When I copy & paste it to a project with a different name, I get the errors.

    I set up the original project a couple of years ago so I don't remember if I if I did it with the "copy projects into workspace" box ticked.

    Jim

  • Does the error still occurs when you copy-paste the project in a new workspace?

    It seems that the symbols __STACK_TOP is redefined, but I will need more informations to fix that, could you provide me a screenshot of your project explorer, and the file where the error occurs, please?

    Regards,

  • Yes, when I copy/paste the working project, I get the build errors.

    Here is a screenshot of the project explorer:

    the error is in the cc26x0f128.cmd file:

    //*****************************************************************************
    //! @file       cc26x0f128.cmd
    //! @brief      CC26x0F128 rev2 linker file for Code Composer Studio.
    //!
    //! Revised     $Date$
    //! Revision    $Revision$
    //
    //  This file is auto-generated.
    //
    //  Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
    //
    //
    //  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.
    //****************************************************************************/
    
    /* Retain interrupt vector table variable                                    */
    --retain=g_pfnVectors
    /* Override default entry point.                                             */
    --entry_point ResetISR
    /* Allow main() to take args                                                 */
    --args 0x8
    /* Suppress warnings and errors:                                             */
    /* - 10063: Warning about entry point not being _c_int00                     */
    /* - 16011, 16012: 8-byte alignment errors. Observed when linking in object  */
    /*   files compiled using Keil (ARM compiler)                                */
    --diag_suppress=10063,16011,16012
    
    /* The following command line options are set as part of the CCS project.    */
    /* If you are building using the command line, or for some reason want to    */
    /* define them here, you can uncomment and modify these lines as needed.     */
    /* If you are using CCS for building, it is probably better to make any such */
    /* modifications in your CCS project and leave this file alone.              */
    /*                                                                           */
    /* --heap_size=0                                                             */
    /* --stack_size=256                                                          */
    /* --library=rtsv7M3_T_le_eabi.lib                                           */
    
    /* The starting address of the application.  Normally the interrupt vectors  */
    /* must be located at the beginning of the application.                      */
    #define FLASH_BASE              0x0
    #define FLASH_SIZE              0x20000
    #define RAM_BASE                0x20000000
    #define RAM_SIZE                0x5000
    #define GPRAM_BASE              0x11000000
    #define GPRAM_SIZE              0x2000
    
    
    /* System memory map */
    
    MEMORY
    {
        /* Application stored in and executes from internal flash */
        FLASH (RX) : origin = FLASH_BASE, length = FLASH_SIZE
        /* Application uses internal RAM for data */
        SRAM (RWX) : origin = RAM_BASE, length = RAM_SIZE
        /* Application can use GPRAM region as RAM if cache is disabled in the CCFG
        (DEFAULT_CCFG_SIZE_AND_DIS_FLAGS.SET_CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM = 0) */
        GPRAM (RWX): origin = GPRAM_BASE, length = GPRAM_SIZE
    }
    
    /* Section allocation in memory */
    
    SECTIONS
    {
        .intvecs        :   > FLASH_BASE
        .text           :   > FLASH
        .const          :   > FLASH
        .constdata      :   > FLASH
        .rodata         :   > FLASH
        .binit          :   > FLASH
        .cinit          :   > FLASH
        .pinit          :   > FLASH
        .init_array     :   > FLASH
        .emb_text       :   > FLASH
        .ccfg           :   > FLASH (HIGH)
    
        .vtable         :   > SRAM
        .vtable_ram     :   > SRAM
         vtable_ram     :   > SRAM
        .data           :   > SRAM
        .bss            :   > SRAM
        .sysmem         :   > SRAM
        .stack          :   > SRAM (HIGH)
        .nonretenvar    :   > SRAM
        .TI.noinit      :   > SRAM
        .gpram          :   > GPRAM
    
    #ifdef __TI_COMPILER_VERSION__
    #if __TI_COMPILER_VERSION__ >= 15009000
    /*  Hide section from older compilers not supporting the "ramfunc" attribute.
        See http://processors.wiki.ti.com/index.php/Placing_functions_in_RAM */
        .TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
    #endif
    #endif
    }
    
    /* Create global constant that points to top of stack */
    /* CCS: Change stack size under Project Properties    */
    __STACK_TOP = __stack + __STACK_SIZE;
    

  • Some other related questions:

    - is there an app note covering how to gather up only the files used by the simpleperipheral app into a separate CCS project?

    - is it possible to release an open-source customization of the simpleperipheral app?

  • Hi Jim,

    It seems to be a linker file error, can you provide me the Linker command file in the properties of your project, General.

    Check that this file corresponds to your dedicated copied project.

    Regards,

  • Hi,

    There is a procedure to properly create custom CC2650 CCS projects. It's not documented anywhere. I think what you can do is rename the simple peripheral.

    -kel

  • The copied project uses this linker command file: C:\ti\ccs1020\ccs\ccs_base\arm\include\cc26x0f128.cmd. I checked my original project and it had the linker command field empty.  When I deleted the contents, in my new project, it started working!  I'm not sure how the linker command file got changed.

    I'm trying to understand the best practice to use when creating a custom project based on simple_peripheral to be shared as a Github repo.  If I make the entire SDK a git repo, it will contain a lot of files that aren't really needed to make the project.  My project has modified only simple_peripheral.c/.h, simple_gatt_profile.c/.h and devinfoservice.c so it's really just a very small set of the files in the SDK.   Any guidance is appreciated.