SAMD21, AS7, ASF3.44: Complier setting

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Reference to earlier forum two year back

https://community.atmel.com/foru...

 

I have looked into properties but I could not find reference to determine compiler type C90 or C99 or C11. What is gnu99, why it selected not c99, just curious? 

 

It say in this forum, but where it is

 

by default -std=gnu99 is set in compiler settings.  I tried using C99 as well. But no success.   

 

I'm wondering if there is guideline for using long long or uINT64 or INT64 variable under ASF 3.44 without compiler complaints. NB: I cannot use ASF 4 because it failed USB demo code and gave up.

 

This topic has a solution.
Last Edited: Fri. Jan 4, 2019 - 06:59 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The -std=??? option allows you to define which standard the compiler conforms to when generating code.  The default with Atmel projects is -std=gnu99 which includes GNU extensions to the ISO C99 standard.  If you want more portable code, use -std=c99 (lower case 'c').  Other options are -std=c90, -ansi, etc.  Google gcc -std options for details.  When in doubt you can't go wrong with -std=c99.

 

To change the compiler option, in the main menu go to Project->Properties.  On the left go down to Toolchain.  Then select ARM/GNU C Compiler->Miscellaneous.

 

Be sure to select which configuration you are changing as well (Debug or Release).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The warning is requested in the project compiler settings (ARM GNU/C Compiler Miscellaneous) when I look at a ASF project, just remove this.

Or is something else not working?

/Lars

 

Last Edited: Fri. Jan 4, 2019 - 02:42 PM