How select "Language standard"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How select "Language standard"

2,847 Views
ptcaos
Contributor III

Hello,

if I create a new SDK project (from the SDK project wizard), after selecting board and other configuration (device packages, project type, components...), I get "Advanced project settings" screen where I can select the MCU C Compiler. By default, "Language standard" points to "Compiler default", but I can choose if I want "GNU C90 (-std=gnu90).

However, if I create a new C project (not SDK), I can't see this screen and I can't choose "Language standard".

How can I change that?

Thanks.

2 Replies

1,308 Views
emilysanders
Contributor I

Great breakdown on choosing the right language standard—your explanation really clears up a lot of confusion I’ve seen around this topic. While experimenting with different settings, I stumbled on some Elvish translation tips that made testing character sets a bit more fun. It’s interesting how adjusting standards can change the behavior of compilers in subtle ways. Looking forward to more posts like this!

0 Kudos
Reply

2,769 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi ptcaos,

If you right click in your project click in properties->C/C++ Build->Settings->MCU C Compiler->Dialect you can select the language:

pastedImage_1.png

Best Regards,
Alexis Andalon

%3CLINGO-SUB%20id%3D%22lingo-sub-930105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20select%20%22Language%20standard%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-930105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Eif%20I%20create%20a%20new%20SDK%20project%20(from%20the%20SDK%20project%20wizard)%2C%20after%20selecting%20board%20and%20other%20configuration%20(device%20packages%2C%20project%20type%2C%20components...)%2C%20I%20get%20%22Advanced%20project%20settings%22%20screen%20where%20I%20can%20select%20the%20MCU%20C%20Compiler.%20By%20default%2C%20%22Language%20standard%22%20points%20to%20%22Compiler%20default%22%2C%20but%20I%20can%20choose%20if%20I%20want%20%22GNU%20C90%20(-std%3Dgnu90).%3C%2FP%3E%3CP%3EHowever%2C%20if%20I%20create%20a%20new%20C%20project%20(not%20SDK)%2C%20I%20can't%20see%20this%20screen%20and%20I%20can't%20choose%20%22Language%20standard%22.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHow%20can%20I%20change%20that%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2260229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20select%20%22Language%20standard%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGreat%20breakdown%20on%20choosing%20the%20right%20language%20standard%E2%80%94your%20explanation%20really%20clears%20up%20a%20lot%20of%20confusion%20I%E2%80%99ve%20seen%20around%20this%20topic.%20While%20experimenting%20with%20different%20settings%2C%20I%20stumbled%20on%20some%20%3CA%20href%3D%22https%3A%2F%2Felvishtranslator.vercel.app%2Felvish-to-english-translator%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EElvish%20translation%20tips%3C%2FA%3E%20that%20made%20testing%20character%20sets%20a%20bit%20more%20fun.%20It%E2%80%99s%20interesting%20how%20adjusting%20standards%20can%20change%20the%20behavior%20of%20compilers%20in%20subtle%20ways.%20Looking%20forward%20to%20more%20posts%20like%20this!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-930106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20select%20%22Language%20standard%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-930106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20class%3D%22jx-jive-macro-user%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2Fptcaos%22%20target%3D%22_blank%22%3Eptcaos%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIf%20you%20right%20click%20in%20your%20project%20click%20in%20properties-%26gt%3BC%2FC%2B%2B%20Build-%26gt%3BSettings-%26gt%3BMCU%20C%20Compiler-%26gt%3BDialect%20you%20can%20select%20the%20language%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%20style%3D%22width%3A%20771px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F92822i5A4639CF2920BA90%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_1.png%22%20alt%3D%22pastedImage_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBest%20Regards%2C%3CBR%20%2F%3EAlexis%20Andalon%3C%2FP%3E%3C%2FLINGO-BODY%3E