1
NXPTM M522XX, KINETIS and i.MX RT / Re: SW upload file length wrong
« on: March 09, 2009, 04:07:57 PM »
Hi Mark.
I put breakpoint into fnPostFrame(..) fuction and see into ucIp_Data the next data: Host: 192.168.10.13..Content-Length:231133.
Before this part
#ifdef SUPPORT_POST_BINARY
if (!(uMemcmp((unsigned char *)cContentType1, ucIp_Data, (sizeof(cContentType1) - 1)))) {
ucIp_Data += (sizeof(cContentType1) - 1);
usPortLen -= (sizeof(cContentType1) - 1);
http_session->FileLength -= ((sizeof(cContentType1) - 1) + 2);
http_session->FileLength -= http_session->ucBoundaryLength;
http_session->ucState = HTTP_STATE_POSTING_DATA;
break;
}
#endif
http_session->FileLength = 231077 and after this part http_session->FileLength = 231001.
In windows I check file length by mouse right button click and it is: 230,884 bytes. Into uFileCloseMime(..) file length = 231001.
When Bootloader startup in fnCheckNewCode(..)
MAX_FILE_LENGTH file_length = uGetFileLength(UPLOAD_FILE_LOCATION); receive written before file lingth (231001) and
fnGetPars(UPLOAD_FILE_LOCATION + FILE_HEADER, (unsigned char*)file_header, SIZE_OF_UPLOAD_HEADER); receive true length of file (written into file header).
My project after short time shall be finished but this bug don't give possibility do this.
I need your help!
Thanks. Have a good day.
Evgeni.
I put breakpoint into fnPostFrame(..) fuction and see into ucIp_Data the next data: Host: 192.168.10.13..Content-Length:231133.
Before this part
#ifdef SUPPORT_POST_BINARY
if (!(uMemcmp((unsigned char *)cContentType1, ucIp_Data, (sizeof(cContentType1) - 1)))) {
ucIp_Data += (sizeof(cContentType1) - 1);
usPortLen -= (sizeof(cContentType1) - 1);
http_session->FileLength -= ((sizeof(cContentType1) - 1) + 2);
http_session->FileLength -= http_session->ucBoundaryLength;
http_session->ucState = HTTP_STATE_POSTING_DATA;
break;
}
#endif
http_session->FileLength = 231077 and after this part http_session->FileLength = 231001.
In windows I check file length by mouse right button click and it is: 230,884 bytes. Into uFileCloseMime(..) file length = 231001.
When Bootloader startup in fnCheckNewCode(..)
MAX_FILE_LENGTH file_length = uGetFileLength(UPLOAD_FILE_LOCATION); receive written before file lingth (231001) and
fnGetPars(UPLOAD_FILE_LOCATION + FILE_HEADER, (unsigned char*)file_header, SIZE_OF_UPLOAD_HEADER); receive true length of file (written into file header).
My project after short time shall be finished but this bug don't give possibility do this.
I need your help!
Thanks. Have a good day.
Evgeni.