Add compile data to hex file


+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Add compile data to hex file1079 days old

  1. #1
    Prolific Poster rcurl's Avatar
    Join Date
    Mar 2002
    Posts
    1,883
    Thumbs Up
    Received: 32
    Given: 58
    Total Downloaded
    2.38 GB

    1 Not allowed!

    Default Add compile data to hex file

    One of the other compilers we use adds some useful information to the end of each hex file:
    Code:
    ; REMOTE UPDATER/LOGGER
    ; FW VERSION: 6.33.1
    ; CCS C COMPILER PCH: "5.062"
    ; BUILD TIME: "22-Jun-17" . "09:20:02"
    ; HW_REVISION =  0x05
    ; LANGUAGE = English
    ;PIC18F8722
    ;CRC=E8AA  CREATED="22-Jun-17 09:20"
    I think it would be handy if PDS could do something like this. If not a function of the compiler, I wonder if it could be implemented as a plugin?

    Your thoughts?

    Thanks!

    -Rick

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,354
    Thumbs Up
    Received: 83
    Given: 183
    Total Downloaded
    5.30 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    That would be great. I can't write a plugin but Hexmate will let you manipulate .HEX files.
    George.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Senior Member GAMBOA's Avatar
    Join Date
    Nov 2004
    Posts
    451
    Thumbs Up
    Received: 22
    Given: 0
    Total Downloaded
    203.73 MB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Hi Rick,

    In the ASM file you can see:

    ;----------------------------------------------------------
    ; Code Produced by the Proton Compiler. Ver 3.5.6.7
    ; Copyright Rosetta Technologies/Crownhill Associates Ltd
    ; Written by Les Johnson. May 2014
    ;----------------------------------------------------------

    Regards,
    Gamboa

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,599
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    I don't see the point in it Rick. The HEX file is a product of the asm file and BASIC file, so all the relevant info is within those, correctly pointed out by Gamboa.

    You could always open the hex file in notepad and simply add it to that. However, you must be careful, as some programmers will not read the hex file correctly, because comments are not a standard in them.

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    526
    Thumbs Up
    Received: 60
    Given: 0
    Total Downloaded
    408.14 MB

    0 Not allowed!

    Default Re: Add compile data to hex file

    CCS produces a non-standard Intel HEX file.

    Some programs may ignore the ';' they use to distinguish a comment, but others won't like it at all and will reject the file as containing bad records.

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Prolific Poster rcurl's Avatar
    Join Date
    Mar 2002
    Posts
    1,883
    Thumbs Up
    Received: 32
    Given: 58
    Total Downloaded
    2.38 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Quote Originally Posted by Les View Post
    I don't see the point in it Rick. The HEX file is a product of the asm file and BASIC file, so all the relevant info is within those, correctly pointed out by Gamboa.
    That's true, assuming that you have access to the ASM and BAS files, but the HEX files often get renamed and distributed to our field support personnel- often out of my control. I get frequent calls where someone is trying to program the hex file into an incorrect PIC. This information at the end of the file would be inseparable from it and would also provide a quick way for me to see which version of compiler created the file and when it was compiled.

    I'll start adding it manually for now.

    -Rick

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Senior Member GAMBOA's Avatar
    Join Date
    Nov 2004
    Posts
    451
    Thumbs Up
    Received: 22
    Given: 0
    Total Downloaded
    203.73 MB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Hi Rick,

    You can add the version number to the name file.

    For example: Titanium_3_06.hex

    Regards,
    Gamboa

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    Senior Member DaveS's Avatar
    Join Date
    Aug 2004
    Posts
    904
    Thumbs Up
    Received: 10
    Given: 3
    Total Downloaded
    1.72 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Regards
    Dave

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    If there is enough room you could put it in the eeprom.
    Or you could put it at a fixed location in program memory using CDATA. Fixed meaning using an org statement.

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  19. #10
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,354
    Thumbs Up
    Received: 83
    Given: 183
    Total Downloaded
    5.30 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    In an ideal world, source control is perfect. Everything is documented and every amendment is versioned. But I don't live there, I have bits of hardware from projects that I got bored with, that I have no idea what version or even what program is "in" it. My savior is auto backup by DaveS, so I always have a bunch of zipped up sourece/object files. If I knew the name and the time/date the firmware was programmed I could find the right zip in a flash.


    Even in the most uptight coding shops things get missed. Looming deadline, panicked coder and last minute bug discovery, what could possibly go wrong?

    Would it be difficult for the compiler (if there is enough unused ROM) to add date, time. version and .BAS file name to the last 20 bytes of ROM. Perhaps a few guard bytes to indicate (by their absence) that insufficient code space was available and the info was truncated. Even if not used, it's hard to imagine how that could cause a problem for anybody. and anyway it could be made optional.

    Perhaps the equivalent of below but not included in the bytes used stat.

    Code:
    Org _code - 32
      CData $CC, $55, $CC, $55
      CData VersionHigh, VersionLow
      CData 23, 06, 17                 ' data
      CData 16, 10                     ' time
      CData "MyProgramName"
    Last edited by towlerg; 23rd June 2017 at 16:28. Reason: old and stupid
    George.

  20. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  21. #11
    Prolific Poster rcurl's Avatar
    Join Date
    Mar 2002
    Posts
    1,883
    Thumbs Up
    Received: 32
    Given: 58
    Total Downloaded
    2.38 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Quote Originally Posted by hadv215 View Post
    If there is enough room you could put it in the eeprom.
    Or you could put it at a fixed location in program memory using CDATA. Fixed meaning using an org statement.
    True, but our guys in the field don't have access to that information. I need something that someone can see using Notepad.

    Thanks for the thoughts, though.

    -Rick

  22. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  23. #12
    Prolific Poster rcurl's Avatar
    Join Date
    Mar 2002
    Posts
    1,883
    Thumbs Up
    Received: 32
    Given: 58
    Total Downloaded
    2.38 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Quote Originally Posted by DaveS View Post
    Interesting....I'm going to have to cogitate on this...........

  24. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  25. #13
    Prolific Poster rcurl's Avatar
    Join Date
    Mar 2002
    Posts
    1,883
    Thumbs Up
    Received: 32
    Given: 58
    Total Downloaded
    2.38 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Quote Originally Posted by towlerg View Post
    My savior is auto backup by DaveS
    I use it too and it has saved my butt more times than I can count. Thanks, Dave!!
    Quote Originally Posted by towlerg View Post
    Even in the most uptight coding shops things get missed. Looming deadline, panicked coder and last minute bug discovery, what could possibly go wrong?
    Oh- you've been to my shop?

  26. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  27. #14
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    Quote Originally Posted by rcurl View Post
    True, but our guys in the field don't have access to that information. I need something that someone can see using Notepad.
    If you take a look at a .hex you'll understand that using Notepad will never help you in finding readable text. It's all hex (as the name says).
    There are editors that allow one to change between display modes, but even then it still is pretty unreadable.
    I think the option GAMBOA suggests is the best.

  28. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  29. #15
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Add compile data to hex file

    I've built a tiny tool that will display a .hex file as Ascii. Only for values > 31 and < 127. Now you can add text to your source indicating version number, compile date, compiler etc.
    Just load the .hex.

  30. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Compile to HEX from Assembler plugin - HELP
    By xldaedalus in forum Mecanique - IDE
    Replies: 9
    Last Post: 2nd May 2019, 16:37
  2. No HEX file is created
    By deepblue in forum Proton Plus Compiler v3
    Replies: 11
    Last Post: 17th March 2011, 10:28
  3. [SOLVED !] eeprom hex file
    By SoundsDigital in forum The Lounge
    Replies: 5
    Last Post: 17th November 2010, 13:35
  4. [SOLVED !] 18F4620; can't compile large source file
    By ricky in forum Proton Plus Compiler v3
    Replies: 9
    Last Post: 4th December 2007, 06:30
  5. Open File vs Compile and Program
    By dolci in forum Wish List / Product Feedback
    Replies: 2
    Last Post: 29th July 2005, 18:02

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts