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

IDE command line compiler options

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



Joined: 10 Mar 2006
Posts: 2
Location: Romania

View user's profile Send private message

IDE command line compiler options
PostPosted: Fri Mar 10, 2006 2:18 am     Reply with quote

Can anyone tell me how can I find out what are the IDE Command Line compiler options for a specific project?
I'm asking that because I get one hex using the CCS IDE and another hex from a MPLAB project. The source files are the same.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Mar 10, 2006 8:08 am     Reply with quote

Quote:

Can anyone tell me how can I find out what are the IDE Command Line compiler options for a specific project?

I'm not sure exactly what are you asking for, but you will get full info for Command
Line Compiler in the CCS C Reference Manual that you can download from CCS site.
http://www.ccsinfo.com/download.shtml#CompilerManual

If what you want is to get the compiler options from an already done project,
the answer is you can't.


Humberto
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Fri Mar 10, 2006 9:18 am     Reply with quote

I don't use this setup, but I think you get different HEX because MPLAB is using the MPASM assembler, and CCS uses its own assembler.

???
Can anyone confim this??
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Fri Mar 10, 2006 9:39 am     Reply with quote

It is normal to get different HEX files from the same source code when you use different compilers. As well, CCS has many different optimization levels (chosen via #OPT ) that will make the HEX file different between different compiles within CCS if you are changing the #OPT value.
_________________
The difference between genius and stupidity is that genius has its limits...
luke_robson



Joined: 10 Mar 2006
Posts: 2
Location: Romania

View user's profile Send private message

PostPosted: Wed Mar 15, 2006 12:08 am     Reply with quote

I am sorry because I wasn't clear enough.
I didn't use different compilers. I used CCS compiler with the CCS IDE interface and I got one HEX file, and I used CCS compiler and the MPLAB interface (with the CCS plugin installed) and I got another HEX file even though I used exactly the same source files.

The differences between the two HEX files is due to the different compiler options of the CCS IDE interface on the one hand and the MPLAB default CCS plugin options on the other hand.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 15, 2006 12:22 am     Reply with quote

I don't know where to find the options that are in use by the CCS IDE
because I don't own it. But to find the ones for MPLAB, go to the
Project menu and click on Build Options. For the PCM compiler
with a 16F877, these are the settings:
Quote:
+DF +LS +T -A +M -Z +Y=9 +EA -EW


You could change the MPLAB settings a little bit, re-compile, and then
do a file compare with the HEX file from the CCS IDE. You would
probably quickly find out what option is causing the differences.
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