本帖最后由 wes58 于 2024-11-30 05:59 编辑
I have decided to start a new thread with this issue.
When I have been testing OTA I was using Zigbee SDK v3.6.8.1. And everything worked fine.
I have deicded to change to SDK v3.7.1 and now OTA fails with the error ZCL_STA_INVALID_IMAGE. But we don't have any feedback about the upgrade!
And, that's why what I mentioned in the previous thread abotu OTA, there should be some messages about the progress/status of device upgrade.
The device has the firmware compiled with SDK v3.7.1
The firmware with the higher file version is compiled with the same SDK and transfered into the Gateway.
But as I mentioned before, zigbee_ota_tool_v2.2.exe doesn't update the header with the correct type or file version, so I had to update the header myself.
See the pictures showing it.
When the firwmare is uploaded from the gateway to the device upgrade fails with error ZCL_STA_INVALID_IMAGE.
I have found out that it fails in ota.c function - ota_imageDataProcess(u8 len, u8 *pData)
value of vairable crcFirmware is 0x0000
I decided to use the device with the same firmware and upgrade it with the firmware compiled with SDK v3.6.8.1. The result was: crcFirmware = 0x025D
I have also noticed that there is no CRC at the end of image file.
After spending a lot of time I have found the reson.
The file tl_check_fw2.exe has been deleted by virus scan.
In regards to the issue with the FILE_VERSION and IMAGE_TYPE I have found the following:
This is what I found in file cstartup_8258.S
in this startup assembly file FILE_VERSION and IMAGE_TYPE are not updated to the values defined in version_cfg.h. After renaming FILE_VERSION and IMAGE_TYPE to a different name in version_cfg.h the project still compiles. This means that cstartup_8258.S doesn't use those defines. So it can't work.
|