View previous topic :: View next topic |
Author |
Message |
Jyrki
Joined: 28 Mar 2014 Posts: 5
|
Output CCS compiler version via printf? |
Posted: Mon May 05, 2014 8:08 am |
|
|
Hi all,
is there a way to read the current CCS compiler version in my code? So that I can print it out via e.g. fprintf (to UART for the user's information).
Something like
Quote: | uint8 ucVersionMajor, ucVersionMinor;
GetCompilerVersion(&ucVersionMajor, &ucVersionMinor);
fprintf(COM2, "Version=%d, %d", ucVersionMajor, ucVersionMinor); |
Thanks
Jyrki |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Mon May 05, 2014 8:33 am |
|
|
Hi,
Yes. Look at the 'GetEnv()' function. This function can return the compiler version as a float.
Code: |
value = getenv (version);
|
John
Last edited by ezflyr on Mon May 05, 2014 8:35 am; edited 2 times in total |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon May 05, 2014 8:34 am |
|
|
it always helps to read the manual first |
|
|
Jyrki
Joined: 28 Mar 2014 Posts: 5
|
|
Posted: Tue May 06, 2014 1:17 am |
|
|
Thanks for the fast help.
PS: I searched the online help for keywords like "version" "compiler" etc., but didn't find anything. Maybe CCS can improve the search index. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19497
|
|
Posted: Tue May 06, 2014 1:27 am |
|
|
This is where the pdf manual helps. Much better for searching....
Though it tends to be a slightly older version, it really is useful to have this on your system, and when you want to find something, without knowing what the 'headword' needed is, a search in this, will often find it.
Best Wishes |
|
|
|