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.

TMS320F28069: Jumping correctly from one application to a second one on flash.

Part Number: TMS320F28069

Hello from Ubstadt, Germany,

currently, I'm developing a bootloader which, after doing its job, shall
branch to the actual customer application.
Both the boot loader and the application initially shall be downloaded by
the manufacturer, using JTAG.
Later on, the customer shall be able to install updates on his own,
using the boot loader which reads the application update from an SD card.

Both the bootloader and the application are separately compiled and built, so that
both come with their own startup code as well as their own vector table, initialization etc. ...

The bootloader shall reside at flash start address (0x003F 7FF8), so is reached first
when the µC starts up in the "run to flash" mode.
The application code shall start from the first flash sector which is not used by
the bootloader.

If no SD card is recognized by the bootloader, or the card is invalid,
the bootloader shall branch directly to the appl.
If an SD is present and functional the bootloader first shall read and flash
the new application, then immediately shall branch to it.

Can somebody tell me how (i.e. in detail) such a "long branch" can be achieved properly?



Thanks and best regards
Goetz

  • When you "boot to flash", bootrom jumps to address 0x3F7FF6 and not 0x3F7FF8. Addresses 0x3F7FF8 - 0x3F7FFF can be programmed to secure your device. If any of the addresses from 0x3F7FF8 - 0x3F7FFF are programmed, it would lock the device.

    Pseudo code (which is part of your bootloader code)
    If(SD card_available_with_new_application_code)
    {
    Use bootloader code to update new application code
    }
    else
    {
    Jump to existing application code. (You can use LB Address of the 1st opcode in your application code)
    }

    Other key careabouts:
    -----------------------------

    1) At address 0x3F7FF6, you should have the code start of bootloader code

    2) In your new application code, you can't use address 0x3F7FF6 to store your application code start address.

    3) Most of the customers who do this store their complete bootloader code in Sector A and use other sectors for storing application code.

    Regards,
    Manoj
  • Hello Manoj,

    ... It took some time for that reply because there was/is a lot of things in parallel...

    Thanks for your tips; there is just one question remaining, concerning your tip 1) :
    Since 0x003F 7FF6 is the highest address of the user flash area, the (customer's) bootloader's
    code cannot start there. I presume that a branch instruction to bootloader's actual start address is
    placed here. Is that right? (I think, the IDE will automatically do what's right, but I'm curious...)

    Please note: This is my last working day before my vacancies begin (until Jan., 17th). I don't know
    which time zone you reside in (the mine is UTC+1)... So I don't know whether I will catch your reply
    before I finish this evening. So, please send me a copy to my private mail address which is:

    goetzka[at]t-online.de

    apart from that, I wish happy xmas!

    Goetz

  • ============================================================
    Sorry: Correction: End of my vacancies is NOT Jan., 17th but Jan, 07th
    ===========================================================