AnsweredAssumed Answered

Why data can not be alloced in specified flash area? - MC9S12XEQ512

Question asked by Michael Tang on Dec 16, 2008
Latest reply on Dec 16, 2008 by CompilerGuru
Hi All,
 
The MCU is MC9S12XEQ512.
 
In PRM file,  a flash area CONFIG_AREA defined and user segment USER_CONFIG_SECTION is placed into the segment.
 
SEGMENTS
...
CONFIG_AREA = READ_ONLY   0xFE8000 TO 0xFE83FF;  /* Configuration Area: 1024 bytes*/
...
END
 
PLACEMENT
...
USER_CONFIG_SECTION INTO CONFIG_AREA;
...
END
 
 
 
Added p/n to subject.
In source code
 
#pragma CONST_SEG __GPAGE_SEG USER_CONFIG_SECTION
 
const T_uConfigHeader CFG_Header = {
    (T_u16)0x00u,      
    (T_u16)123u,  
    (T_u32)0x01020304u, 
    (T_u16)0x00u
};

const FileID_STRUCT CFG_BeginFileID = {
    (T_u8) BNG_FILEID_BYTE0_VALID, 
    (T_u8) BNG_FILEID_BYTE1_VALID, 
    (T_u8) BNG_FILEID_BYTE2_VALID, 
    (T_u8) BNG_FILEID_BYTE3_VALID, 
    (T_u8) BNG_FILEID_BYTE4_VALID, 
}; 

const T_uCFGRecord CFG_Records[CFM_GCC_MAXNOOFRECORDS] = {
    {
        (T_u8)0x11u, (T_u8)0x00u, (T_u16)0x0014u,(T_u8)0x00u, (T_u8)0x10u, (T_u8)0x00u, (T_u8)0x03u, (T_u8)0x00u, (T_u8)0x00u
    },
    {
        (T_u8)0x20u, (T_u8)0x00u, (T_u16)0xC000u,(T_u8)0x10u, (T_u8)0x1Fu, (T_u8)0x11u, (T_u8)0x12u, (T_u8)0x13u, (T_u8)0x14u
    },   
    {
        (T_u8)0x20u, (T_u8)0x00u, (T_u16)0xC001u,(T_u8)0x12u, (T_u8)0x2Fu, (T_u8)0x21u, (T_u8)0x22u, (T_u8)0x23u, (T_u8)0x24u
    }
}
...
 
But when I complied the code and checked map file, only CFG_Header and CFG_Records put in USER_CONFIG_SECTION, and CFG_BeginFileID is lost! 
 
SECTION: "USER_CONFIG_SECTION"
  CFG_Header CFG_Records
 
usr_cfg.obj:
  CFG_BeginFileID
 
 
Could you please tell me why CFG_BeginFileID can not alloced in USER_CONFIG_SECTION?
 
Thanks!


Message Edited by NLFSJ on 2008-12-16 09:49 PM

Outcomes