|
|
View previous topic :: View next topic |
Author |
Message |
Guest1 Guest
|
Disassembly lising |
Posted: Wed Nov 15, 2006 4:47 am |
|
|
I am using MPLAB 7.50.00.00 with version 4.0.0.206 of the pch compiler.
The problem I get is that the code in the listing file is not in location order.
The problem this causes is that when a breakpoint is place in the 'c' file the 'c' code line does not allways line up with the actual code line in the disassembly file and so the break is placed elswhere in code
eg
Code: | //***********************************************
COLDstart:
//***********************************************
disable_interrupts(GLOBAL); // 4 disable the interrupts.
//
// Minor intialisation
minor_init(); // 4+
// Turns on Line reversal (if CLI) and RX interrupts
sleep_port_state();
|
The disassembly listing is as follows:
Code: | 105: //***********************************************
106: COLDstart:
107: //***********************************************
108: disable_interrupts(GLOBAL); // 4 disable the interrupts.
2A42 9CF2 BCF 0xff2, 0x6, ACCESS
2A44 9EF2 BCF 0xff2, 0x7, ACCESS
2A46 BEF2 BTFSC 0xff2, 0x7, ACCESS
2A48 D7FD BRA 0x2a44
109: //
26CA 062D DECF 0x2d, F, ACCESS
110: // Minor intialisation
26CC 522D MOVF 0x2d, F, ACCESS
26CE E102 BNZ 0x26d4
26D0 D002 BRA 0x26d6
111: minor_init(); // 4+
26D2 D001 BRA 0x26d6
26D4 D7D4 BRA 0x267e
2A4A EFA5 GOTO 0xb4a
112: // Turns on Line reversal (if CLI) and RX interrupts
113:
114: sleep_port_state();
2A4E ECB5 CALL 0xb6a, 0
|
When I put a break at minor_init(); in the source code the break appears at the line after minor_init(); at
Code: |
26D2 D001 BRA 0x26d6
|
in the disassembly listing but the actual call to minor_init(); is two lines lower at
Code: |
2A4A EFA5 GOTO 0xb4a
|
so when I run the program is never breaks at the correct time.
This is the first time I've used CCS with MPLAB and it may be something simple causing it but it's causing a nightmare to debug.
Does anyone know the soluiton to this.
Regards |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
micro_joe
Joined: 20 Dec 2004 Posts: 10 Location: Berks. UK
|
|
Posted: Thu Nov 16, 2006 3:03 am |
|
|
Hi,
I have been using the disassembly listing but it's 70,000 lines long. (it's a port from an ST6 assembler application)
The real problem is that the listing is not in code location order ie it seems to have odd bits of code mixed in. If I could fix this then there would not be any problems.
Regards
micro_joe (formerly posted as Guest1) |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|