[SOLVED] HEX and BIN created together

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] HEX and BIN created together

    Is it possible to have both generated in one building process: HEX and BIN file?


    (I want to avoid to change settings every time I make HEX and compile again to get BIN, since I need both image formats all the time)


    Thanks
    Images
    • imageee.png

      107.83 kB, 764×501, viewed 3,729 times
  • Hello,

    Thank you for you inquiry.
    ES currently only lets you pick one output format.
    But you can e.g. create a .hex file and then use post build steps so an external tool can do the conversion to .bin e.g. with our J-Flash tool per CL which is part of the J-Link software package.

    Out of curiosity, why do you need both formats? They contain the same application information with the only difference, that hex assigns a memory address to the file.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thanks for the answer.
    The currently used tool (makefile with GCC in command line) creates both images, and with SES I don't have this comfort.
    HEX is needed for production flashing, and BIN for wrapping into some FW package with more images.
    Anyhow, I will think about writing post-build script... once I learn how and where to write it.
    Regards
  • Hello,

    You can find the option in project options->User Build Step->Post-Build Command
    This line works like a command line in console.
    So to use J-Flash to convert from hex to bin it would look something like this:

    Source Code

    1. <J-Flash path> -open<hex file path> -saveas<new bin file name>

    More information about J-Flash can be found in the J-Flash user guide UM08003

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.