Merge branch 'cli/project_ver' into 'main'

examples/all_device_types_app: Added support to set the project_ver through command line.

See merge request app-frameworks/esp-matter!807
This commit is contained in:
Hrishikesh Dhayagude
2024-07-16 14:48:08 +08:00
2 changed files with 18 additions and 3 deletions
+12 -3
View File
@@ -24,8 +24,17 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
endif()
endif(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
set(PROJECT_VER "1.0")
set(PROJECT_VER_NUMBER 1)
if(NOT DEFINED CLI_PROJECT_VER)
set(PROJECT_VER "1.0")
else()
set(PROJECT_VER "${CLI_PROJECT_VER}")
endif()
if(NOT DEFINED CLI_PROJECT_VER_NUMBER)
set(PROJECT_VER 1)
else()
set(PROJECT_VER_NUMBER "${CLI_PROJECT_VER_NUMBER}")
endif()
set(ESP_MATTER_PATH $ENV{ESP_MATTER_PATH})
set(MATTER_SDK_PATH ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip)
@@ -52,4 +61,4 @@ idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
# For RISCV chips, project_include.cmake sets -Wno-format, but does not clear various
# flags that depend on -Wformat
idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security;-Wformat=0" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security;-Wformat=0" APPEND)
+6
View File
@@ -14,6 +14,12 @@ No additional setup is required.
## 2. Usage
- To build the app with a specific PROJECT_VER and PROJECT_VER_NUMBER for OTA firmware, use the following command from the command line:
For e.g.:
`idf.py -DCLI_PROJECT_VER="10.0" -DCLI_PROJECT_VER_NUMBER=10 build`
On boot-up esp-idf console starts. In order to create a device user have to use console command.
- Use `create --device_type` to list all supported device types.