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.

CC1310: CC1310

Part Number: CC1310

Hello,

I've succesfully configured linker file to store Simplelink-SDK functions at specific location.

Now I face another problem:

Need also to define fixed location for the variables, so I've defined them as follows

.driverlib_ram :
{
--library=ti/devices/cc13x0/driverlib/bin/ccs/driverlib.lib(.data,.bss,.vtable_ram)
}

As a result I get several variables defined in required section, and some not.

driverlib_release_0_60062 variable is not located in required section

Any suggestions how to fix the issue?

Thank you.

  • Hi Archil,

    I just need some background info. Which SDK version are you using?

    And would it be possible for you to share your linker file?

    BR,
    Andres

  • //*****************************************************************************
    //! @file       cc13x0f128.cmd
    //! @brief      CC13x0F128 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
    /*
    --retain='*(.rf_single_mode)'
    --retain='*(.drivers*)'
    --retain=driverlib.lib<*>(.text)
    */
    --retain='*(.board*)'
    --retain='*(.rfn_drivers*)'
    
    /* 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              0x00000000
    #define FLASH_LEN               0x0A000 // 0x20000
    #define FLASH_APP_BASE          0x00001000
    #define FLASH_PAGE_LEN          0x1000
    #define FLASH_OAD_IMG_HDR_SIZE  0x10
    #define FLASH_OAD_IMG_START     FLASH_APP_BASE + FLASH_OAD_IMG_HDR_SIZE
    #define FLASH_OAD_IMG_MAX_LEN   FLASH_LEN - (2 * FLASH_PAGE_LEN) - FLASH_OAD_IMG_HDR_SIZE
    
    #define FLASH_SDK_BASE			0x015000
    #define FLASH_SDK_START			FLASH_SDK_BASE + FLASH_OAD_IMG_HDR_SIZE
    #define FLASH_SDK_LEN			0x08000 - FLASH_OAD_IMG_HDR_SIZE
    
    #define RAM_BASE                0x20000000
    #define SDK_RAM_SIZE			0x2400//0x898
    #define RAM_SIZE                0x5000
    #define GPRAM_BASE              0x11000000
    #define GPRAM_SIZE              0x2000
    
    
    /* System memory map */
    
    MEMORY
    {
        /* Application stored in and executes from internal flash */
        IMAGE_HEADER (RX) : origin = FLASH_APP_BASE, length = FLASH_OAD_IMG_HDR_SIZE
        FLASH (RX) : origin = FLASH_OAD_IMG_START, length = FLASH_OAD_IMG_MAX_LEN
        SDK_HEADER (RX) : origin = FLASH_SDK_BASE, length = FLASH_OAD_IMG_HDR_SIZE
    	SDK (RX) : origin = FLASH_SDK_START, length = FLASH_SDK_LEN
    
        /* Application uses internal RAM for data */
        SDKRAM (RXW) : origin = RAM_BASE, length = SDK_RAM_SIZE
        SRAM (RWX) : origin = RAM_BASE + SDK_RAM_SIZE, length = RAM_SIZE - SDK_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
    {
        .imgHdr         :   > IMAGE_HEADER
        .sdkHdr         :   > SDK_HEADER
        .sdk         	:   > SDK
        .intvecs        :   > FLASH_OAD_IMG_START
        .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         :   > SDKRAM
        .stack          :   > SDKRAM (HIGH)
        .nonretenvar    :   > SRAM
        .TI.noinit      :   > SRAM
        .gpram          :   > GPRAM
    
    GROUP : > SDK
    {
    	.arm :
    	{
    		--library=rtsv7M3_T_le_eabi.lib(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    	}
    	.rf_single_mode :
    	{
    		--library=ti/drivers/rf/lib/rf_singleMode_cc13x0.aem3(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    	}
    	.drivers :
    	{
    		--library=ti/drivers/lib/drivers_cc13x0.aem3(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    	}
    	.nortios :
    	{
    		--library=lib/nortos_cc13x0.aem3(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    	}
    	.driverlib :
    	{
    		--library=ti/devices/cc13x0/driverlib/bin/ccs/driverlib.lib(.text,.const,.constdata,.rodata,.binit,.cinit,.pinit,.emb_text)
    	}
    	.board :
    	{
    		board*.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    	}
    	.rfn_drivers :
    	{
    		console.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    		flash.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    		leds.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    		radio.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    		rf_queue.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    		timer.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    		smartrf_settings.obj(.text,.const,.constdata,.cinit,.pinit,.emb_text)
    	}
    }
    GROUP : > SDKRAM
    {
    	.arm_ram :
    	{
    		--library=rtsv7M3_T_le_eabi.lib(.data,.bss,.common,.system)
    	}
    	.rf_single_mode_ram :
    	{
    		--library=ti/drivers/rf/lib/rf_singleMode_cc13x0.aem3(.data,.bss,.common)
    	}
    	.drivers_ram :
    	{
    		--library=ti/drivers/lib/drivers_cc13x0.aem3(.data,.bss,.common)
    	}
    	.nortios_ram :
    	{
    		--library=lib/nortos_cc13x0.aem3(.data,.bss,.common)
    	}
    	.driverlib_ram :
    	{
    		--library=ti/devices/cc13x0/driverlib/bin/ccs/driverlib.lib(.data,.data.*,.bss,.bss.*,.vtable_ram)
    	}
    	.board_ram :
    	{
    		board*.obj(.data,.bss,.bss.*)
    	}
    	.rfn_drivers_ram :
    	{
    		console.obj(.data,.bss,.common)
    		flash.obj(.data,.bss,.common)
    		leds.obj(.data,.bss,.common)
    		radio.obj(.data,.bss,.common)
    		/*rf_queue.obj(.data,.data.*,.bss,.bss.*)*/
    		timer.obj(.data,.bss,.common)
    		smartrf_settings.obj(.data,.bss,.common)
    	}
    }
    
    #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=SDK, run=SDKRAM, 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;
    

    Hello Andres,

    Simplelink CC13x0 SDK 4.20.0.05

  • Hi Archil,

    I’m guessing that you already read this documentation, but I'll still put it here just in case.

    https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html

    Memory Section of: https://dev.ti.com/tirex/explore/node?node=APeHcG.A0wniaym22zAYKw__pTTHBmu__LATEST

    Having said this, the only reason that comes to my mind about what you are seeing is that a #pragma directive is being used somewhere to keep that driverlib variable in a specific section. Although I wouldn’t know what would be the reason for this.

    BR,
    Andres

  • Hello Andres,

    Thanks for your reply. 

    Yes, I've read those documents.

    I've searched project for #pragma and only cases that I'm using it are:

    #pragma NOINIT - to not initialize variables

    #pragma DATA_ALIGN - to align buffer to 4 bytes

    and only one case to place one variable flag to specific place (#pragma LOCATION) to sign to the bootloader not to load application.

    I don't think that those pragmas cause the issue.

    The reason I need to split the application is, that we do not have enough memory space for remote firmware update (OTA). So we decided to split drivers and SDK functions code to different section and update only custom application part. But the problem is that all shared variables and functions should be placed in SDK part and not be moved from their location in order to make this work.

    May be you can suggest how to walkaround this problem? Unfortunately external memory is not the solution.

    Thank you,

    Archil