Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intel Hex to Bin conversion

336 views
Skip to first unread message

Urs Aeschlimann

unread,
Dec 11, 1999, 3:00:00 AM12/11/99
to
Hello,

I am looking for Delphi (D4) source or component which convert Intel-Hex
file in a binary file.

Thank's for any help.

Urs


philippe_ranger

unread,
Dec 11, 1999, 3:00:00 AM12/11/99
to
<<Urs:

I am looking for Delphi (D4) source or component which convert Intel-Hex
file in a binary file.
>>

What do you mean by an Intel-Hex file? (Unless that's the where we file all
the curses we throw at Intel.)

PhR

Rene Tschaggelar

unread,
Dec 12, 1999, 3:00:00 AM12/12/99
to
IntelHex is a way to describe binary files with holes.
It is mainly used to download code into a embedded systems.

There are plenty of converters around, why does it have to
be a component ?

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com

Olivier Dahan

unread,
Dec 12, 1999, 3:00:00 AM12/12/99
to
frankly, I'm like Philippe... I never saw any 'IntelHex' converter nor heard
a word about this "so famous" format... in more than 15 years of
developement. Certainly a personnal knowledge lack, of course, but perhaps
also the reason why you can't find any component doing this nor getting any
good information about this subject...
If you have any description of this special format, please forward it,
perhaps we're knowing the trick under another name..

regards

--
Olivier Dahan
oda...@cybercable.fr
http://perso.cybercable.fr/stargate
Delphi 32b C/S Certified Engineer
Rene Tschaggelar <tscha...@access.ch> a écrit dans le message :
385391EA...@access.ch...
: IntelHex is a way to describe binary files with holes.

Rudy Velthuis

unread,
Dec 12, 1999, 3:00:00 AM12/12/99
to
Olivier Dahan wrote:

>frankly, I'm like Philippe... I never saw any 'IntelHex' converter nor heard
>a word about this "so famous" format... in more than 15 years of
>developement. Certainly a personnal knowledge lack, of course, but perhaps
>also the reason why you can't find any component doing this nor getting any
>good information about this subject...
>If you have any description of this special format, please forward it,
>perhaps we're knowing the trick under another name..

I found this on a few locations in the web (only a quick AltaVista search
for "+intel +hex" - AltaVista then gave me a quick link to "Intel Hex file
format"):

-----
This page describes the format of an Intel hex file produced by a suitable
assembler. This code is often downloaded from a PC to a development system
and run from RAM. Alternatively, the hex file can be converted to a binary
file and programmed into an EPROM.

Here is an example hex file:

:10008000AF5F67F0602703E0322CFA92007780C361
:1000900089001C6B7EA7CA9200FE10D2AA00477D81
:0B00A00080FA92006F3600C3A00076CB
:00000001FF
Now look at the top line...


The first character (:) indicates the start of a record.
The next two characters indicate the record length (10h in this case).
The next four characters give the load address (0080h in this case).
The next two characters indicate the record type (see below).
Then we have the actual data.
The last two characters are a checksum (sum of all bytes + checksum = 00).
The last line of the file is special, and will always look like that above.
Record types:

00 - Data record
01 - End of file record
02 - Extended segment address record
03 - Start segment address record
04 - Extended linear address record
05 - Start linear address record


--
Rudy Velthuis

Urs Aeschlimann

unread,
Dec 12, 1999, 3:00:00 AM12/12/99
to
Hi,

thanks for all your comments.
I have to write a download software for an embedded system, to program the
flash memory.
Some parts of the firmware are delivered in Intel-Hex file format.
It's true that there are a lot of converters around the net. Most of them
are DOS-programs and
I have problems to run these in the background of my application.
I used CreateProcess() to run a converter hidden in the background, but when
the
converter finished his job, the DOS task will not be terminated by the
system automatically.
So my program waits and waits and..........
Only with a PIF file it works fine. But about this solution, I don't have a
good feeling.
It's like patchwork, you know ?
Therefore I decided to write my own converter embedded in my program.

Thanks for your help.

Urs Aeschlimann


Rudy Velthuis <rvel...@gmx.net> schrieb in im Newsbeitrag:
ktd75so1fr8n80kok...@4ax.com...

marcc

unread,
Dec 13, 1999, 3:00:00 AM12/13/99
to
i'm not sure now, Urs ... what do you need at this point? do you just want
some source code to avoid writing a routine yourself? this task is pretty
clear-cut, so i'm having a hard time understanding where the problem lies.
my personal experience is with S<n>9 records (Motorola's version of the same
thing) but it's not a big deal, really.

if that's not what you're after, then please describe what you need to do.

what is the source of the code (a file?, the back-end of an assembler?) are
you sending it directly to the EE (bulk programming en masse), or to a host
which will perform the device programming onboard? if not to a chip, then
how smart is the target? depending on resources available on the target,
you might want to think in terms of doing the loading logic onboard ... let
the device handle where to store the code: you simply send the hex source as
a stream of bytes. if you're doing the programming for the target, you're
probably more familiar with the chip's onboard interrupt, SCI, etc. and
could more easily implement the loader logic there. most embedded systems
with an EE provide routines for upgrading the firmware, so you should be
able to leverage that code.

-marc

Urs Aeschlimann <10162...@compuserve.com> wrote in message
news:83147t$ik...@forums.borland.com...

Some parts of the firmware are delivered in Intel-Hex file format.
It's true that there are a lot of converters around the net. Most of them
are DOS-programs and
I have problems to run these in the background of my application.
I used CreateProcess() to run a converter hidden in the background, but when
the
converter finished his job, the DOS task will not be terminated by the
system automatically.

Urs Aeschlimann

0 new messages