Importing Arduino Project into Atmel Studio 7 Suppresses all warnings

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

People, watch out!. If you import an Arduino sketch into AS7, it builds fine and I really enjoy having the debugger able to step through, but the compilation options are a poor choice.


Both Release and Debug configurations are set the same, apart from Release defines NDEBUG.


The "C" compiler "Optimization" settings include -fno-threadsafe-statics, which are for C++ only.

The optimazation flags are set to -Os (for size), -Og is more appropriate for Debug builds

The debugging flags are set to -g2, -g3 would be better.


But worse of all the warning are set to -w which is inhibit all! I know this is what Arduino programmers are used to but the idea of using AS is to get better control over building. Surely these should be -Wall -Wextra at the leastr? And probably a few extra ones thrown in.


I got caught out comparing a unsigned if it was >= 0, which it always is.