Adding bootloader binary to C project

Hi all,

I see this is a common problem, I am using uVision 4 with an ARM 7.

I have a bootloader at location 0x0 and application code that is located at 0x800.
I currently use HEX2BIN and BIN2HEX to merge the files before I can downloaded them to the target.
However to I would like to debug the application with the bootloader included as a binary.
Is there a way the linker can add the bootloader binary (or HEX file) during the build?
I would like to keep the two projects separate.
I'm looking at using bin2c.exe to create a header file with the bootloader as a const array, but this seems silly when it's the linkers job to combine object and library files together, why not also link an external hex or bin file.

Any ideas please.

Thanks,

Ian

Parents
  • However to I would like to debug the application with the bootloader included as a binary

    Why do you need to do that? These are two separate programs so you cannot unless you added the code of the bootloader to the application. HEX files don't contain debug information.
    You can merge HEX files by simply removing the last line of one of them and copy-pasting the other instead of that line. Why all trouble?

Reply
  • However to I would like to debug the application with the bootloader included as a binary

    Why do you need to do that? These are two separate programs so you cannot unless you added the code of the bootloader to the application. HEX files don't contain debug information.
    You can merge HEX files by simply removing the last line of one of them and copy-pasting the other instead of that line. Why all trouble?

Children
More questions in this forum