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.

error #10099-D: program will not fit into available memory.

Other Parts Discussed in Thread: CC3200

Hi all,

Can anybody help me with the following error:

"../cc3200v1p32.cmd", line 74: error #10099-D: program will not fit into available memory.  placement with alignment fails for section ".const" size 0x2672 .  Available memory ranges:
   SRAM_CODE    size: 0x12fff      unused: 0x667        max hole: 0x667 

How can I fix it? Thank you very much!!

Best regards,

Sergey Mihaylov

  • Hi Sergei,

    As per log code section size is 75KB and free space availabe is 1639B. Whereas you need  9KB of free space in code section. So please modified code section size in linker configuration file (cc3200v1p32.cmd) as per your requirement.

    Regards,

    Aashish

  • Thank you very much abut your help Aashish :)!


    Do you know is there any limit of the parameters in this .cmd file?

    The origin values of parameters are:

    #define RAM_BASE 0x20004000

        SRAM_CODE (RWX) : origin = 0x20004000, length = 0x12FFF
        SRAM_DATA (RWX) : origin = 0x20017000, length = 0x19000

    I modified the second one to :

        SRAM_CODE (RWX) : origin = 0x20004000, length = 0x14FFF
        SRAM_DATA (RWX) : origin = 0x20019000, length = 0x19000

    and compilation pass. The question is related to the values, how and how much can change(or increase) this values? Are there any limits of them?

    Best regards,

    Sergey Mihaylov.

  • Hi Sergey,

    176KB of RAM available for application that can be managed between data and code section. In addition you can use initial 16KB of RAM (that use by bootloader) as data section once device booted. If you are not using nwp in that case 240KB of RAM available for application.

    Regards,

    Aashish

  • Hi again,

    I decide to post again, because I mentioned that the issue seems fix, but I see very strange behavior of my code. I use a example from CC3200 SDK - wlan_stantion. When I put my functions in main function, my code increase. In that case I modify the parameters in .cmd file. After that my compilation finish with success. But when I run the code under debug mode, my functions don't work. What can be reason about that? Thanks in advice!

    Best regards,

    Sergey Mihaylov.

  • Hi Sergei,

    What linker configuration are you using? And also what is the size of the additional code.

    Regards,

    Aashish

  • Hi,

    In the attached file you can see the configuration of my Linker. As the additional code, I notice in memory location that It increases with 30k when I included my file in main function of wlan_stantion example code

    Regards,

    Sergey.7838.LinkerSetup.zip

  • I see that this issu is related with a interrupt, which call Void Hwi_excFillContext(UInt *excStack) function in Hwi.c file. There run a loop which I can't leave....

    Regards,

    Sergey.

  • Hi Sergey,

    Can you tell me linker configuration from cc3200v1p32.cmd file. If you are using configuration that you mentioned above

     SRAM_CODE (RWX) : origin = 0x20004000, length = 0x14FFF
        SRAM_DATA (RWX) : origin = 0x20019000, length = 0x19000

    than there will be trouble as you crossing 176KB limit by 8KB. If you increasing code section by 8KB (to 0x14FFF) then you need to reduce data section by 8KB (to 0x17000 not 0x19000)

    Regards,

    Aashish

  • Hi Aashish,

    sorry I didn't understand where to get the information about linker configuration from.

    I attach to the letter a .txt file. It is the original view (before my modification) of my .cmd file.

    Regards,

    Sergey.

    4744.cc3200v1p32cmd.txt
    //*****************************************************************************
    // cc3200v1p32.cmd
    //
    // CCS linker configuration file for cc3200 ES 1.32.
    //
    // Copyright (C) 2014 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=g_pfnVectors
    
    //*****************************************************************************
    // 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.              
    //*****************************************************************************
    
    
    //*****************************************************************************
    // The starting address of the application.  Normally the interrupt vectors  
    // must be located at the beginning of the application.                      
    //*****************************************************************************
    #define RAM_BASE 0x20004000
    
    /* System memory map */
    
    MEMORY
    {
        /* Application uses internal RAM for program and data */
        SRAM_CODE (RWX) : origin = 0x20004000, length = 0x12FFF
        SRAM_DATA (RWX) : origin = 0x20017000, length = 0x19000
    }
    
    /* Section allocation in memory */
    
    SECTIONS
    {
        .intvecs:   > RAM_BASE
        .init_array : > SRAM_CODE
        .vtable :   > SRAM_CODE
        .text   :   > SRAM_CODE
        .const  :   > SRAM_CODE
        .cinit  :   > SRAM_CODE
        .pinit  :   > SRAM_CODE
        .data   :   > SRAM_DATA
        .bss    :   > SRAM_DATA
        .sysmem :   > SRAM_DATA
        .stack  :   > SRAM_DATA(HIGH)
    }
    
    

  • Hi Sergey,

    I want to know what modification you did. So can you please post after the modification that creating trouble. 

    Regards,

    Aashish

  • Sergey,

    Can you check how do you register the interrupt. Please note that if you are using TI-RTOS, you need to use osi_InterruptRegister() to register/enable any interrupt in the system.

  • Hi Aashish,

    I found another solution of the issue. Create a copy of serial_wifi, and I attached my functions to it. Of course some of the existing functions I delete them (to free memory location space). Now compilation pass, and my functions seem work. Here are and the results:

    Is it the post that ask me to make or not? Sorry about this question. The modification which I was made, in .cmd file was as I described above:

      SRAM_CODE (RWX) : origin = 0x20004000, length = 0x12FFF change to ->

      SRAM_CODE (RWX) : origin = 0x20004000, length = 0x14FFF

    and

    SRAM_DATA (RWX) : origin = 0x20017000, length = 0x19000 change to ->

    SRAM_DATA (RWX) : origin = 0x20019000, length = 0x19000 nothing else.

    The compilation in that case pass, but my functions didn't work. Now my compilation pass and functions work. But as you can see, I haven't modified .cmd file. With simple words I try to enter in the default memory space (as it set in .cmd file without change it). In that case I delete existing functions in serial_wifi project, and put my functions on their place.

    The problem which exist yet, is how to use interrupts in this project. I'm researching serial_wifi, to see what kinf of OS is used in it (TI_RTOS or FREE_RTOS because I don't know). My purpose is to send user comands:

    for example I send:

    1. ATC1 - to start auto connectin

    2. when connection established, I look for for events, which are related to WLAN connection. When the AP is switch off(for example) I must disconnect my module. And when AP is appeared again, my module must run reconnection process to establish the connection to AP.

    My functions are related with this commands which I send by RS232 (serial terminal). for now I have 5 commands and some additional functions to them.

    Hi Kaushal,

    As I describe above, I use  serial_wifi project about my purpose. I see that in this project (Ctrl+H -> File search) these are several places, no which is use use osi_InterruptRegister():

    - gpio_if.c file -

    void
    GPIO_IF_ConfigureNIntEnable(unsigned int uiGPIOPort,
                                      unsigned char ucGPIOPin,
                                      unsigned int uiIntType,
                                      void (*pfnIntHandler)(void))
    {
      // Set GPIO interrupt type
      MAP_GPIOIntTypeSet(uiGPIOPort,ucGPIOPin,uiIntType);

      // Register Interrupt handler
    #ifdef USE_TIRTOS
          osi_InterruptRegister(GetPeripheralIntNum(uiGPIOPort),
                                      pfnIntHandler, INT_PRIORITY_LVL_1);       
    #else
          MAP_GPIOIntRegister(uiGPIOPort,pfnIntHandler);
    #endif

      // Enable Interrupt
      MAP_GPIOIntClear(uiGPIOPort,ucGPIOPin);
      MAP_GPIOIntEnable(uiGPIOPort,ucGPIOPin);
    }

    - cc_pal.c file

    ...............................

    this is in Fd_t spi_Open(char *ifName, unsigned long flags) function

    #if defined(SL_PLATFORM_MULTI_THREADED)
        osi_InterruptRegister(INT_LSPI, (P_OSI_INTR_ENTRY)DmaSpiSwIntHandler,INT_PRIORITY_LVL_1);
        SPIIntEnable(ulBase,SPI_INT_EOW);

    ............................

    this is in int NwpRegisterInterruptHandler(P_EVENT_HANDLER InterruptHdl , void* pValue) function

              #ifdef SL_PLATFORM_MULTI_THREADED
                   IntPendClear(INT_NWPIC);
                 osi_InterruptRegister(INT_NWPIC, (P_OSI_INTR_ENTRY)HostIntHanlder,INT_PRIORITY_LVL_1);

    ............................

    Do you have any idea, how is used OS interrupts in serial_wifi or can you give an advice where to start to research from? Could you give nay example code related with this interrupts?

    Thanks to all about replays !!!

    Best regards,

    Sergey Mihaylov.

  • Hi again,

    I have an additional question: If anybody test or implement functions which are related to connection to AP, but usinf WEP security access? Because I try to connect to my AP,  using WEP but without access (I set the setting of my AP to use WEP security). When I re change the settings of AP to WAP, connection established. When I use WEP security, I change the set in my code to :

    #define SECURITY_TYPE       SL_SEC_TYPE_WEP

    Thanks in advice!

    Best regards,

    Sergey Mihaylov.

  • Hi Sergey,

    SRAM_CODE (RWX) : origin = 0x20004000, length = 0x12FFF change to ->

      SRAM_CODE (RWX) : origin = 0x20004000, length = 0x14FFF

    and

    SRAM_DATA (RWX) : origin = 0x20017000, length = 0x19000 change to ->

    SRAM_DATA (RWX) : origin = 0x20019000, length = 0x19000 nothing else.

    Here is problem in your configuration. You increase SRAM_CODE from 0x12FFF to 0x14FFF means by 8KB so now you have to reduce SRAM_DATA size from 0x19000 to 0x17000. 

    So here is right configuration:

    SRAM_CODE (RWX) : origin = 0x20004000, length = 0x14FFF

    SRAM_DATA (RWX) : origin = 0x20019000, length = 0x17000

  • Hi Sergey,

    I am closing the thread, if issue still exist please open a new thread and add a link to this one for reference.

    Best regards,

    Naveen

  • Hi,

    if it's possible, the comments do not delete according this thread? Thanks !

    Regards,

    Sergey.