arduino-esp32/docs/en/guides/core_debug.rst
Lucas Saavedra Vaz da5c6ab9ae
Refactor repository with pre-commit hooks (#9515)
* Add Config

* Add Cache and remove pre-commit action

* [pre-commit.ci lite] apply automatic fixes

* Remove freeze

* Fix

* Update action

* Use latest stable Python 3 version

* Improve caching

* Improve cache tag

* Improve bot message

* fix(typos): Fix typos

* fix(typos): Fix more typos

* refactor(udp_server): Convert script from Python 2 to 3

* Fix whitespace

* Clang-format fixes

* Prettier fixes

* Black formatting

* Manual fixes

* Line endings

* Fix flake and make Vale manual

* Fix flake and reformat

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-04-15 19:40:56 +03:00

37 lines
1.7 KiB
ReStructuredText

##################################
Compile Arduino libs with ESP_LOGx
##################################
There are 2 primary approaches and both of them involve editing file ``configs/defconfig.common``.
Edit the file directly and then build.
Later you can ``git restore configs/defconfig.common`` to go back.
Copy the file ``cp configs/defconfig.common configs/defconfig.debug`` and edit the debug version.
``vim configs/defconfig.common`` or ``vim configs/defconfig.debug``
Edit **line 44** containing by default ``CONFIG_LOG_DEFAULT_LEVEL_ERROR=y`` to one of the following lines depending on your desired log level:
.. code-block:: bash
CONFIG_LOG_DEFAULT_LEVEL_NONE=y # No output
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y # Errors - default
CONFIG_LOG_DEFAULT_LEVEL_WARN=y # Warnings
CONFIG_LOG_DEFAULT_LEVEL_INFO=y # Info
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y # Debug
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y # Verbose
Then simply build the libs for all SoCs or one specific SoC. Note that building for all SoCs takes a lot of time, so if you are working only with specific SoC(s), build only for those.
.. note::
If you have copied the ``defconfig`` file and the debug settings are in file ``configs/defconfig.debug`` add flag ``debug`` to compilation command.
Example : ``./build.sh debug``
- **Option 1**: Build for all SoCs: ``./build.sh``
- **Option 2**: Build for one SoC: ``./build.sh -t <soc>``. The exact text to choose the SoC:
- ``esp32``
- ``esp32s2``
- ``esp32c3``
- ``esp32s3``
- Example: ``./build.sh -t esp32``
- A wrong format or non-existing SoC will result in the error sed: can't read sdkconfig: No such file or directory