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: Booting OpenMP based Application from NOR Flash

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi All,

 

In our custom C6678 based board, we needs to perform 'booting the OpenMP based multicore application from NOR Flash'

Currently we had successfully the following flash booting types,

1. Booting single core imagefrom NOR Flash via IBL as well as directly from EMIF NOR Flash

2. Booting multi-core image (without OpenMP) using MAD via IBL.

Next while experimentting OpenMP based image booting from NOR Flash, the application is not able to run from the flash.

The way experimented the flash booting is as follows,

1. Created a OpenMP based application image and then we can added the initilization sequence as like in gel in the main routine (simillar to Booting single core imagefrom NOR Flash via IBL)

2. Added the core power domain enable in the initilization routine using "Set_Power_State(CSL_PSC_PD_GEM1, CSL_PSC_LPSC_GEM1, PSC_ENABLE)" functions for all 8 cores.

3. Programed the IBL in EEPROM to load the elf file flash (simillar to Booting single core imagefrom NOR Flash via IBL)

Please clarify us the following doubts,

  1. To enable CorePac power domain, please confirm whether the function we had used is correct or any other method is required.
  2. Whether the power domain for all the cores needs to be enabled in the application image or in the IBL itself
  3. Is it required to use MAD tool to convert the OpenMP based .out file to .bin and then needs to be programmed to the NOR Flash or it is not required.

 

With Thanks and Regards,

Senthilkumar R

  • Hi Senthilkumar,

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

    BR
    Tsvetolin Shulev
  • Hi,

    Please share which processor SDK RTOS version are you using?

    Best Regards,
    Yordan

  • Hi Yordan,

    Thanks for your response,

    Version details of my test setup are a sfollows,

    1. CCS -> Version 5.x

    2. Sys/BIOS ->bios_6_33_06_50

    3. MCSDK -> mcsdk_2_01_02_05

    Also please let me know how the SDK RTOS version is concenrned for the boot sequence (changes needs to be taken care in IBL / processor initialization in the application) required for booting the OpenMP based application from NOR Flash via IBL.

    With Thanks and Regards,

    Senthilkumar R

  • 1. Did you successfully boot single core image with OpenMP from NOR flash via IBL as well as directly from EMIF NOR Flash?

    2. While booting multi-core image(without OpenMP) using MAD via IBL, Did you use power domain enable functions and what is the need to use that function in OpenMP based application?

    Thank you.
  • Hi Rajasekaran,

    1. Did you successfully boot single core image with OpenMP from NOR flash via IBL as well as directly from EMIF NOR Flash?

    Yes, we are able to boot single core image (without OpenMP) from NOR flash via IBL as well as directly from EMIF NOR Flash.

    2. While booting multi-core image(without OpenMP) using MAD via IBL, Did you use power domain enable functions and what is the need to use that function in OpenMP based application?

    • For MAD image booting, we have take care of the power domain of interfaces in the main() rotines, but not for the corepacs.
    • Now i have removed power domain enable functions for tetsing the OpenMP based application and i have anables power domains in teh OpenMP configuration as follows,
      • var OpenMP = xdc.useModule('ti.omp.utils.OpenMP');
      • OpenMP.autoDnldCore = true;;
    • The 'OpenMP.autoDnldCore = true' option is doing the corepac power domain, but still we are not able to boot the OpenMP based application via IBL
    • Now i am trying the same with latest processor sdk and CCS7.4,
      • In this procesor sdk setup, i am not able to use the 'OpenMP.autoDnldCore = true', please let me know what is equivalent function in the processor sdk

    With Thanks and Regards,

    Senthilkumar R

  • Thank you for your patience. I am reaching out to OpenMP experts to look into this.
  • Hi Rajasekaran,

    Is there any update on my OpenMP realted issues.

    Currently i am trying to run the OpenMP application via emulator without the gel file and only core#0 is initialized by the emulator i.e. the emulator does only the initialization done by the IBL boot-loader and if the  application running successfully with this emulator setup shall run via IBL boot-loader from Flash.

    With this experiment while running the OpenMP application from Core#0 via emulator, it is stoping at Cache module statrup function ("ti_sysbios_family_c66_Cache_Module_startup__E"), please let me know whether any initialization related to cache needs to be done for solving this issue.

    FYI: The same application runs properly, if i enable/run all cores in the debugger.

    With Thanks and Regards,

    Senthilkumar R

  • Hello. I had similar problem: my OpenMP based project didn't start. The reason was that OpenMP need all cores waked up. So I did the following (I use 4 cores)

    1) add this code before main()

    #define DEVICE_REG32_W(x,y)  (*(volatile uint32_t *)(x)=(y))
    #define DEVICE_REG32_R(x)    (*(volatile uint32_t *)(x))
    #define MAGIC_ADDR           (0x0087FFFC)
    #define BOOT_MAGIC_ADDR(x)   (MAGIC_ADDR + (1<<28) + (x<<24))
    #define IPCGR(x)             (0x02620240 + x*4)
    #define KICK0                (0x2620038)
    #define KICK1                (0x262003C)
    
    extern void _c_int00(void); // to access _c_int00 address
    
    void launch_other_cores()
    {
    	bootMode = CSL_BootCfgGetBootMode() & 0x7;
    	coreNum = CSL_chipReadReg(CSL_CHIP_DNUM);
    	if((coreNum == 0) && (bootMode != 0))
    	{
    		CSL_chipWriteTSCL(0);
    		for (int core = 1; core < 4; core++)
    		{
    			DEVICE_REG32_W(BOOT_MAGIC_ADDR(core), (uint32_t)_c_int00);
    			DEVICE_REG32_W(KICK0, 0x83e70b13);
    			DEVICE_REG32_W(KICK1, 0x95a4f1e0);
    			DEVICE_REG32_W(IPCGR(core), 1);
    			delay_usecs(20);
    		}
    	}
    }

    2) Add a line to *.cfg

    Startup.resetFxn = "&launch_other_cores";

  • Hi Sergey Shabunin,

    Thank you for your input, with that approach i am able to run my OpenMP application via emulator without the gel file and only core#0 is initialized by the emulator.

    Thanks and Regards,
    Senthilkumar R