1、将main中的数组变量放到RAML0段去:
#pragma DATA_SEC
tiON(array,"mysect")
_iq array[16][16];
然后在CMD文件中的section部分添加以下段,
请问是在PAGE 0中还是PAGE 1 中定义段mysect?
mysect : > RAML0, PAGE = 0 /* Program Memory */ 或PAGE 1 /* Data Memory */
2、
MEMORY
[
PAGE 0: /* Program Memory */
IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */
IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */
BOOTROM : origin = 0x3FF27C, length = 0x000D44 /* Boot ROM */
]
IQmath : > FLASHCD PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
/* Uncomment the section below if calling the IQNexp() or IQexp() functions from the IQMath.lib library in order to utilize the relevant IQ Math table in Boot ROM (This saves space and Boot ROM is 1 wait-state). If this section is not uncommented, IQmathTables2 will be loaded into other memory (SARAM, Flash, etc.) and will take up space, but 0 wait-state is possible. */
IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
[
IQmath.lib
(IQmathTablesRam)
]
/* Uncomment the section below if calling the IQNasin() or IQasin() functions from the IQMath.lib library in order to utilize the
relevant IQ Math table in Boot ROM (This saves space and Boot ROM is 1 wait-state). If this section is not uncommented, IQmathTables2 will be loaded into other memory (SARAM, Flash, etc.) and will take up space, but 0 wait-state is possible. */
IQmathTables3 : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
[
IQmath.lib (IQmathTablesRam)
]
IQmathTablesRam : LOAD = FLASHGH, PAGE = 1
RUN = RAML1L2L3,PAGE = 1
LOAD_START(_IQmathTablesRamLoadStart),
LOAD_END(_IQmathTablesRamLoadEnd),
RUN_START(_IQmathTablesRamRunStart)
这几个段IQmath、IQmathTables、IQmathTables2、IQmathTables3、IQmathTablesRam有什么区别,分别是用来做什么的?
[ IQmath.lib (IQmathTablesRam) ]是什么功能?
IQmathTablesRamLoadStart、IQmathTablesRamLoadEnd要在main中哪里声明的?