View previous topic :: View next topic |
Author |
Message |
Jeetdesai
Joined: 05 Jul 2018 Posts: 18
|
What can corrupt a Hex file? |
Posted: Tue Mar 10, 2020 4:58 pm |
|
|
When I make a project in the CCSC software, I get the Hex file for the same when I compile the project.
When I email the Hex file as an attachment, the attachment downloads successfully on the receiving user's end but fails to flash in the microcontroller giving an error. Even if the file is re-downloaded, it still throws an error while flashing.
When I email the very same Hex file in a WinZip or WinRar format , the receiving user can successfully flash the same in the microcontroller every single time.
So, my question is, what could corrupt the Hex file in the first process?
The MeLabs downloader is used to download the Hex file. So the CCSC software is not used to flash the Hex file.
Thanks in advance. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Tue Mar 10, 2020 7:57 pm |
|
|
Several things could cause the problem...
Need to know... What is the error ?
What is the file size of the original file and the received file.
What is the difference in the actual code ? Compare the two files byte by byte. What are the differences ?
What antivirus software is running on the remote PC ? Does it attempt to auto correct an infected file ?
Any 'security ' or other scanning software be used ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 10, 2020 11:36 pm |
|
|
I did a test. I emailed myself a small hex file as an attachment. I did not
zip up the attachment. After receiving the email, I saved the attachment
to my desktop. I then used ExamDiff to compare the attachment to the
original (giving the attachment a different name). They are identical.
https://www.prestosoft.com/edp_examdiff.asp
I almost always zip up something like that, because the zip program uses
a CRC to check for corruption. If the file was corrupted during
transmission, when your friend unzips it, the unzip program will report it.
It's far safer to do it that way. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Wed Mar 11, 2020 1:47 am |
|
|
Also separately, .hex is not allowed by many anti-virus programs.
Email programs like OutLook with add ons like Adobe 'send and track', will
also corrupt .hex files.
Some email service providers also will cause problems for .hex files.
Generally anything you want to send that is not basic text, should always
be sent using something like .zip, if you want to be confident that the
file received is correct....
General problem that will appear, without anything actually deliberately
changing things, may well be the handling of line feeds, with most email
clients adding 'line breaks' where they deem fit. If the internal line length
is set less than that used in the hex file....
Some of the more sophisticated scanners will find .hex files even if zipped
on these you have to password protect the zip file. |
|
|
|