|
发表于 2011-3-10 09:00:44
|
显示全部楼层
CMD文件里面定义
SECTIONS
{
.....
ramfuncs : LOAD = FLASHA,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
...........
程序里面做
// These are defined by the linker (see F2808.cmd)
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
#pragma CODE_SECTION(dft, "ramfuncs");
void dft(Uint16 index,int16 u_data,int16 i_data)
{
....
} |
|