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

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
  • Hi Tamir,

    It would just make my life a lot easier.
    I have 3 devices each with their own code and bootloader.
    One device also has the ability to update firmware of another so it carries a piggyback binary as well as its code and bootloader.

    I'm not interested in debugging the bootloader, if I need to I'll do that on its own.
    So it does not bother me if there is no dis-assembly listing it will normally just jump in to main() eventually.

    So unless I'm doing something wrong here every time I want to debug my code I have to change the ROM vectors in the target pod re-assemble and load. If I want to then try out the changes on a target I have to change them back compile merge the two HEX files and download the merged using the uLink. No to mention if changes in the application code push the vectors of the piggyback bin file.

    Should be a simple thing to add to a linker and looking of the forum a lot of people use bootloaders.

    Or am I going about it the wrong way?

    Thanks,

    Ian

Reply
  • Hi Tamir,

    It would just make my life a lot easier.
    I have 3 devices each with their own code and bootloader.
    One device also has the ability to update firmware of another so it carries a piggyback binary as well as its code and bootloader.

    I'm not interested in debugging the bootloader, if I need to I'll do that on its own.
    So it does not bother me if there is no dis-assembly listing it will normally just jump in to main() eventually.

    So unless I'm doing something wrong here every time I want to debug my code I have to change the ROM vectors in the target pod re-assemble and load. If I want to then try out the changes on a target I have to change them back compile merge the two HEX files and download the merged using the uLink. No to mention if changes in the application code push the vectors of the piggyback bin file.

    Should be a simple thing to add to a linker and looking of the forum a lot of people use bootloaders.

    Or am I going about it the wrong way?

    Thanks,

    Ian

Children
No data