UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Advisor ronnywebers
Advisor
683 Views
Registered: ‎10-10-2014

Which version of C (C99, C11, C18) does Xilinx SDK support and where can I check/set this?

Q1: Which version of the C standard (C99, C11, C18) is supported by SDK (I'm using 2018.2 at the moment), and where can I find this info? 

Q2: If I create a new project in SDK (File -> New Application project), which version of the C standard is set by default?

Q3: Can I configure a project to be compiled with C99, C11, ... and where can I do this in SDK?

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
1 Reply
Contributor
Contributor
638 Views
Registered: ‎08-21-2012

Re: Which version of C (C99, C11, C18) does Xilinx SDK support and where can I check/set this?

The SDK uses the GNU toolchain (gcc, ld, etc.).  For 2018.3, it's gcc version 7.3.1. I don't have 2018.2 installed to check, but it's likely a slightly older version of gcc.

Version 7.3.1 of gcc supports c99 and c11 but not c18. I beleive the default is c11 but it doesn't seem to be explicity stated.

Documentation for each version of gcc can be found on the GNU website.

You can check the gcc version by running it on the command line with the -v option.

For example, on my Win10 machine, I'd run C:\Xilinx\SDK\2018.3\gnu\aarch64\nt\aarch64-linux\bin\aarch64-linux-gnu-gcc -v

Note that the SDK includes gcc compilers for the A53, R5 and Microblaze. These are in different subdirectories under the SDK installation.

The C standard can be changed per project by specifying, for example, --std=c99 in the Project Properities/C++ Build/Settings/Miscellaneous/Other flags pane.

This also applies to other flags you wish to pass to the compiler that are not implemented as check boxes in the SDK GUI.