From add3abb4c1ae54d6a799fc372248637863dff837 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Fri, 22 Nov 2024 16:52:30 +0100 Subject: [PATCH] Firmware code initialized to zero (was uninitialized) --- src/vscp/common/vscp-bootdevice-pic1.cpp | 2 +- src/vscp/common/vscp-bootdevice-vscp.cpp | 2 +- src/vscp/common/vscp-bootdevice.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vscp/common/vscp-bootdevice-pic1.cpp b/src/vscp/common/vscp-bootdevice-pic1.cpp index 76c0f5731..442d0875c 100644 --- a/src/vscp/common/vscp-bootdevice-pic1.cpp +++ b/src/vscp/common/vscp-bootdevice-pic1.cpp @@ -342,7 +342,7 @@ CBootDevice_PIC1::deviceInit(cguid& ourguid, uint16_t devicecode, bool bAbortOnF Must be the same as the firmware we try to load is intended for */ if (m_firmwaredeviceCode != m_stdRegs.getFirmwareDeviceCode()) { - spdlog::warn("Firware device code is not equal the one on the device local: {0} device: {1}", + spdlog::warn("Firmware device code is not equal the one on the device local: {0} device: {1}", m_firmwaredeviceCode, m_stdRegs.getFirmwareDeviceCode()); if (nullptr != m_statusCallback) { diff --git a/src/vscp/common/vscp-bootdevice-vscp.cpp b/src/vscp/common/vscp-bootdevice-vscp.cpp index 0be19c99f..bfff78168 100644 --- a/src/vscp/common/vscp-bootdevice-vscp.cpp +++ b/src/vscp/common/vscp-bootdevice-vscp.cpp @@ -239,7 +239,7 @@ CBootDevice_VSCP::deviceInit(cguid &ourguid, uint16_t devicecode, bool bAbortOnF Must be the same as the firmware we try to load is intended for */ if (m_firmwaredeviceCode != m_stdRegs.getFirmwareDeviceCode()) { - spdlog::warn("Firmware device code is not equal the one on the device local: {0} device: {1}", + spdlog::warn("Firmware device code is not equal! Firmware: {0} Device: {1}", m_firmwaredeviceCode, m_stdRegs.getFirmwareDeviceCode()); if (nullptr != m_statusCallback) { diff --git a/src/vscp/common/vscp-bootdevice.cpp b/src/vscp/common/vscp-bootdevice.cpp index a6af0b58a..9a4283b83 100644 --- a/src/vscp/common/vscp-bootdevice.cpp +++ b/src/vscp/common/vscp-bootdevice.cpp @@ -107,6 +107,7 @@ CBootDevice::CBootDevice(CVscpClient *pclient, m_timeout = timeout; m_statusCallback = statusCallback; m_startAddr = 0; // Boot start + m_firmwaredeviceCode = 0; } CBootDevice::CBootDevice(CVscpClient *pclient,