1. Using the ``freemodbus`` component included in the current release of ESP-IDF.
The ESP-IDF component ``freemodbus`` included in this release reflects the ``esp-modbus`` component of version v1.0.7. This release of the component is used by default in the existing examples mentioned below on this page.
The downside of this option is that the ``freemodbus`` component may not contain the latest fixes from esp-modbus repository. Because of this, it is recommended to use the original ``esp-modbus`` component for new projects (the option 2).
In order to use ``esp-modbus`` component, your application must include the statement below in its ``CMakeLists.txt`` file to exclude the ``freemodbus`` component from the build. The excluding of the ``freemodbus`` component is required to avoid compilation issues when ``esp-modbus`` is used in conjunction with the component manager.
This option allows to use the latest ``esp-modbus`` component updates in any projects based on ESP-IDF versions from v4.1 up to v5.0.
Refer to :doc:`component manager documentation <../../api-guides/tools/idf-component-manager>` for more information on how to set up the component manager. The ``esp-modbus`` component can be found in `component manager registry <https://components.espressif.com/component/espressif/esp-modbus>`__.