Skip to content

Commit

Permalink
Update section about using exceptions with ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros authored and aofaof0907 committed Jul 27, 2021
1 parent 328f23e commit 6e0f8c1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions platforms/espressif8266_extra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,18 +365,16 @@ Please use one of the next :ref:`projectconf_build_flags`:
Exceptions
~~~~~~~~~~

Exceptions are disabled by default. To enable exceptions, use the following :ref:`projectconf_build_flags` and :ref:`projectconf_build_unflags`:
Exceptions are disabled by default. To enable exceptions, use the ``PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS`` macro in :ref:`projectconf_build_flags`.
That macro will add the ``-fexceptions`` flag and will link the final firmware against the ``stdc++-exc`` library with enabled exceptions. For example:

.. code-block:: ini
[env:myenv]
...
; Remove default exceptions disabled flag
build_unflags = -fno-exceptions
; Enable exceptions
build_flags = -fexceptions
build_flags = -D PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
.. _platform_espressif_uploadfs:
Expand Down

0 comments on commit 6e0f8c1

Please sign in to comment.