diff --git a/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h index 75c8d194f8f319..3141defe9c5133 100644 --- a/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ b/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h @@ -59,26 +59,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/light-switch-app/silabs/efr32/include/CHIPProjectConfig.h b/examples/light-switch-app/silabs/efr32/include/CHIPProjectConfig.h index 75c8d194f8f319..3141defe9c5133 100644 --- a/examples/light-switch-app/silabs/efr32/include/CHIPProjectConfig.h +++ b/examples/light-switch-app/silabs/efr32/include/CHIPProjectConfig.h @@ -59,26 +59,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h index 751ebfcff265f2..00df921596102a 100644 --- a/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ b/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h @@ -59,26 +59,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/lighting-app/silabs/efr32/include/CHIPProjectConfig.h b/examples/lighting-app/silabs/efr32/include/CHIPProjectConfig.h index 751ebfcff265f2..00df921596102a 100644 --- a/examples/lighting-app/silabs/efr32/include/CHIPProjectConfig.h +++ b/examples/lighting-app/silabs/efr32/include/CHIPProjectConfig.h @@ -59,26 +59,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h index 9ebace80dd06d2..1cfb6e7b0ac82c 100644 --- a/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ b/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h @@ -60,26 +60,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8006 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/lock-app/silabs/efr32/include/CHIPProjectConfig.h b/examples/lock-app/silabs/efr32/include/CHIPProjectConfig.h index 9ebace80dd06d2..1cfb6e7b0ac82c 100644 --- a/examples/lock-app/silabs/efr32/include/CHIPProjectConfig.h +++ b/examples/lock-app/silabs/efr32/include/CHIPProjectConfig.h @@ -60,26 +60,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8006 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/platform/silabs/SiWx917/BaseApplication.cpp b/examples/platform/silabs/SiWx917/BaseApplication.cpp index 2c937c90691b69..b0f3809876ab49 100644 --- a/examples/platform/silabs/SiWx917/BaseApplication.cpp +++ b/examples/platform/silabs/SiWx917/BaseApplication.cpp @@ -201,7 +201,8 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) appError(APP_ERROR_CREATE_TIMER_FAILED); } - SILABS_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + SILABS_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + SILABS_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); #ifdef ENABLE_WSTK_LEDS sStatusLED.Init(APP_STATE_LED); diff --git a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp b/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp index bb19b3e17a6cd9..651d6270574a57 100644 --- a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp +++ b/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp @@ -355,13 +355,13 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersionString(char * buf, size_ size_t hardwareVersionStringLen = 0; // without counting null-terminator CHIP_ERROR err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, buf, bufSize, hardwareVersionStringLen); -#if defined(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING) +#if defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING, sizeof(bufSize)); + memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING, sizeof(bufSize)); err = CHIP_NO_ERROR; } -#endif // CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif // CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING return err; } @@ -371,13 +371,13 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersion(uint16_t & hardwareVers uint32_t hardwareVersion32; err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_HardwareVersion, hardwareVersion32); -#if defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION) +#if defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - hardwareVersion32 = CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION; + hardwareVersion32 = CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION; err = CHIP_NO_ERROR; } -#endif // defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION) +#endif // defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION) hardwareVersion = static_cast(hardwareVersion32); return err; diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp index bcedcf8b2a73d9..4421ca4e313c44 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/efr32/BaseApplication.cpp @@ -207,7 +207,8 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) appError(APP_ERROR_CREATE_TIMER_FAILED); } - SILABS_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + SILABS_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + SILABS_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); #if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) LEDWidget::InitGpio(); diff --git a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp b/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp index 0eec3045d71c25..4a37ada00fa327 100644 --- a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp +++ b/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp @@ -224,13 +224,13 @@ CHIP_ERROR EFR32DeviceDataProvider::GetHardwareVersionString(char * buf, size_t size_t hardwareVersionStringLen = 0; // without counting null-terminator CHIP_ERROR err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, buf, bufSize, hardwareVersionStringLen); -#if defined(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING) +#if defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING, sizeof(bufSize)); + memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING, sizeof(bufSize)); err = CHIP_NO_ERROR; } -#endif // CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif // CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING return err; } @@ -240,13 +240,13 @@ CHIP_ERROR EFR32DeviceDataProvider::GetHardwareVersion(uint16_t & hardwareVersio uint32_t hardwareVersion32; err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_HardwareVersion, hardwareVersion32); -#if defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION) +#if defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - hardwareVersion32 = CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION; + hardwareVersion32 = CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION; err = CHIP_NO_ERROR; } -#endif // defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION) +#endif // defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION) hardwareVersion = static_cast(hardwareVersion32); return err; diff --git a/examples/thermostat/silabs/efr32/include/CHIPProjectConfig.h b/examples/thermostat/silabs/efr32/include/CHIPProjectConfig.h index 8b26f650aa07a6..614361fb34e9f5 100644 --- a/examples/thermostat/silabs/efr32/include/CHIPProjectConfig.h +++ b/examples/thermostat/silabs/efr32/include/CHIPProjectConfig.h @@ -59,26 +59,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x800E -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/window-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/window-app/silabs/SiWx917/include/CHIPProjectConfig.h index dbf46f0e39e6d7..f1a69277f06079 100644 --- a/examples/window-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ b/examples/window-app/silabs/SiWx917/include/CHIPProjectConfig.h @@ -58,26 +58,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8010 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/examples/window-app/silabs/efr32/include/CHIPProjectConfig.h b/examples/window-app/silabs/efr32/include/CHIPProjectConfig.h index dbf46f0e39e6d7..f1a69277f06079 100644 --- a/examples/window-app/silabs/efr32/include/CHIPProjectConfig.h +++ b/examples/window-app/silabs/efr32/include/CHIPProjectConfig.h @@ -58,26 +58,6 @@ */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8010 -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - * - * A uint32_t identifying the software version running on the device. - */ -/* The SoftwareVersion attribute of the Basic cluster. */ -#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001 -#endif - /** * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE * diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index 45c2a9cc7c7e14..3e0977a0c8d95c 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -83,10 +83,6 @@ if [ "$#" == "0" ]; then enable_sleepy_device Enable Sleepy end device. (Default false) Must also set chip_openthread_ftd=false - sl_matter_version_str - Set a Matter sotfware version string for the Silabs examples - Used and formatted by default in this script. - To skip that formatting or use your own version string use --no-version use_rs9116 Build wifi example with extension board rs9116. (Default false) use_SiWx917 @@ -99,6 +95,13 @@ if [ "$#" == "0" ]; then Periodic query timeout variable for OTA in seconds rs91x_wpa3_only Support for WPA3 only mode on RS91x + sl_matter_version + Use provided software version at build time + sl_matter_version_str + Set a Matter sotfware version string for the Silabs examples + Used and formatted by default in this script. + sl_hardware_version + Use provided hardware version at build time siwx917_commissionable_data Build with the commissionable data given in DeviceConfig.h (only for SiWx917) Presets @@ -116,9 +119,6 @@ if [ "$#" == "0" ]; then use the silabs openthread library --use_chip_lwip_lib use the chip lwip library - --no-version - Skip the silabs formating for the Matter software version string - Currently : v1.0-- --release Remove all logs and debugs features (including the LCD). Yield the smallest image size possible --docker @@ -194,10 +194,6 @@ else # optArgs+="openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread\" openthread_efr32_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/src/src\"" # shift # ;; - --no-version) - USE_GIT_SHA_FOR_VERSION=false - shift - ;; --release) optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false " shift @@ -207,6 +203,13 @@ else USE_DOCKER=true shift ;; + + *"sl_matter_version_str="*) + optArgs+="$1 " + USE_GIT_SHA_FOR_VERSION=false + shift + ;; + *) if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then USE_WIFI=true diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index e5a3b721869f07..d95435954d1ad7 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -264,7 +264,7 @@ * A monothonic number identifying the software version running on the device. */ #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0 +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 #endif /** diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index ef11e47d1a2820..45f9c83ace6272 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -40,6 +40,27 @@ #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING SL_MATTER_VERSION_STRING #endif +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A monothonic number identifying the software version running on the device. + */ +#ifdef SL_MATTER_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION SL_MATTER_VERSION +#endif + +/** + * CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#ifdef SL_HARDWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION SL_HARDWARE_VERSION +#endif + #if defined(SL_WIFI) #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 #else diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index 00fde71f0a39ae..dd967ce5bdc775 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -31,11 +31,20 @@ declare_args() { use_thread_coap_lib = false sl_matter_version_str = "" + sl_matter_version = 1 + sl_hardware_version = 1 } config("silabs_config") { + defines = [] if (sl_matter_version_str != "") { - defines = [ "SL_MATTER_VERSION_STRING=\"${sl_matter_version_str}\"" ] + defines += [ "SL_MATTER_VERSION_STRING=\"${sl_matter_version_str}\"" ] + } + if (sl_matter_version != 1) { + defines += [ "SL_MATTER_VERSION=${sl_matter_version}" ] + } + if (sl_hardware_version != 1) { + defines += [ "SL_HARDWARE_VERSION=${sl_hardware_version}" ] } }