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.

F28M35H52C: F28M35H52C - program will not fit into available memory

Part Number: F28M35H52C
Other Parts Discussed in Thread: CONTROLSUITE

Hello Team,

I am getting below error in code, 


#10099-D program will not fit into available memory. placement with alignment/blocking fails for section ".econst" size 0x9b4 page 0. Available memory ranges: .ccsproject /SourceCode_C28 line 172, external location: D:\ti\controlSUITE\device_support\f28m35x\v220\F28M35x_common\cmd\F28M35x_generic_wshared_C28_FLASH.cmd C/C++ Problem

as per my understanding code is not that big to full the flash memory. 

In project properties-> Genral->  linker command file   -F28M35x_Headers_nonBIOS.cmd

does this linker file is having any relation with above mentioned issue.

Regards,

Sandeep

  • Hello,

    After commenting below section from code resolved above bug,

    Also what is the exact meaning of this line, after commenting this

    #ifdef _FLASH
    // Copy time critical code and Flash setup code to RAM
    // This includes the following functions: InitFlash();
    // The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
    // symbols are created by the linker. Refer to the device .cmd file.
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    // Call Flash Initialization to setup flash waitstates
    // This function must reside in RAM
    InitFlash();
    #endif

    But i am still in confusion, what is the purpose of above lines and how to use it. Also after comment what happened to code.


    Regards,
    Sandeep
  • This code copies the functions from flash to RAM.
    Are you recompiling to code as is in control suite or compiling your own code.

    Looks like one of the sections is overflowing. can you share the map file so that i can get better understanding of your code.
    you can try combining FLASHA and FLASHC sections to quickly check if that solves your problem.

    Regards
    Baskaran
  • Hi,

    i commented below lines and increased size of array in my code, but still error is there.

    #ifdef _FLASH

    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    InitFlash();

    #endif

    i have added map file.

    Regards,

    Sandeephttps://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/SourceCode_5F00_C28.7z

  • from mapfile

    name origin length used unused attr fill

    FLASHG 00120000 00008000 00000000 00008000 RWIX
    FLASHF 00128000 00008000 00000000 00008000 RWIX
    FLASHE 00130000 00008000 00000000 00008000 RWIX
    FLASHD 00138000 00002000 0000006a 00001f96 RWIX
    FLASHC 0013a000 00002000 00000000 00002000 RWIX
    FLASHA 0013e000 00001f80 00001f55 0000002b RWIX

    if you see here FLASHC, E,F,G are completely unused. you can try to utilize there.
    to begin with can you merger FLASHC and FLASHA sections and try.
  • Hello Baskaran,

    in this example earlier  F28M35x_generic_wshared_C28_FLASH.cmd file was used in which only 256kb flash was mentioned and only 16k was used so i removed this cmd file from project and added F28M35H52C1_c28 .cmd file in project. this cmd file mention 512kb flash memory. 

    i made some changes in F28M35H52C1_c28 .cmd like as u mentioned i have used the memory which is unused. this resolved my issue of not enough memory.

    But after this change, ramfunction is not working as well as delay used in ADC init is not working. i think micro second delay used for ADC is not working because it requires ramfunction. So please let me know what changes i have to make so that ramfunction will work. 

     

    Regards,

    Sandeep

  • Hello,

    Anyone else from TI team can help on this?

    Thanks and Regards,
    Sandeep
  • Sandeep,
    Sorry for missing this thread. Can you share the modified linked command file.

    Also earlier you mentioned that you have commented this code. is this uncommented now ?

    #ifdef _FLASH
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
    InitFlash();
    #endif

    Regards
    Baskaran