Make the max length of the software version field configurable.

This is to accommodate some version strings which
were getting truncated as well as an additional release track
information for some device categories for an initial factory check.
diff --git a/build/config/android/WeaveProjectConfig.h b/build/config/android/WeaveProjectConfig.h
index 9d300dc..5318eb0 100644
--- a/build/config/android/WeaveProjectConfig.h
+++ b/build/config/android/WeaveProjectConfig.h
@@ -56,4 +56,5 @@
 
 #define WEAVE_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1
 
+#define WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH 128
 #endif /* WEAVEPROJECTCONFIG_H */
diff --git a/build/config/ios/WeaveProjectConfig.h b/build/config/ios/WeaveProjectConfig.h
index da82402..a2ec644 100644
--- a/build/config/ios/WeaveProjectConfig.h
+++ b/build/config/ios/WeaveProjectConfig.h
@@ -58,4 +58,6 @@
 
 #define WEAVE_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1
 
+#define WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH 128
+
 #endif /* WEAVEPROJECTCONFIG_H */
diff --git a/build/config/standalone/WeaveProjectConfig.h b/build/config/standalone/WeaveProjectConfig.h
index 0ef800a..0673748 100644
--- a/build/config/standalone/WeaveProjectConfig.h
+++ b/build/config/standalone/WeaveProjectConfig.h
@@ -74,4 +74,6 @@
 
 #define WEAVE_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1
 
+#define WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH 128
+
 #endif /* WEAVEPROJECTCONFIG_H */
diff --git a/src/lib/core/WeaveConfig.h b/src/lib/core/WeaveConfig.h
index 52540bc..270bc51 100644
--- a/src/lib/core/WeaveConfig.h
+++ b/src/lib/core/WeaveConfig.h
@@ -2344,6 +2344,18 @@
 #endif // WEAVE_CONFIG_DEVICE_MGR_DEMAND_ENABLE_UDP
 
 /**
+ *  @def WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH
+ *
+ *  @brief
+ *    Maximum length of the software version field
+ *    in DeviceDescription.
+ *
+ */
+#ifndef WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH
+#define WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH           32
+#endif // WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH
+
+/**
  * @def WEAVE_NON_PRODUCTION_MARKER
  *
  * @brief Defines the name of a mark symbol whose presence signals that the Weave code
diff --git a/src/lib/profiles/device-description/DeviceDescription.h b/src/lib/profiles/device-description/DeviceDescription.h
index a3dc911..efa6ac7 100644
--- a/src/lib/profiles/device-description/DeviceDescription.h
+++ b/src/lib/profiles/device-description/DeviceDescription.h
@@ -125,7 +125,7 @@
         kMaxSerialNumberLength                  = 32,  /**< Maximum serial number length. */
         kMaxPairingCodeLength                   = 16,  /**< Maximum pairing code length. */
         kMaxRendezvousWiFiESSID                 = 32,  /**< Maximum WiFi ESSID for Rendezvous length. */
-        kMaxSoftwareVersionLength               = 32   /**< Maximum software version length. */
+        kMaxSoftwareVersionLength               = WEAVE_CONFIG_MAX_SOFTWARE_VERSION_LENGTH   /**< Maximum software version length. */
     };
 
     /**