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.

RTOS/TMS320C6678: Executing code from DDR

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

HI all,

i have a secondary boot loader which will execute directly from the flash. so i would like my SBL to copy main application (SYS-BIOS application) from flash to DDR and start execution from the DDR.

Does anyone know about how to execute code from DDR where SBL will be changing the control of execution to DDR.

Regards,

Noufal P

  • The team is notified. They will post their feedback directly here.

    BR
    Tsvetolin Shulev
  • Noufal,

    We provide a secondary bootloader and also an example boot example with DDR init function in the code.

    The secondary bootloader for the EVM resides on the I2C EEPROM and uses platform library to initialize DDR memory. and then copies the application into DDR memory. The IBL source code is located at pdk_c667x_2_0_8\packages\ti\boot\ibl\src

    The boot example that we provide is located at pdk_c667x_2_0_8\packages\ti\boot\examples\srio\srioboot_ddrinit. In the source you will see that the code runs on core0 and calls platform_init with DDR configuration parameters and then provides entry point to DSP to start executing code.

    BAsed on your application requirements, you can extract the code form IBL or that example to initialize DDR and then copy application code sections from the NOR to DDR memory.

    Hope this helps.

    Regards,
    Rahul
  • Thank you for your reply.
    I ahd gone through srioboot_ddrinit.c code. but my doubt is how we are passing the application required entry point.
    In my case am loading application to DDR and my wntry point is 0x8000e6a0. But in example code they are using following function.
    1. DEVICE_REG32_W(BOOT_MAGIC_ADDR(0), 0); -- where #define BOOT_MAGIC_ADDR(x) (MAGIC_ADDR + (1<<28) + (x<<24)) and MAGIC_ADDR is 0x87fffc.
    2. then it is calling start_boot function which will DEVICE_REG32_R(BOOT_MAGIC_ADDR(0));and just comparing whether read data is 0 or not. if not equal to zero, it is jumping to exit point.

    Am not understanding how i can pass my entry point to this function...

    Regards,
    Noufal P
  • Hi all,

    Thank you for your support.
    My rewuirement was to switch execution from secondary boot loader (SBL running from nor flash using XIP) to SYSBIOS entry point. i have done following steps in SBL and it solved my issue.
    1. First declared one function pointer as below
    --> void (*entryPtr)(void)
    2. Copied my sysbios Application from flash location to DDR address
    3. Initialized entryPtr with my Entry point address.
    --> entryPtr = (void *)(SYSBIOS_APP_ENTRY_POINT);
    4. then called function pointer as,
    --> entryPtr();
    5. This will execute code at EntryPoint given.
    Regards,
    Noufal P