Is there any __VERSION__ predefine for xTIMEcomposer that will yield something like "14.2.4"?
__VERSION__ yields "4.2.1 Compatible Clang 3.6.0" on xTIMEcomposer 14.2.4
Any xTIMEcomposer __VERSION__ like macro?
-
- Respected Member
- Posts: 510
- Joined: Wed Apr 25, 2012 8:52 pm
Any xTIMEcomposer __VERSION__ like macro?
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
Engineer at XMOS
-
- Respected Member
- Posts: 510
- Joined: Wed Apr 25, 2012 8:52 pm
Thanks, but no! "14.3.1" from __XTIMECOMPOSER__ is on my wish list!
Code: Select all
void test(void)
{
const char version_str [] = __VERSION__;
unsigned xc_val = __XC__;
unsigned xcc_version_major_val = XCC_VERSION_MAJOR;
// unsigned xtimecomposer_str [] = __XTIMECOMPOSER__;
printf("__VERSION__=\"%s\", __XC__=%u, XCC_VERSION_MAJOR=%u\n", version_str, xc_val, xcc_version_major_val);
printf("__VERSION__=\"%s\", __XC__=%u, XCC_VERSION_MAJOR=%u,\n%s\n", __VERSION__, __XC__, XCC_VERSION_MAJOR,
"but xTIMEcomposer is \"Version: Community_14.2.4 (build 15898, Dec-20-2016)\"");
// PRINTS:
/*
__VERSION__="4.2.1 Compatible Clang 3.6.0 ", __XC__=1, XCC_VERSION_MAJOR=1402
__VERSION__="4.2.1 Compatible Clang 3.6.0 ", __XC__=1, XCC_VERSION_MAJOR=1402,
but xTIMEcomposer is "Version: Community_14.2.4 (build 15898, Dec-20-2016)"
*/
}
int main() {
par {
test();
}
return 0;
}
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
-
- Active Member
- Posts: 62
- Joined: Mon Jun 10, 2013 2:14 pm
As a workaround you can generate a header file containing the version using a Makefile. See the attached example.
Code: Select all
$ xmake
$ xsim bin/main.xe
Community_14.2.4 (build 15898, Dec-20-2016)
You do not have the required permissions to view the files attached to this post.