Searching \ for '[PIC] Inserting comment in .HEX file' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Inserting comment in .HEX file'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Inserting comment in .HEX file'
2011\11\29@202550 by Forrest Christian

flavicon
face
I'm porting some code from CCS C to the Microchip C18 compiler.   The CCS compiler allows you to insert comments in the output .hex file using #pragma directives in your source code.  This is really nice since I can set parameters used by downstream tools (such as serialization locations, etc) right in the code where it is set...  prevents a lot of issues.

So far, I can't see anything even roughly equivalent in the MPLAB tools, and/or C18.   I'm willing to forego the ability to insert this into the code directly, but really do want to be able to add comments to the output .hex file if at all possible.

Am I missing some option somewhere?  Even if it is something in the project file?

-forres

2011\11\29@233756 by Harold Hallikainen

face
flavicon
face

> I'm porting some code from CCS C to the Microchip C18 compiler.   The
> CCS compiler allows you to insert comments in the output .hex file using
> #pragma directives in your source code.  This is really nice since I can
> set parameters used by downstream tools (such as serialization
> locations, etc) right in the code where it is set...  prevents a lot of
> issues.
>
> So far, I can't see anything even roughly equivalent in the MPLAB tools,
> and/or C18.   I'm willing to forego the ability to insert this into the
> code directly, but really do want to be able to add comments to the
> output .hex file if at all possible.
>
> Am I missing some option somewhere?  Even if it is something in the
> project file?
>
> -forrest
>

Interesting concept. Do most hex file readers (including bootloaders) just
ignore a line that doesn't start with colon? I typically have a state
machine that does not advance until I see the start of line colon in Intel
hex.

Harold

-- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!
Not sent from an iPhone

2011\11\30@000758 by Forrest Christian

flavicon
face
Yep,

CCS generally puts at least the processor in the file at the end with a line like:

;PIC18F26K20

It also allows you to add additional lines...  they all appear at the end, after the EOF mark...


On 11/29/2011 9:37 PM, Harold Hallikainen wrote:
> Interesting concept. Do most hex file readers (including bootloaders)
> just ignore a line that doesn't start with colon? I typically have a
> state machine that does not advance until I see the start of line
> colon in Intel hex. Harold


'[PIC] Inserting comment in .HEX file'
2011\12\02@185228 by Joe Wronski
flavicon
face
Actually, ccs help file says the directive can place comments at the top or bottom of the file.
#HEXCOMMENT text comment for the top of the hex file
#HEXCOMMENT\ text comment for the end of the hex file
The second directive has a backslash in it.

Back to the original issue, how would this be used?  Serializing was mentioned; could it be that a tool reads the address of the serial number address from the comment, generates a number and inserts it at that address?
Curious because I created a software tool to serialize parts, but the address of the serial number was known to the tool, and did not need to be embedded in the hex.
Joe W



On 11/30/2011 12:07 AM, Forrest Christian wrote:
{Quote hidden}

>> colon in Intel hex. Harold

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...