I've to include two binary files, one at address 0x2000 and other at 0x3000. These are absolute address in the CODE section. These files includes ARM cortex M0 firmwares which can be switched to using a bootloader code.
I included an image.s file in my "User group" in my Keil Project workspace.
;/*------------------ image.s -----------------*/
AREA _image, CODE, READONLY
INCBIN ./Objects/blue2000.bin
INCBIN ./Objects/red3000.bin
END
____________________________________________________
How to locate these binary images at absolute address?
Probably far easier to merge at a .HEX or .BIN level, but your method is going to likely require that you create sections for them to live in, and define the location in the scatter file.
Thanks Pier! Can you please elaborate on how to merge at a .Hex or .bin level :) ? I'm building a multi-app bootloader to boot either of the two firmwares. The two app firmwares here are compiled using absolute ROM addresses. This is done in Keil by setting the address in "Options for target"->"Target"->"IROM1:" -> "Start" addesses to respective start address . So how to combine bootloader.hex (starts at 0x0), blue2000.hex(starts at 0x2000) and red3000.hex (starts at 0x3000)?
http://www.keil.com/support/docs/2666.htm
Hi Pier, These links appear to be down: www.hex2bin.com/.../ www.hex2bin.com/.../ I get this error: Access Error: 404 -- Not Found Can you email me these utilities, if you have a copy? Are there any other utilities that can merge three .bin or .hex into one?
Not sure I have them to hand.
Binary files are trivially easy to manage with basic C library functions like fopen/fclose/fread/fwrite.
.HEX files can be merged by hand in a text editor, or automated via an AWK/PERL script.
If you need something that manages these types of files look at tools like SRecords
Ok, found the old files, not sure they're going to be very helpful in the modern context as they are 16-bit DOS apps that will not run on Win64 systems.
MS-DOS Player can be very useful for running some of those old DOS programs
homepage3.nifty.com/.../
May not be as fast as the likes of VMware etc, but way more lightweight for occasional access.
Does that solve the filespace issue at all well? The more cogent solution would be to just code a native app that can do the conversion/translation of these relatively simple formats.
For a simple utility to manipulate hex files, I would go straight for writing something myself. It should be bread an butter stuff for a seasoned development engineer.
But there are some old projects (circa 1980-2000) we have to maintain with a few old compilers and linkers/locaters. They run a treat with MS-DOS player. We always carry out a rebuild of an existing project to ensure the produced binary image is a 100% match before considering any code changes.