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.

Running out of Flash?

Other Parts Discussed in Thread: TMS320F28035, CCSTUDIO

I'm using TMS320F28035 (128KB flash). I've receive the following error (which I assume of not having enough Flash)

"C:\\TI_F28xxx_SysSW\\FatFSII\\F28035_FLASH.CMD", line 92: error: placement

   fails for object ".text", size 0x27c4 (page 0).  Available ranges:

   FLASHA       size: 0x1f80       unused: 0x1b91       max hole: 0x1b91    

error: errors encountered during linking; "./Debug/FatFSII.out" not built

 

Here's the .map contents

 

MEMORY CONFIGURATION

 

         name            origin    length      used     unused   attr    fill

----------------------  --------  ---------  --------  --------  ----  --------

PAGE 0:

  progRAM               00008000   00001000  0000001f  00000fe1  RWIX

  OTP                   003d7800   00000400  00000000  00000400  RWIX

  FLASHH                003e8000   00002000  00000000  00002000  RWIX

  FLASHG                003ea000   00002000  00000000  00002000  RWIX

  FLASHF                003ec000   00002000  00000000  00002000  RWIX

  FLASHE                003ee000   00002000  00000000  00002000  RWIX

  FLASHD                003f0000   00002000  0000001f  00001fe1  RWIX

  FLASHC                003f2000   00002000  00000000  00002000  RWIX

  FLASHA                003f6000   00001f80  000003ef  00001b91  RWIX

  CSM_RSVD              003f7f80   00000076  00000000  00000076  RWIX

  BEGIN                 003f7ff6   00000002  00000002  00000000  RWIX

  CSM_PWL               003f7ff8   00000008  00000000  00000008  RWIX

  IQTABLES              003fe000   00000b50  00000000  00000b50  RWIX

  IQTABLES2             003feb50   0000008c  00000000  0000008c  RWIX

  IQTABLES3             003febdc   000000aa  00000000  000000aa  RWIX

  BOOTROM               003ff27c   00000d44  00000000  00000d44  RWIX

  RESET                 003fffc0   00000002  00000000  00000002  RWIX

  VECTORS               003fffc2   0000003e  00000000  0000003e  RWIX

 

I saw a lot of unused Flash there, why won't my program fit?

Any help appreciated. Thanks

 

  • Hi Gloria,

    To give you a precise answer we would need to see your linker command file. It seems that you allow .text only to be placed into FLASHA.

    Best regards

    Andreas

  • The Build window returned this message while linking

    [Linking...] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -@"Debug.lkf"

    <Linking>

     

    However, I think I know what you're talking about. Is it this section of the code?

    SECTIONS

    {

       /* Allocate program areas: */

       .cinit            : > FLASHA,     PAGE = 0

       .pinit            : > FLASHA,     PAGE = 0

       .text             : > FLASHA,     PAGE = 0

     

       codestart         : > BEGIN       PAGE = 0

       ramfuncs          : LOAD = FLASHD, 

                           RUN = progRAM, 

                           LOAD_START(_RamfuncsLoadStart),

                           LOAD_END(_RamfuncsLoadEnd),

                           RUN_START(_RamfuncsRunStart),

                           PAGE = 0

    How to make it to write to multiple sectors?

    Thanks

  • You need to concatenate two sectors together like this (assuming your FLASHB sector is free too...)

    MEMORY

    {

    PAGE

    0: /* Program Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    ...........
    ...........
    ...........
    FLASHAB :

    0: /* Program Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    ...........
    ...........
    ...........
    FLASHAB :

    origin = 0x3F4000, length = 0x003F80, fill = 0xFFFF /* on-chip program FLASH sections A and B*/
    ...........
    ...........
    ...........

    Then you can place your .text section into this bigger FLASH Section

    SECTIONS

     

     

    Hope this helps!

    Regards, Andreas

    {
    /* Allocate program areas: */
    ...........
    ...........
    ...........

    .text : > FLASHAB PAGE = 0
    ...........
    ...........
    ...........

  • Andreas is right. You didn't have enough space in FlashA memory to place .text etc. So, all you need to do is increase the size of FlashA greater than 0x3000 since you also load .cint and .pint . If you do that your problem will be resolved.

    Regards,

    Manoj