|
| 1 | +################################## |
| 2 | +Compile Arduino libs with ESP_LOGx |
| 3 | +################################## |
| 4 | + |
| 5 | +There are 2 primary approaches and both of them involve editing file ``configs/defconfig.common``. |
| 6 | +Edit the file directly and then build. |
| 7 | +Later you can ``git restore configs/defconfig.common`` to go back. |
| 8 | +Copy the file ``cp configs/defconfig.common configs/defconfig.debug`` and edit the debug version. |
| 9 | + |
| 10 | +``vim configs/defconfig.common`` or ``vim configs/defconfig.debug`` |
| 11 | + |
| 12 | +Edit **line 44** containing by default ``CONFIG_LOG_DEFAULT_LEVEL_ERROR=y`` to one of the following lines depending on your desired log level: |
| 13 | + |
| 14 | +.. code-block:: bash |
| 15 | +
|
| 16 | + CONFIG_LOG_DEFAULT_LEVEL_NONE=y # No output |
| 17 | + CONFIG_LOG_DEFAULT_LEVEL_ERROR=y # Errors - default |
| 18 | + CONFIG_LOG_DEFAULT_LEVEL_WARN=y # Warnings |
| 19 | + CONFIG_LOG_DEFAULT_LEVEL_INFO=y # Info |
| 20 | + CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y # Debug |
| 21 | + CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y # Verbose |
| 22 | +
|
| 23 | +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. |
| 24 | + |
| 25 | +.. note:: |
| 26 | + If you have copied the ``defconfig`` file and the debug settings are in file ``configs/defconfig.debug`` add flag ``debug`` to compilation command. |
| 27 | + Example : ``./build.sh debug`` |
| 28 | + |
| 29 | + - **Option 1**: Build for all SoCs: ``./build.sh`` |
| 30 | + - **Option 2**: Build for one SoC: ``./build.sh -t <soc>``. The exact text to choose the SoC: |
| 31 | + |
| 32 | + - ``esp32`` |
| 33 | + - ``esp32s2`` |
| 34 | + - ``esp32c3`` |
| 35 | + - ``esp32s3`` |
| 36 | + - Example: ``./build.sh -t esp32`` |
| 37 | + - A wrong format or non-existing SoC will result in the error sed: can't read sdkconfig: No such file or directory |
| 38 | + - **Option 3**: Build for multiple SoCs (not all) - simply write them down separated with space: ``./build.sh -t <soc1> <soc2> <soc3>`` |
| 39 | + |
| 40 | + - Example: ``./build.sh -t esp32 esp32-c3`` |
| 41 | + |
0 commit comments