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.

关于_c_int00及相关的问题

Other Parts Discussed in Thread: SYSBIOS

Hi    各位好

最近由于项目刚接触C6678多核DSP,论坛上看了许多资料。但是实践过程中遇到一些问题,想请教下各位专家。
1. 关于_c_int00入口的固定。为了使多核启动起来,需要在0核程序写各个核的入口地址到magic addr,所以必须要知道C入口的地址。而_c_int00_的固定应该是要更改cmd文件吧?而我用的是SYS/BIOS。我发现在debug目录下面有一个link.cmd,而这个文件有说明是不要修改的。意思是我得自己新建一个cmd文件?我有了解到在Tools->RTSC Tools->Platform->new/Edit可以更改,但是我new了,在external memory下add了一个,但是也没发现在哪里(*.map/link.cmd)有什么变化。
2. 关于cmd文件的编写。哪里有关于cmd文件编写的文档?用BIOS和不用是有不同的吧?cfg文件又要怎么更改呢?


新手,要学的还很多,希望各位不吝赐教。
yq

  • 1. 可以通过map文件找到各个核自己的C_int_00

    2. 这个你可以参考一下spru187来学习一下cmd文件的写法,cfg文件的写法可以参考一下BIOS_user_guide( 在SYSBIOS安装目录底下)

  • 您好,感谢回复。

    嗯嗯,在map文件确实是可以找到c_int00地址,但是我在想有没有必要固定这个地址呢?这样的话我就没必要一个一个填写各个核的入口地址了。我看下面这个LedTestCorex工程就是这样做的。

    if (pform_status == Platform_EOK)
    {
    
       /*write Boot Magic add of other cores and send IPC interrupt*/
    
       pBootMagicAddCore0 = (int*)0x108FFFFC;	//boot magic address (the last word)
           (*pBootMagicAddCore0)+= 0x10000000;	// translate to global address
       for(i = 1;i < CORE_NUM_6670; i++)		//write the other cores' boot magic address
       {
          *(pBootMagicAddCore0+ (0x01000000*i)/4 ) = (*pBootMagicAddCore0) + 0x01000000 * 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_6670;i++)//core0 sent ipc interrupt to
       {
          *(IpcGr0+i) = (*(IpcGr0+i)) | 0x00000001;
       }
    }



    还有一个问题就是在LedTestCorex工程中的cmd文件有这样一段
         .myboot
         {
            *.*<boot.obj>(.text)
         } > BOOT_CORE0
    这段代码就是固定c_int00入口的吧。我试过了,这种写法是不能在BIOS里面用。
    还有,我也参考了这篇帖子,http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/t/73810.aspx
    我跟他的情况差不多吧。总之,我还想知道的就是:有必要固定C入口地址吗?how?

    期待您的回复
    yq
  • 我没有试过,但是应该可以固定这个地址,在cmd文件中强制把这个地址指定到一个固定的地址上去。

  • 那我最后想了解下,如何将使用BIOS的多核工程通过工具链链接起来呢?主要还是c_int00入口的问题。

  • c_int00对于每个核可以是不同的地址,多核工程也是一个一个核分别链接出来的。

  • 问题解决一段时间了,分享下我的处理过程。总觉得我的处理不对劲,或者根本就不应该是这样处理的,但多核确实还是起来了。还希望大家能够提出建议。

    1.固定c_int00入口;其实照理来说确实是不需要固定的。【 一般做boot时,代码基本就基本固定了】,最后再找出c_int00入口,修改boot的c_int00入口。

    参考这个帖子 http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/p/73810/252410.aspx 

    可是我经常要烧写进去看效果,稍微改动些地方有可能c_int00入口就变了,所以我还是选择了固定。我是这样固定的:

    首先,我针对不同的核新建了platform。【下面是核0的,其他核只是L2SRAM不一样】

    因为我不清楚像上面那个帖子一样如何用一个platform使得不同核的code/data/stack放到不同的空间。

    然后,新建了cmd文件。【下面是核0的】

    MEMORY
    {
    CORE0 (RWX) : org = 0x10800000, len = 0xc0
    }
    SECTIONS
    {
    .text:_c_int00 > CORE0
    platform_lib > DDR3
    }

    最后就可以使用这段代码固定入口了

    #if EVM_6670_6678 //1->6678 0->6670
    pBootMagicAddCore0 = (int*)0x1087FFFC; //boot magic address (the last word)
    #else
    pBootMagicAddCore0 = (int*)0x108FFFFC;
    #endif
    // (*pBootMagicAddCore0) += 0x10800000; // translate to global address
    (*pBootMagicAddCore0) = 0x10800000;
    for(i = 1; i < CORENUM; i++) //write the other cores' boot magic address
    {
    *(pBootMagicAddCore0+ (0x01000000*i)/4 ) = (*pBootMagicAddCore0) + 0x01000000 * i;
    }

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