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.

c6678使用gateMP进行多核共享保护的问题



大家好,

      最近研究6678,需要多核对相同地址的数据进行操作,因此需要增加保护,让同一时间只有一个核可以访问。

      从IPC的文档中发现GateMP可以实现,但是目前我在使用时遇到了一些问题,想请各位帮助一下。

      目前我使用的开发环境是CCS5.1,采用TI的EVM6678L开发板。

      具体要实现的内容如下:

      每个核均运行相同的代码:

     {

         gateHandle = GateMP_getDefaultRemote();

        /* Enter the gate */
        key = GateMP_enter(gateHandle);

         // TODO something


        /* Leave the gate */
        GateMP_leave(gateHandle, key);

     }

      在调用GateMP中函数 GateMP_getDefaultRemote()来获取一个GateMP_Handle时,返回值总是NULL,(编译正常)运行时报错如下:

[C66xx_0] ti.sdo.ipc.GateMP: line 208: assertion failure: A_nullArgument: Required argument is null
[C66xx_0] xdc.runtime.Error.raise: terminating execution

    请问各位这个问题怎么解决?

    另外我查了很多发现6678中似乎很少用到GateMP,而是davinci中用的较多,不知道6678如果实现多核保护比较标准的解决方案是什么?

    谢谢!