CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

What can corrupt a Hex file?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jeetdesai



Joined: 05 Jul 2018
Posts: 18

View user's profile Send private message

What can corrupt a Hex file?
PostPosted: Tue Mar 10, 2020 4:58 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 10, 2020 7:57 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 10, 2020 11:36 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 11, 2020 1:47 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group