This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Change hex file extension

Hi,
I have a project with multi-target. Each target has its own electronic. Each target generate a hex file which can be copied on a USB key and can be download on its right product. To avoid errors i'd like to have a file : X241TG.HEX for first target and X241TG.HXX for secund target.

How could i change extension of hex file for a target. I have read tips in forum but i haven't found solution.

Thanks for your help

Parents Reply Children
  • thanks for your help, i agree with you it's not a beautifull solution but it's a very secure solution.

    I'd like just rename file that i would distribute to my tecnicians, who are not known this type of file. So fact that hex file has an extension .hxx is not a problem.

    Thanks for your link i check it now.

  • thanks for your help, i agree with you it's not a beautifull solution but it's a very secure solution.

    It doesn't sound very secure ("hardened against intentional misuse"). Anyone wanting to brick your products can do so simply by renaming a file.

  • I normally add a magic marker, a version and some form of checksum in the download file, so the boot loader verifies that:
    1) The file is intended for that product.
    2) The file has not been damaged.
    3) The file does not represent an unsupported downgrade.

  • I agree, but maybe that's not what the OP meant by "secure"?

    So, Gilles, what did you mean by "secure" in this context?

    Why is changing the extension OK, when changing the name isn't?

    I can't really see how it makes any difference to the users whether they change the name or the extension, but having loads of non-standard extensions to manage is certainly going to cause grief for the developers & maintainers...

    Using the file name also gives you more scope for including descriptive elements such as version, etc...

  • "I normally add a magic marker..."

    Exactly as I do.

    Unfortunately, we still get people being hired here for which I'm told "they've come from University, so they're obviously bright and don't need you to tell them what to do", are then given a free hand with code development and releases, but don't consider such things and ... well, I'm sure you can guess!

    Oh well.

  • What is the interest to brick a product ?

    Access to this functionnality is protected by a password, Only our technician can access this menu. So our technicians who would not brick our product voluntarily. I just want to avoid handling mistake.

    Thanks for your answer, it's interesting

  • Yes actually name is used to insert version, ... so when you download a file in our product you can entry name. So you can entry a bad name (name of other product). If i have an extension by product, error can only be made if you rename the file on your key, it's so a voluntary error.

  • To complete :

    New software, check checksum, identification before accepting firmware update.

    Some old products had not this future, no check, no id. So for these old products (some isolated case) i would change extension to avoid error (very exceptionnal use).

    New products are secured.