esp-idf/tools/cmake/project_description.json.in
Frantisek Hrbata 03162bb276 tools: extend information in project_description.json
This extends information provided in the project_description.json file.
Newly added information can be used in the SBOM generating tool and
also to improve hints regarding the the component dependency issues.

Added fields

version:
   This adds versioning to the project_description.json file,
   so it's easy to identify if it contains the required information.

project_version:
   Can be used as a version for the resulting binary e.g. `hello_world.bin`.

idf_path:
   This one is probably not necessary, but it allows tools to run even without
   esp-idf environment exported(e.g. export.sh).

c_compiler:
   The `CMAKE_C_COMPILER` value with full path to the compiler binary. This can
   be used to get information about toolchain, which was used to build the project.

common_component_reqs:
   List of common components as presented in cmake's __COMPONENT_REQUIRES_COMMON
   and set in tools/cmake/build.cmake:__build_init().

build_component_info:
   Detailed information about components used during build. It's a
   dictionary with the component name as a key and each component has
   a dictionary with detailed information. Following is an example for
   the efuse component.

   "efuse": {
       "alias": "idf::efuse",
       "target": "___idf_efuse",
       "prefix": "idf",
       "dir": "/home/fhrbata/work/esp-idf/components/efuse",
       "type": "LIBRARY",
       "lib": "__idf_efuse",
       "reqs": [],
       "priv_reqs": [ "bootloader_support", "soc", "spi_flash" ],
       "managed_reqs": [],
       "managed_priv_reqs": [],
       "file": "/home/fhrbata/work/blink/build/esp-idf/efuse/libefuse.a",
       "sources": [ "/home/fhrbata/work/esp-idf/components/efuse/esp32s3/esp_efuse_table.c", ... ],
       "include_dirs": [ "include", "esp32s3/include" ]
   }

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:29:53 +02:00

33 lines
1.5 KiB
JSON

{
"version": "1",
"project_name": "${PROJECT_NAME}",
"project_version": "${PROJECT_VER}",
"project_path": "${PROJECT_PATH}",
"idf_path": "${IDF_PATH}",
"build_dir": "${BUILD_DIR}",
"config_file": "${SDKCONFIG}",
"config_defaults": "${SDKCONFIG_DEFAULTS}",
"bootloader_elf": "${BOOTLOADER_ELF_FILE}",
"app_elf": "${PROJECT_EXECUTABLE}",
"app_bin": "${PROJECT_BIN}",
"build_type": "${PROJECT_BUILD_TYPE}",
"git_revision": "${IDF_VER}",
"target": "${CONFIG_IDF_TARGET}",
"rev": "${CONFIG_ESP32_REV_MIN}",
"min_rev": "${CONFIG_ESP_REV_MIN_FULL}",
"max_rev": "${CONFIG_ESP_REV_MAX_FULL}",
"phy_data_partition": "${CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION}",
"monitor_baud" : "${CONFIG_ESPTOOLPY_MONITOR_BAUD}",
"monitor_toolprefix": "${_CMAKE_TOOLCHAIN_PREFIX}",
"c_compiler": "${CMAKE_C_COMPILER}",
"config_environment" : {
"COMPONENT_KCONFIGS" : "${COMPONENT_KCONFIGS}",
"COMPONENT_KCONFIGS_PROJBUILD" : "${COMPONENT_KCONFIGS_PROJBUILD}"
},
"common_component_reqs": ${common_component_reqs_json},
"build_components" : ${build_components_json},
"build_component_paths" : ${build_component_paths_json},
"build_component_info" : ${build_component_info_json},
"debug_prefix_map_gdbinit": "${debug_prefix_map_gdbinit}"
}