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.

TMS320F280049C: Sysconfig error while configuring GPIOs

Part Number: TMS320F280049C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

Hello,

I am using F280049C MCU for my project and try to configure GPIO with sysconfig. In the project I both use sysconfig and bitfield approach. I use sysconfig 1.22.0

So far I set 6 GPIOs. When I try to set the 7th, the compiler or the linker provide below error:

Description Resource Path Location Type
#10099-D program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".text" size 0x273f page 0. Available memory ranges: 28004x_generic_flash_lnk.cmd /HiPE_HVLV_DCDC_concept_SW_V3/Linker_command_files line 77 C/C++ Problem

In the console below error message is seen:


"../Linker_command_files/28004x_generic_flash_lnk.cmd", line 77: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".text" size 0x273f page 0. Available memory ranges:
FLASH_BANK0_SEC2 size: 0x1000 unused: 0x0 max hole: 0x0
FLASH_BANK0_SEC3 size: 0x1000 unused: 0x8cc max hole: 0x8cc
FLASH_BANK0_SEC5 size: 0x1000 unused: 0x1000 max hole: 0x1000
error #10010: errors encountered during linking; "HiPE_HVLV_DCDC_concept_SW_V3.out" not built.


I guess it says the error is about the memory but my college could set much more GPIO with sysconfig 1.19.00. 

Also the error is also seen when I try to set 4 GPIO with the "Write Initial Value"  selected.

