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

ccs c compiler (PCH) with MPLAB X and Linux - issue

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



Joined: 04 Mar 2016
Posts: 32
Location: Netherlands

View user's profile Send private message

ccs c compiler (PCH) with MPLAB X and Linux - issue
PostPosted: Tue Apr 19, 2016 9:37 am     Reply with quote

Hi,

I use PCH Compiler Version 5.057 (PCH) with MPLAB X 3.26 and Linux Mint 17.3.
When I compile (Clean and Build project button) the same source again and again, I get different sizes hex files:
-rw-r--r-- 1 jack jack 186446 Apr 19 16:05 001_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 187866 Apr 19 16:07 002_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 186610 Apr 19 16:09 003_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 187570 Apr 19 16:10 004_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 186418 Apr 19 16:11 005_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 186618 Apr 19 16:11 006_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 186386 Apr 19 16:12 007_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 186414 Apr 19 16:13 008_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 187570 Apr 19 16:13 009_03_PIC18F67K90.X.production.hex
-rw-r--r-- 1 jack jack 186498 Apr 19 16:14 010_03_PIC18F67K90.X.production.hex
(Attempt 4 and 9 are equal)

I started to discover this after the download to the board and noticing odd behavior, not the result of wrong code.
Only a rebuild could change the behavior, even if the source was not changed. There are no errors are reported during compilation.
I tried this on two different Linux laptops, on both I'm suffering with the same issue.
Has anybody seen this before?
Why are the output files different, when the same source is recompiled?

Regards,
Jack.


Last edited by JackB on Tue Apr 19, 2016 10:07 am; edited 3 times in total
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

Re: ccs c compiler (PCH) with MPLAB X and Linux
PostPosted: Tue Apr 19, 2016 9:49 am     Reply with quote

JackB wrote:

Why are the output files different, when the same source is recompiled?


In general, these days, you cannot rely on the same source always compiling to the same output.

Things that can affect this are stuff like:

Time and dates stamps - these will be different in every compilation. My code is always date stamped, its also build numbered, and it's a little different every time.

Random elements - this is no so true of firmware, but is very much more true for FPGAs as a random seed is generally used as a starting point for fitting. Essentially every FPGA build is different, and often considerably so.

Also, different compilers and even build environments can produce code and hex file differences.

Now, I don't know about this being an issue on Linux, but I don't expect every build, on Windows, of my code at least, to be precisely the same, in fact I require them to bbe different and uniquely identifiable.
JackB



Joined: 04 Mar 2016
Posts: 32
Location: Netherlands

View user's profile Send private message

PostPosted: Tue Apr 19, 2016 10:04 am     Reply with quote

As you see the size are too much different, which is not the result of different time stamps.
Also, I started to discover this after the download to the board and noticing odd behavior.
The behavior could not be changed by reprogramming, only by rebuilding first.
I guess in about 90-95% of the attempts the output is wrong.

I have added this important note to the original post now. Thanks!
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