diff --git a/DeviceStorage.c b/DeviceStorage.c index 23b350d..65102e5 100644 --- a/DeviceStorage.c +++ b/DeviceStorage.c @@ -10,6 +10,7 @@ #include "SystemDelayInterface.h" #include "HVAC_preDefine.h" #include "StorageOnFlash.h" +#include "FirmwareMetadataSection.h" #define LOGGER env->logger #define LOG_SIGN "Storage" @@ -26,6 +27,15 @@ bool DeviceStorage_LoadParam(tDeviceStorage *env) { bool isLoad = VarsTabDumpObserverParam_Load(&env->dumpObserver); + tFirmwareMetaMap *firmwareMetaMap_Boot = (tFirmwareMetaMap *) ADR_META_BOOT; + tFirmwareMetaMap *firmwareMetaMap_Main = (tFirmwareMetaMap *) ADR_META_MAIN; + + memcpy(&env->dataParam->device.identification.Internal_SW_Version, &firmwareMetaMap_Main->internal_SW_Version, + sizeof(tInternal_SW_Version)); + + memcpy(&env->dataParam->device.identification.Boot_SW_Fingerprint, &firmwareMetaMap_Boot->fingerprint, sizeof(tFingerprintDev)); + memcpy(&env->dataParam->device.identification.Application_SW_Fingerprint, &firmwareMetaMap_Main->fingerprint, sizeof(tFingerprintDev)); + if (isLoad) { if (env->dataParam->version_param == DEVICE_DATA_VERSION_PARAM) { LoggerInfoStatic(LOGGER, LOG_SIGN, "Parameters loaded successfully");