|
4 | 4 |
|
5 | 5 | This component is aiming to provide some useful CMake utilities outside of ESP-IDF. |
6 | 6 |
|
7 | | -## Use |
| 7 | +**Supported features:** |
8 | 8 |
|
9 | | -1. Add dependency of this component in your component or project's idf_component.yml. |
| 9 | +- `project_include.cmake`: add additional features like `DIAGNOSTICS_COLOR` to the project. The file will be automatically parsed, for details, please refer [project-include-cmake](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/build-system.html#project-include-cmake>). |
| 10 | +- `package_manager.cmake`: provides functions to manager components' versions, etc. |
| 11 | +- `gcc.cmake`: manager the GCC compiler options like `LTO` through menuconfig. |
| 12 | +- `relinker.cmake` provides a way to move IRAM functions to flash to save RAM space. |
| 13 | +- `gen_compressed_ota.cmake`: add new command `idf.py gen_compressed_ota` to generate `xz` compressed OTA binary. please refer [xz](https://github.com/espressif/esp-iot-solution/tree/master/components/utilities/xz). |
| 14 | +- `gen_single_bin.cmake`: add new command `idf.py gen_single_bin` to generate single combined bin file (combine app, bootloader, partition table, etc). |
10 | 15 |
|
11 | | - ```yml |
12 | | - dependencies: |
13 | | - espressif/cmake_utilities: "0.*" |
14 | | - ``` |
| 16 | +## User Guide |
15 | 17 |
|
16 | | -2. Include the CMake file you need in your component's CMakeLists.txt after `idf_component_register`, or in your project's CMakeLists.txt |
17 | | - |
18 | | - ```cmake |
19 | | - // Note: should remove .cmake postfix when using include(), otherwise the requested file will not found |
20 | | - // Note: should place this line after `idf_component_register` function |
21 | | - // only include the one you needed. |
22 | | - include(package_manager) |
23 | | - ``` |
24 | | - |
25 | | -3. Then you can use the corresponding CMake function which is provided by the CMake file. |
26 | | - |
27 | | -## Supported features |
28 | | - |
29 | | -1. [relinker](https://github.com/espressif/esp-iot-solution/blob/master/tools/cmake_utilities/docs/relinker.md) |
30 | | -2. [gen_compressed_ota](https://github.com/espressif/esp-iot-solution/blob/master/tools/cmake_utilities/docs/gen_compressed_ota.md) |
31 | | -3. [GCC Optimization](https://github.com/espressif/esp-iot-solution/blob/master/tools/cmake_utilities/docs/gcc.md) |
| 18 | +[cmake_utilities user guide](https://docs.espressif.com/projects/esp-iot-solution/zh_CN/latest/basic/cmake_utilities.html) |
0 commit comments