Radu
Radu

Reputation: 123

How can i disable in Atmel Studio the compiler optimization?

I have a problem when i'm using static functions because after rebuild/build the compiler does not generate the object code of this functions ( i see that because assembler code of this functions is not generated in .lss file ). How can i disable compiler optimization to avoid this issue.

Upvotes: 0

Views: 5032

Answers (2)

milambergt
milambergt

Reputation: 41

Apparently the link above is broken/no longer pointing to the document. To help others (and my future self): Disable Optimization in Atmel Studio / Microchip Studio:

  1. Open the properties for the current project (Alt-F7) or Project > (PrjName) Properties enter image description here
  2. Select the Toolchain menu from the left side:Toolchain Menu
  3. AVR/GNU C Compiler > Optimization
  4. For Optimization Level, set to None (-O0)enter image description here

Upvotes: 2

user10083258
user10083258

Reputation: 16

Please see the following link.

https://www.microchip.com/webdoc/GUID-ECD8A826-B1DA-44FC-BE0B-5A53418A47BD/index.html?GUID-9241847D-2474-41F8-86D0-BD8BCD80BC8E

Under the Toolchain settings of the current project you can select the optimization via a simple drop-down list.

Upvotes: 0

Related Questions