TMS320C6678: 软件固化后,启动第二核心失败

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

如标题所说,我将两个sysbios程序固化到SPI内,但是主核无法让从核启动

目前已知:

1.我的两个程序代码段都会放到DDR中,调试也能看到。

2.程序都放到L2就没问题。

3.DDR table运行正常,即主核是可以正常启动并且输出消息的。

4.用的例程中的启动代码

想问:

1.我当前的代码如何?

2.platform中是否有对应的函数让从核也启动?

以下是我的主核启动从核的代码(DDR每个核心偏移0x00200000):

void MulticoreBoot()
{

int *pBootMagicAddCore0;
int *pBootMagicAddCore0DDR;
int *IpcGr0;
platform_init_flags sFlags;
platform_init_config sConfig;
int i;
int pform_status;
int coreId = 0;

// coreId = platform_get_coreid ();
coreId = CSL_chipReadReg (CSL_CHIP_DNUM);
if(coreId == 0)
{

/*write Boot Magic add of other cores and send IPC interrupt*/
pBootMagicAddCore0 = (int*)0x1087FFFC;
pBootMagicAddCore0DDR = (int*)0x80000000; /*code start*/
(*pBootMagicAddCore0)+= 0x10000000;// translate to global address
for(i = 1;i < CORE_NUM_6678; i++)//write the other cores' boot magic address
{
*(pBootMagicAddCore0+ (0x01000000*i)/4 ) = (*pBootMagicAddCore0DDR) + 0x00200000 * i;
}

IpcGr0 = (int*)0x02620240;
/*warning:when running on no-boot mode,core0~core7 must all be connected to the target*/
for(i = 1;i < CORE_NUM_6678;i++)//core0 sent ipc interrupt to
{
*(IpcGr0+i) = (*(IpcGr0+i)) | 0x00000001;
}


}

else
{

}

}

  • 您好,

    已经收到了您的案例,调查需要些时间,感谢您的耐心等待。

  • 可能在以下方面存在问题:

    地址转换

    设置从核入口地址之前DDR已经初始化并可用

    IPC中断的配置

    请结合multicore_boot中的例子自行排查。

  • 你好Taylor:

    排除了一些基本问题后,我认为是在跳转时的地址错误。

    例程中的跳转地址设定为:

    pBootMagicAddCore0 = (int*)0x1087FFFC;
    (*pBootMagicAddCore0)+= 0x10000000;// translate to global address

    *(pBootMagicAddCore0+ (0x01000000*i)/4 ) = (*pBootMagicAddCore0) + 0x01000000 * i;

    从代码上看此地址进行了一次映射(// translate to global address),如我所理解,在映射后进行的( (*pBootMagicAddCore0) + 0x01000000 * i)操作,得到的是0x11800000上对吗?

    那么我需要映射到0x80000000上的话需要注意什么呢,可否直接赋值0x80000000?

  • 请参考上面的回答,有现成的例子。

  • 问题解决了,发现是我同一个工程换platform编译的时候好像要重新clean一下,

    再有就是给的起始地址应该是_c_int00的起始地址。