Hello everybody,
I work with the XC2388C-200F MCU from Infineon and the uVision4. In the target options I have chosen the "HLarge"-Memory model and for the near memory I switched to "48"KB RAM and "16"KB ROM. Furthermore I activated "Use On-chip XRAM (0x8000-0xDFFF) (0xE00000-0xE1BFFF)".
When I build my project, I get several warnings (all of the same type):
. . . *** WARNING L5: SECTION LOCATED OUTSIDE CLASS AREA SECTION: ?ND?ADC0_VINIT?ADC0 CLASS: NDATA . . .
The map file shows that some functions use a lot of the NDATA-space, although I used only HUGE data in that function.
Can I prevent such a memory allocation?
Kind regards
map file (excerpt):
. . . CPU TYPE: C167 or derivative CPU MODE: SEGMENTED MEMORY MODEL: HLARGE WITH FLOATING POINT ARITHMETIC DPP REGISTERS RE-ASSIGNED ------------------------- DPP VALUE C166 GROUP ======================== 0 0380H NDATA 1 0381H NDATA 2 0304H NCONST C166 GROUP START STOP ============================== NCONST C10000H C13FFFH NDATA E00000H E07FFFH . . . START STOP LENGTH TYPE RTYP ALIGN TGR GRP COMB CLASS SECTION NAME ===================================================================================== 008000H 009CA7H 001CA8H HDATA REL WORD --- --- PUBL HDATA0 ?HD0?GLOBALS 009CA8H 00A4A7H 000800H HDATA REL WORD --- --- PUBL HDATA0 ?HD0?LOOKUPHAMMING . . C17CAAH C17CB9H 000010H HDATA REL WORD --- --- PUBL HCONST ?HC?SCS E00000H E0270FH 002710H DATA REL WORD --- 1 PUBL NDATA ?ND?ENVELOPE2?ENVELOPE2 E02710H E04653H 001F44H DATA REL WORD --- 1 PUBL NDATA ?ND?FDVK_JP?FDVK_JP E04654H E06593H 001F40H DATA REL WORD --- 1 PUBL NDATA ?ND?INTERP1?INTERP1 E06594H E06D99H 000806H DATA REL WORD --- 1 PUBL NDATA ?ND?HMV_RMV?HMV_RMV E06D9AH E0759DH 000804H DATA REL WORD --- 1 PUBL NDATA ?ND?TSK_HMV?TASK_HMV E0759EH E07D6DH 0007D0H DATA REL WORD --- 1 PUBL NDATA ?ND?CALCULATE_FDVK_JP?TASK_FDVK_JP E07D6EH E07F6DH 000200H DATA REL WORD --- 1 PUBL NDATA ?C_USERSTACK E07F6EH E07F91H 000024H DATA REL WORD --- 1 PUBL NDATA ?ND?TSK_FDVK_JP?TASK_FDVK_JP E07F92H E07FB1H 000020H DATA REL WORD --- 1 PUBL NDATA ?C_USERSTACK1 . . .
Even if you have selected the "HLarge"-Memory model, all global and local static variables up to a size of 6 bytes will be located in NDATA/NDATA0 by default. Please check the uVision option 'Options for Target - Data Threshold' or compiler 'HOLD' directive: http://www.keil.com/support/man/docs/uv4/uv4_dg_target166.htm http://www.keil.com/support/man/docs/c166/c166_hold.htm With these options you can avoid that NDATA/NDATA0 sections are created for these variables. The user stack (local auto variables and parameters) always has to reside in NDATA.