Hi,
Could anybody tell me as How to map values of hex file (at particular address) to firmware(code). Like if i have these lines in my hex file (intel standard)
:100C74001239FAEE75F005A42583F5837871E6251B :100C840082F582E43583F583E493FF7401A81F0899
then how may i know that 1) To which segment(Data, Code etc) these above lines belong? 2) Which part of the firmware(code) they belong? I mean are they refering to some specific firmware code (specific firmware lines of code) or refering to some data from code/data segment? 3) If these lines belongs to any funtion in the firmware code then how can I find it?
Specifically, I want to know exactly that the address 0C74 (in first line) correspond to which segment? Which function? Which part of the code?
Here is the map file information correspondind to hex file of above lines
LINK MAP OF MODULE: multisensorDT (PCOEFFS) TYPE BASE LENGTH RELOCATION SEGMENT NAME ----------------------------------------------------- * * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" REG 0008H 0008H ABSOLUTE "REG BANK 1" REG 0010H 0008H ABSOLUTE "REG BANK 2" REG 0018H 0008H ABSOLUTE "REG BANK 3" BIT 0020H.0 0000H.2 UNIT ?BI?UPLINK BIT 0020H.2 0000H.1 UNIT ?BI?DT_MAIN BIT 0020H.3 0000H.1 UNIT ?BI?SAPPHIRE 0020H.4 0000H.4 *** GAP *** DATA 0021H 003EH UNIT _DATA_GROUP_ DATA 005FH 0007H UNIT ?DT?UPLINK DATA 0066H 0003H UNIT ?DT?RLDEMOD DATA 0069H 0002H UNIT ?DT?DT_MAIN DATA 006BH 0002H UNIT ?DT?SAPPHIRE IDATA 006DH 001FH UNIT ?ID?UPLINK IDATA 008CH 0014H UNIT ?ID?PRESSURE IDATA 00A0H 000FH UNIT _IDATA_GROUP_ IDATA 00AFH 0004H UNIT ?ID?RLDEMOD IDATA 00B3H 0002H UNIT ?ID?DT_MAIN IDATA 00B5H 0001H UNIT ?STACK * * * * * * * X D A T A M E M O R Y * * * * * * * XDATA 0000H 0373H UNIT ?XD?DT_MAIN XDATA 0373H 0033H UNIT ?XD?UPLINK XDATA 03A6H 002CH UNIT ?XD?PRESSURE XDATA 03D2H 0012H UNIT ?XD?RLDEMOD XDATA 03E4H 000CH UNIT ?XD?SAPPHIRE XDATA 03F0H 000CH UNIT _XDATA_GROUP_ XDATA 03FCH 0001H UNIT ?XD?PCOEFFS * * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE CODE 0003H 0016H UNIT ?PR?REMOTELINKINIT?RLDEMOD CODE 0019H 0008H UNIT ?PR?_LABS?LABS CODE 0021H 0001H UNIT ?PR?ANALOGUE_INIT?ANALOGUE 0022H 0001H *** GAP *** CODE 0023H 0003H ABSOLUTE CODE 0026H 0003H UNIT ?CO?SAPPHIRE 0029H 0002H *** GAP *** CODE 002BH 0003H ABSOLUTE BL51 BANKED LINKER/LOCATER V6.22 03/28/2011 12:42:50 PAGE 3 002EH 0005H *** GAP *** CODE 0033H 0003H ABSOLUTE 0036H 0005H *** GAP *** CODE 003BH 0003H ABSOLUTE CODE 003EH 1C06H UNIT ?PR?UPLINK_T2_ISR?UPLINK CODE 1C44H 0E0BH UNIT ?PR?REMOTELINKPROC?RLDEMOD CODE 2A4FH 0934H UNIT ?PR?_CALCINTERPOLATEDPRESSURE?PRESSURE CODE 3383H 07FDH UNIT ?C?LIB_CODE CODE 3B80H 069BH UNIT ?PR?PRESSUREPROC?PRESSURE CODE 421BH 05FFH UNIT ?PR?_GETSECONDARY?UPLINK CODE 481AH 05DCH UNIT ?PR?VIBRATIONPROC?VIBRATION CODE 4DF6H 0450H UNIT ?CO?VIBRATION CODE 5246H 031BH UNIT ?CO?UPLINK CODE 5561H 0313H UNIT ?PR?SAPPHIREPROC?SAPPHIRE CODE 5874H 0296H UNIT ?PR?ANALOGUEPROC?ANALOGUE CODE 5B0AH 0280H UNIT ?CO?FFT CODE 5D8AH 0256H UNIT ?PR?MAIN?DT_MAIN CODE 5FE0H 0231H UNIT ?PR?_FIX_FFT?FFT CODE 6211H 0220H UNIT ?PR?VIBRATIONADCISR?VIBRATION CODE 6431H 0191H UNIT ?PR?SERIALISR?DT_MAIN CODE 65C2H 0186H UNIT ?PR?PRESSURESUMISR?PRESSURE CODE 6748H 017BH UNIT ?CO?DT_MAIN CODE 68C3H 013AH UNIT ?PR?REMOTELINKADCISR?RLDEMOD CODE 69FDH 012DH UNIT ?PR?ANALOGUEADCISR?ANALOGUE CODE 6B2AH 0122H UNIT ?PR?PRESSUREADCISR?PRESSURE CODE 6C4CH 00B0H UNIT ?C_INITSEG CODE 6CFCH 00AAH UNIT ?PR?SQRT?SQRT CODE 6DA6H 0091H UNIT ?PR?VIBRATION_INIT?VIBRATION CODE 6E37H 0090H UNIT ?PR?SAPPHIREISR?SAPPHIRE CODE 6EC7H 008CH UNIT ?C_C51STARTUP CODE 6F53H 0084H UNIT ?PR?UPLINK_INIT?UPLINK CODE 6FD7H 0011H UNIT ?PR?SAPPHIRE_INIT?SAPPHIRE 6FE8H 0018H *** GAP *** CODE 7000H 0975H UNIT ?CO?PCOEFFS CODE 7975H 007CH UNIT ?PR?AUXISR?DT_MAIN CODE 79F1H 005AH UNIT FIX_MPY CODE 7A4BH 0050H UNIT ?PR?_SAPPHIRESEND?SAPPHIRE CODE 7A9BH 0044H UNIT ?CO?ANALOGUE CODE 7ADFH 0044H UNIT ?C?LDIV CODE 7B23H 003EH UNIT ?PR?ANALOGUESUMISR?ANALOGUE CODE 7B61H 003AH UNIT ?PR?PRESSURE_INIT?PRESSURE CODE 7B9BH 003AH UNIT ADC_SUB CODE 7BD5H 0039H UNIT ?PR?UPLINK_MS_ISR?UPLINK CODE 7C0EH 0036H UNIT ?PR?_ADDCRCNIBBLE?UPLINK 7C44H 043AH *** GAP *** CODE 807EH 0002H ABSOLUTE
Please suggest me.
Regards Asad
I'm not a C51 guy, but it sounds like you hope to extract debug related information from the .hex file. Alas, that is not possible.
What, exactly, are you trying to achieve here?
"Specifically, I want to know exactly that the address 0C74 (in first line) correspond to which segment? Which function? Which part of the code?"
The section of the Map file that you showed lists segment locations.
To find specific functions, look at the Public Symbols section: http://www.keil.com/support/man/docs/bl51/bl51_ln_mapfile.htm
For further details about the Map file, see: http://www.keil.com/support/docs/1676.htm
For more information on the OMF51 object file format (which contains the debug information), see, for example: http://www.keil.com/download/docs/80.asp www.8052.com/.../36745
Actually, I get my problem solved! What I was trying to see the contents corresponding to these hex lines. And now I can see it by clicking the "Start/Stop Debug Session" from the 'Debug' tab in Keil compiler.
Rgds Asad