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: how to config/setup custom bootloader

Genius 5910 points
Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE

Is there any documentation howto config the application and CCS to handle a custom bootloader.

 specially:

 -  Moving the start location of main program

 - How to jump from bootloader to main application

 - modify CCS so I can still real time debug my applications?

 - How to maintain code protection.

- Other things that imported.

Thanks!

  • EVS,

    We don't have any documentation which completely addresses this topic. But, the below documentation forum post should be of help.

    www.ti.com/.../spraaq3.pdf

    e2e.ti.com/.../1360013

    e2e.ti.com/.../427659

    e2e.ti.com/.../214086


    Regards,
    Manoj
  • Thanks for the reply.
    Can you please verify that I understand correctly.

    Bootloader:
    main.c
    void main (void)
    {
    asm("LB code_start_app") ;
    }

    F28069F.cmd
    FLASH : origin = 0x3F4000, length = 0x003FF5 /* on-chip FLASH Sector A */
    BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
    BEGIN_APP : origin = 0x3F3FD, length = 0x000002 /* Part of FLASHB. Used for "boot to Flash" application*/

    codestart : > BEGIN, PAGE = 0 // Unchanged
    code_start_app : > BEGIN_APP, PAGE = 0


    Main application:
    F28069F.cmd
    FLASH : origin = 0x3D 8000, length = 0x003FF5 /* on-chip FLASH Sector B-H */
    BEGIN : origin = 0x3F3FF6, length = 0x3F3FFD/* Part of FLASHB- Used for "boot to Flash" bootloader mode. */

    codestart : > BEGIN, PAGE = 0 // Unchanged

    Thanks,
    EVS
  • EVS,

    This is how I would approach the problem:-

    1) One CCS Project to develop bootloader and would reserve one flash sector for storing bootloader code.
    2) One CCS Project for developing application code and you have to reserve other flash sectors for storing application code

    Bootloader code contents:-

    Refer to example code in the below path for reference:
    <controlSUITE>\device_support\f2806x\v151\F2806x_examples_ccsv5\f28069_flash_kernel

    1) Entry point for this bootloader code should be at 0x3F7FF6
    2) Include rts library and cinit
    3) Configure SYSCLK
    4) Unlock
    5) Initialize bootloader peripheral and bootloader code
    6) Receive a KEY_VALUE and check the following:-
    KEY_VALUE == SPECIFIC_VALUE, Erase existing application code and update application received from bootloader
    KEY_VALUE != SPECIFIC_VALUE, continue to jump to start address (Referred as APP_START_ADDRESS) of application code

    7) Before executing any flash algorithm make sure to (Flash Erase / Program), CSM needs to be unlocked.
    8) Set Flash CPU scale factor

    Application code contents:-

    1) This is completely upto user
    2) Include rts library and cinit (Optional: Allows you develop this code independently of bootloader code)
    3) Make sure start address of application code matches with APP_START_ADDRESS in bootloader code.

    Regards,
    Manoj
  • EVS,

    I haven't heard back from you for a while. I believe my previous post answered your question adequately.

    Regards,
    Manoj