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
Presumably, you are using some kind of flash loader. If the flash
loader is the one built into Uv4, you should be able to flash the two
images in two steps: LOAD image1.axf; LOAD image2.axf. If it's a
different flash loader, you should be able to merge the two images
into one prior to flashing them.
You don't mention chip type or method of programming.
For factory-programming of LPC23xx we just combine the two hex
files and then download that file using the primary bootloader
available in the LPC23xx chips. If needed, we may also combine the
hex file with a precompiled "configuration sector" that may give
information about the board.
Per Westermark: Have you any further unformation on how to do
this? Specially the part where you combine the HEX file with some
precombiled "config sectore" (binary data)?
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
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.
View all questions in Keil forum