This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using a Secondary Bootloader with C6748

I am writing a seconday bootloader for the C6748. This application will be loaded by AIS as normal, and will itself take care of loading the main application into memory and executing it.

However, I am not sure how to go about this last part. Is there a BIOS API to jump to a specific entry point in a completely different segment of code?

  • Your secondary bootloader will be in charge of loading your application into memory and branching to it.

    1. You will need to use the hex conversion utility (hex6x.exe) to convert your application into a format suitable for writing to flash (i.e. it needs to be in one big "chunk").
    2. Your bootloader will need to know how to parse that "chunk" in order to copy it to the correct place in memory.
    3. You need to be careful that the bootloader doesn't clobber itself by writing over some piece of code or data that it is currently using.  In other words, only uninitialized sections in your application are allowed to overlap with your bootloader.

    I have some code that shows how to parse the generate image in this thread:

    C6452 Serial Bootloader / Application updates via UART

    I think you will find that thread very helpful as you go about your task.

    Best regards,
    Brad

     

  • Thanks for the link, Brad. There's some good info there. But the specific answer I'm most interested in right now is how do I "branch to c_int00", once I've loaded the code into memory?

  • At least for the C28xx, the Boot ROM Reference documentation comes with source code for the Boot ROM.  I used that example (Init_Boot.asm) to figure out how to branch to my entry point.

    Put the entry point into ACC, then:

        PUSH ACC
        POP  RPC
        LRETR

  • James Jurack said:

    Thanks for the link, Brad. There's some good info there. But the specific answer I'm most interested in right now is how do I "branch to c_int00", once I've loaded the code into memory?

    Please re-read the specific post to which I already pointed you.  I give the proper C syntax and everything for branching to the entry point.

  • I see! Don't know how I missed that before. Thanks for your help.