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

How to flash two applications?

Hi,

I have a Default-Application and a Bootloader-Application. Both are developped separately.
The Bootloader-Application can load the Default-Application.

But prior to shipment of our product we want to store both the Bootloader-Application and the Default-Application in the uC.

My question is: how do I flash both applications in one go into the uC?

Thanks

Henk

Parents Reply Children
  • I just remove the last line from one hex file (it's an "end" record) and then concatenate the contents of the next hex file.

    When using FlashMagic to send the combined file to the chip, I don't need to do anything else. Some programming equipment don't support hex files that don't have all memory regions sorted, in which case you may need to do more work - or maybe just make sure you combine the input files in the correct order.

    In my case, I might glue boot loader (one hex file from separate build) + config sector (one hex file with retrieved or generated data) + application (one hex file from separate build) into a single hex file that the factory then programs into the device.

  • a classic tool to combine hex files is the "srecord"
    have a look at this srecord.sourceforge.net/
    it runs on linux/win emvironment and it is easy to use

    srec_cat
        The srec_cat program may be used to catenate (join)
        EPROM load files, or portions of EPROM load files,
        together. Because it understands all of the input
        and output formats, it can also be used to convert
        files from one format to another.