Can anybody help me about this?


  • HI,

    This is mainly caused due to lack of memory available to write for .text section. Can you add more memory for the .text section and try out.

    Also please share your linker cmd file for further analysis.

    I don't think this is an issue with Syscfg tool version.

    Thanks

    Aswin

  • MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to Flash" bootloader mode   */
    
       BEGIN           	: origin = 0x080000, length = 0x000002
       RAMM0           	: origin = 0x0000F6, length = 0x00030A
    
       RAMLS0          	: origin = 0x008000, length = 0x000800
       RAMLS1          	: origin = 0x008800, length = 0x000800
       RAMLS2      		: origin = 0x009000, length = 0x000800
       RAMLS3      		: origin = 0x009800, length = 0x000800
       RAMLS4      		: origin = 0x00A000, length = 0x000800
       RESET           	: origin = 0x3FFFC0, length = 0x000002
    
       /* Flash sectors */
       /* BANK 0 */
       FLASH_BANK0_SEC0  : origin = 0x080002, length = 0x000FFE	/* on-chip Flash */
       FLASH_BANK0_SEC1  : origin = 0x081000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC2  : origin = 0x082000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC3  : origin = 0x083000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC4  : origin = 0x084000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC5  : origin = 0x085000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC6  : origin = 0x086000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC7  : origin = 0x087000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC8  : origin = 0x088000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC9  : origin = 0x089000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x001000	/* on-chip Flash */
    
       /* BANK 1 */
       FLASH_BANK1_SEC0  : origin = 0x090000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC1  : origin = 0x091000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC2  : origin = 0x092000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC3  : origin = 0x093000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC4  : origin = 0x094000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC5  : origin = 0x095000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC6  : origin = 0x096000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC7  : origin = 0x097000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC8  : origin = 0x098000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC9  : origin = 0x099000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC10 : origin = 0x09A000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC11 : origin = 0x09B000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC12 : origin = 0x09C000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC13 : origin = 0x09D000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC14 : origin = 0x09E000, length = 0x001000	/* on-chip Flash */
       FLASH_BANK1_SEC15 : origin = 0x09F000, length = 0x000FF0	/* on-chip Flash */
    
    //   FLASH_BANK1_SEC15_RSVD : origin = 0x09FFF0, length = 0x000010  /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    
    PAGE 1 :
    
       BOOT_RSVD       : origin = 0x000002, length = 0x0000F1     /* Part of M0, BOOT rom will use this for stack */
       RAMM1           : origin = 0x000400, length = 0x0003F8     /* on-chip RAM block M1 */
    //   RAMM1_RSVD      : origin = 0x0007F8, length = 0x000008     /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    
       RAMLS5      : origin = 0x00A800, length = 0x000800
       RAMLS6      : origin = 0x00B000, length = 0x000800
       RAMLS7      : origin = 0x00B800, length = 0x000800
    
       RAMGS0      : origin = 0x00C000, length = 0x002000
       RAMGS1      : origin = 0x00E000, length = 0x002000
       RAMGS2      : origin = 0x010000, length = 0x002000
       RAMGS3      : origin = 0x012000, length = 0x001FF8
    //   RAMGS3_RSVD : origin = 0x013FF8, length = 0x000008     /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    }
    
    
    SECTIONS
    {
       codestart        : > BEGIN,     PAGE = 0, ALIGN(4)
       .text            : >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC5,   PAGE = 0, ALIGN(4)
       .cinit           : > FLASH_BANK0_SEC1,     PAGE = 0, ALIGN(4)
       .switch          : > FLASH_BANK0_SEC1,     PAGE = 0, ALIGN(4)
       .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */
    
       .stack           : > RAMM1,     PAGE = 1
    
    #if defined(__TI_EABI__)
       .init_array      : > FLASH_BANK0_SEC1,       PAGE = 0,       ALIGN(4)
       .bss             : > RAMLS5,       PAGE = 1
       .bss:output      : > RAMLS3,       PAGE = 0
       .bss:cio         : > RAMLS0,       PAGE = 0
       .data            : > RAMLS5,       PAGE = 1
       .sysmem          : > RAMLS5,       PAGE = 1
       /* Initalized sections go in Flash */
       .const           : > FLASH_BANK0_SEC4,       PAGE = 0,       ALIGN(4)
    #else
       .pinit           : > FLASH_BANK0_SEC1,       PAGE = 0,       ALIGN(4)
       .ebss            : > RAMLS5,       PAGE = 1
       .esysmem         : > RAMLS5,       PAGE = 1
       .cio             : > RAMLS0,       PAGE = 0
       .econst          : > FLASH_BANK0_SEC4,    PAGE = 0, ALIGN(4)
    #endif
    
       ramgs0           : > RAMGS0,    PAGE = 1
       ramgs1           : > RAMGS1,    PAGE = 1
    
     
    #if defined(__TI_EABI__) 
       .TI.ramfunc      : LOAD = FLASH_BANK0_SEC1,
                          RUN = RAMLS0,
                          LOAD_START(RamfuncsLoadStart),
                          LOAD_SIZE(RamfuncsLoadSize),
                          LOAD_END(RamfuncsLoadEnd),
                          RUN_START(RamfuncsRunStart),
                          RUN_SIZE(RamfuncsRunSize),
                          RUN_END(RamfuncsRunEnd),
                          PAGE = 0, ALIGN(4)
    #else					  
       .TI.ramfunc      : LOAD = FLASH_BANK0_SEC1,
                          RUN = RAMLS0,
                          LOAD_START(_RamfuncsLoadStart),
                          LOAD_SIZE(_RamfuncsLoadSize),
                          LOAD_END(_RamfuncsLoadEnd),
                          RUN_START(_RamfuncsRunStart),
                          RUN_SIZE(_RamfuncsRunSize),
                          RUN_END(_RamfuncsRunEnd),
                          PAGE = 0, ALIGN(4)
    #endif
    
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    

    I have shared the cmd file with the screenshot of the error line (77th line).
    I am new to these topic can you please show me a document about adding memory for the .text section?

  • Hi,

    Please have a look at the threads for CMD file configuration.

    TI Linker Command File Primer

    We already have linker cmd files present in the SDK folder at - C2000Ware_5_04_00_00\device_support\f28004x\common\cmd

    You can have a look at the generic linker cmd files in the folder.

    You can take a look at the .map file generated to figure out which sections are allocated to .text and which one is taking up space.

    Thanks

    Aswin

  • Ok I solved the problem, however I did not understand why did it occured.

    When the I try to set 6 GPIO from the sysconfig, this is the memory allocation result



    Below is the .cmd command 
       .text            : >> FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7 ,   PAGE = 0, ALIGN(4)


    Then when I add the 7th GPIO the error is seen with below memory allocation result



    As you can see with 6 GPIO setup the memory can be allocated sec5 and sec6 fully and almost half of SEC7.

    But when I add the 7th one the allocation is blocked at the half of SEC6.

    It would be nice to learn the reason here.

    Thank you for the support.
    Best regards,

    Gökhan 

  • I used below line for the memory which combine 9 sectors in bank0 so that it became quite large for the code. (Instead of the above SEC5,SEC6,SEC7 command)

    FLASH_BANK0_MAINPGM :origin = 0x087000, length = 0x009000           /* on-chip Flash */
    text            : >> FLASH_BANK0_MAINPGM,   PAGE = 0, ALIGN(4)

    The memory allocation result is

    If there is an explanation why did this happened, it would be quite instructive.