CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Hex file don't works after rebuilding

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
diogoc



Joined: 12 Feb 2008
Posts: 19

View user's profile Send private message Visit poster's website MSN Messenger

Hex file don't works after rebuilding
PostPosted: Mon Mar 24, 2014 5:18 am     Reply with quote

I'm using CCS V5.021 with a multiple compilation project. The pic is a PIC18F26K22.
When I build for the first time the project it works fine, but if I rebuild the project the pic has an erratic functioning, even if I make no changes in the code. I compared both of the .lst files and the second one is a little larger.
So when I change something in my code I have to close the CCS ide and delete ALL created files during the compilation. In the versions 4.xxx it did not happen.

It is a bug of the V5 compiler?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 24, 2014 10:13 am     Reply with quote

Try to do it without Multiple Compilation Units. Does it still fail in the
same way ?
diogoc



Joined: 12 Feb 2008
Posts: 19

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Tue Mar 25, 2014 12:33 pm     Reply with quote

It is strange, it seems that after rebuilding the circuit is more sensible to noise because the firmware hangs when there are connected long wires.

But I still donĀ“t understand why the hex file is different when I rebuild the firmware.
I tried with single compilation unit and the files are still different.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 25, 2014 1:48 pm     Reply with quote

Regarding your noise problem, see this thread about floating pins:
http://www.ccsinfo.com/forum/viewtopic.php?t=45371
This is a 2-page thread.


Quote:
I tried with single compilation unit and the files are still different.

So this means you disabled "Multiple Compilation Units" and you added
.c and .h modules to your main C file with #include statements, then you
compiled the main C file.

And then, even after doing that, every time you compile the project, you
still get a different Hex file size every time ? And you're not using MCU's
at all.
diogoc



Joined: 12 Feb 2008
Posts: 19

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Wed Mar 26, 2014 3:33 am     Reply with quote

PCM programmer wrote:
So this means you disabled "Multiple Compilation Units" and you added
.c and .h modules to your main C file with #include statements, then you
compiled the main C file.

And then, even after doing that, every time you compile the project, you
still get a different Hex file size every time ? And you're not using MCU's
at all.


Yes I disabled "Multiple Compilation Units", copy all functions to the main.c file and remove the other files.
When I compile the second time, the hex file is a few bytes larger. The rebuild button should rebuild the whole project again but I don't get the initial size.
diogoc



Joined: 12 Feb 2008
Posts: 19

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Wed Mar 26, 2014 3:55 am     Reply with quote

I have compared the .lst files and the differences are in the beginning of the main function, in the "DATA xx, xx" instruction:

Code:

.................... void main(void) {
*
03C60:  CLRF   FF8
03C62:  BCF    FF1.2
03C64:  BSF    F9F.1
03C66:  BCF    FF0.6
03C68:  BCF    F9F.5
03C6A:  BSF    FD0.7
03C6C:  BSF    07.7
03C6E:  MOVLW  70
03C70:  MOVWF  FD3
03C72:  BSF    F9B.6
03C74:  BCF    F9B.7
03C76:  CLRF   28
03C78:  BSF    FB8.3
03C7A:  MOVLW  40
03C7C:  MOVWF  FAF
03C7E:  MOVLW  03
03C80:  MOVWF  FB0
03C82:  MOVLW  A6
03C84:  MOVWF  FAC
03C86:  MOVLW  90
03C88:  MOVWF  FAB
03C8A:  MOVLW  01
03C8C:  MOVWF  59
03C8E:  CLRF   5A
03C90:  CLRF   5C
03C92:  CLRF   5B
03C94:  CLRF   5D
03C96:  CLRF   5E
03C98:  CLRF   x60
03C9A:  CLRF   5F
03C9C:  MOVLW  03
03C9E:  MOVWF  x62
03CA0:  SETF   x61
03CA2:  CLRF   x64
03CA4:  CLRF   x63
03CA6:  CLRF   x65
03CA8:  CLRF   x66
03CAA:  CLRF   x67
03CAC:  CLRF   x68
03CAE:  CLRF   x6A
03CB0:  CLRF   x69
03CB2:  CLRF   x6B
03CB4:  MOVLW  01
03CB6:  MOVWF  x6C
03CB8:  CLRF   x70
03CBA:  CLRF   x6F
03CBC:  CLRF   x6E
03CBE:  CLRF   x6D
03CC0:  CLRF   x74
03CC2:  CLRF   x73
03CC4:  CLRF   x72
03CC6:  CLRF   x71
03CC8:  CLRF   x76
03CCA:  CLRF   x75
03CCC:  CLRF   x78
03CCE:  CLRF   x77
03CD0:  MOVLW  14
03CD2:  MOVWF  x79
03CD4:  CLRF   x9A
03CD6:  CLRF   x9B
03CD8:  MOVLW  01
03CDA:  MOVWF  x9C
03CDC:  CLRF   xA5
03CDE:  CLRF   xA7
03CE0:  CLRF   xA6
03CE2:  CLRF   xA8
03CE4:  BRA    3E48

03CE6:  DATA 08,40
03CE8:  DATA 31,00
03CEA:  DATA 08,40
03CEC:  DATA 35,00
03CEE:  DATA 08,40
03CF0:  DATA 39,00
03CF2:  DATA 08,40
03CF4:  DATA 3D,00
...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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