Hi,
I have two problems as below in CCS .map format, anybody help me checked it? thanks
First:
How I do to display the length of user’s variables in .map file? As below:
Customer need to format:
*********************************************************************************************
OBJECT LIST SORTED BY ADDRESS
Name Addr hSize dSize Ref Section RLIB
---------------------------------------------------------------------------------------------
_PORTAB 0 2 2 14 .abs_section_0
_DDRAB 2 2 2 2 .abs_section_2
_PORTE 8 1 1 11 .abs_section_8
_DDRE 9 1 1 2 .abs_section_9
_MODE B 1 1 1 .abs_section_b
_PUCR C 1 1 1 .abs_section_c
_RDRIV D 1 1 1 .abs_section_d
_GPAGE 10 1 1 0 .abs_section_10
_DIRECT 11 1 1 0 .abs_section_11
_MMCCTL1 13 1 1 0 .abs_section_13
_PPAGE 15 1 1 1 .abs_section_15
_RPAGE 16 1 1 0 .abs_section_16
_EPAGE 17 1 1 0 .abs_section_17
_PARTID 1A 2 2 0 .abs_section_1a
Our CCS format have not each variable length information:
*********************************************************************************************
GLOBAL SYMBOLS: SORTED BY Symbol Address
address name
-------- ----
00000000 _ti_ascii
00000001 __TI_args_main
00000050 __stack
00000200 __SYSMEM_SIZE
00000300 __STACK_SIZE
00000350 __STACK_END
00000400 __sys_memory
00000600 __CIOBUF_
00000e3d __ctypes_
00000f3e _PIE_tableDebugInit
000010a0 _pucTempString
000010b5 _escRed
Reasons:
This information is used for communication between PC and product when customer is debugging the parameters of product, the debugging work will be very bother if don’t have this information. Because customer will copy .map content to PC to change the value of the current parameter is sent directly to its address without complex protocols.
Second:
How to set up to make the .C file continuous variables defined in flash is stored contiguously? Example:
I was defined the variables as below:
Source:
/*****************************************************************************/
① Uint16 cnt;
② Uint16 Status;
③ Uint16 *Flash_ptr; // Pointer to a location in flash
④ Uint32 Length; // Number of 16-bit values to be programmed
⑤ float32 Version; // Version of the API in floating point
⑥ Uint32 Flash_32Bitdata[5]; // Version of the API in decimal encoded hex
⑦ Uint32 *Flash_32Bitdata_ptr; // Pointer to a location in flash
/*---------------------------------------------------------------------------
Sector address info
---------------------------------------------------------------------------*/
⑧ typedef struct {
Uint16 *StartAddr;
Uint16 *EndAddr;
} SECTOR;
⑨SECTOR Sector[4] = {
(Uint16 *)0x3F7000,(Uint16 *)0x3F7FFF,
(Uint16 *)0x3F6000,(Uint16 *)0x3F6FFF,
(Uint16 *)0x3F5000,(Uint16 *)0x3F5FFF,
(Uint16 *)0x3F4000,(Uint16 *)0x3F4FFF,
};
// -------------------------------- FRAMEWORK --------------------------------------
// State Machine function prototypes
//----------------------------------------------------------------------------------
//
//
// ---------------------------------- USER -----------------------------------------
// ---------------------------- ---------------------------------
//system initial use
⑩ unsigned long Duty_Range = 0;
⑪ unsigned long Duty_Value = 0;
⑫ unsigned int Duty_H = 0;
⑬ unsigned int Duty_L = 0;
⑭ unsigned long Timer2_value;
/*****************************************************************************/
Currently .map address about them as below
/*****************************************************************************/
⑬ 00008bc0 _Duty_L
① 00008bc1 _cnt
② 00008bc2 _Status
⑫ 00008bc3 _Duty_H
00008bc4 _testA
⑭ 00008bc6 _Timer2_value
00008bc8 _MEP_ScaleFactor
③ 00008bca _Flash_ptr
⑤ 00008bcc _Version
00008bce _Duty_Range
00008bd0 _Flash_32Bitdata_ptr
⑪ 00008bd2 _Duty_Value
④ 00008bd4 _Length
00008bd6 _FlashStatus
00008bda _ePWM
⑦ 00008bde _Flash_32Bitdata
⑨ 00008be8 _Sector
00008bf8 __cleanup_ptr
00008bfa __dtors_ptr
00008bfc _PieVectTableInit
003d7fff _PartIdRegs
003f7ff8 _CsmPwl
003ff8d2 _Flash2802x_Program
003ff98e _Flash2802x_Erase
/*****************************************************************************/
Customer needed as below:
/*****************************************************************************/
① 00008bc1 _cnt
② 00008bc2 _Status
③ 00008bca _Flash_ptr
④ 00008bd4 _Length
⑤ 00008bcc _Version
Etc..
/*****************************************************************************/
Thanks…..