Enable exceptions in the Arduino environment

前端 未结 1 721
借酒劲吻你
借酒劲吻你 2021-01-14 13:30

According to an answer to a question about whether the arduino environment supports exceptions, it is theoretically possible to run \"exceptional\" binaries on an Arduino bo

相关标签:
1条回答
  • 2021-01-14 13:40

    The Arduino IDE passes -fno-exceptions to the compiler it uses (avr-gcc). It does this because the compiler's documentation specifies that it is required (see http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_cplusplus).

    Since this parameter is required (rightly or wrongly) for correct functioning of the compiler the Arduino IDE does not provide a way to change this.

    Nevertheless, if you want to try removing this parameter to see what effect it has you'll need to edit the Arduino source code (currently line 589 in https://github.com/arduino/Arduino/blob/master/app/src/processing/app/debug/Compiler.java) and rebuild the IDE yourself.

    0 讨论(0)
提交回复
热议问题