Question: A cleaner way of fixing the location of sections from C. We have a pragama directive called DATA_SECTION which does this.

Answer:


#pragma DATA_SECTION(loose, .memloc)
 
struct  VARS    {
        int     VarA;
        int     VarB;
        int     VarC;
        int     VarD;
} loose;
 
void    funcA( void )
{
        loose.VarA = loose.VarD;
}
 
        What the above pragma generates is the following:
 
        .global _loose
_loose  .usect  .memloc,loosesize,1,0

All you have to do now is map the above section in the linker.


Device: TMS320C5x
Category: Applications / Examples
Detail: Examples
Title: How to Fix the Fixing of Fix variables
Source: Case from the TMS320 Hotline
Date: 06/19/98
GenId: 30094

© Copyright 1998 Texas Instruments Incorporated. All rights reserved.
Trademarks, Important Notice!