TI中文支持网
TI专业的中文技术问题搜集分享网站

6678BIOS下的网口和IPC例程cfg文件合并有冲突吗?

单独运行都可以,合并之后出错了。请教一下,非常感谢。下面是合并之后的cfg

/*
 * helloWorld.cfg
 *
 * Memory Map and Program intiializations for the helloWorld example Utility
 *
 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/**  Redistribution and use in source and binary forms, with or without*  modification, are permitted provided that the following conditions*  are met:
 *
 *Redistributions of source code must retain the above copyright*notice, this list of conditions and the following disclaimer.
 *
 *Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in the*documentation and/or other materials provided with the*distribution.
 *
 *Neither the name of Texas Instruments Incorporated nor the names of
 *its contributors may be used to endorse or promote products derived
 *from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT*  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,*  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT*  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT*  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE*  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
*/

/*
 *@file  helloWorld.cfg
 *
 *@brief*Memory Map and Program intiializations for the HPDSP Utility.
 *
 */
 
/********************************************************************************************************************
*  Specify all needed RTSC MOudles and ocnfigure them.																*
********************************************************************************************************************/

var Memory  =xdc.useModule('xdc.runtime.Memory');

var BIOS=xdc.useModule('ti.sysbios.BIOS');

var Task=xdc.useModule('ti.sysbios.knl.Task');

var HeapBuf =xdc.useModule('ti.sysbios.heaps.HeapBuf');

var Log=xdc.useModule('xdc.runtime.Log');

/*
** Allow storing of task names. By default if you name a task with a friendly display name it will not be saved
** to conserve RAM. This must be set to true to allow it. We use friendly names on the Task List display.
*/
//Defaults.common$.namedInstance = true; 
Task.common$.namedInstance = true;

var Clock=xdc.useModule ('ti.sysbios.knl.Clock');

/* 
** Interface with IPC. Depending on the version of BIOS you are using the 
** module name may have changed.
*/
/* Use this for pre BIOS 6.30 */
/* var Sem=xdc.useModule ('ti.sysbios.ipc.Semaphore'); */

/* Use this for BIOS 6.30 plus to get the IPC module */
var Sem	= xdc.useModule ('ti.sysbios.knl.Semaphore');

var Hwi	= xdc.useModule ('ti.sysbios.hal.Hwi');

var Ecm = xdc.useModule ('ti.sysbios.family.c64p.EventCombiner');

/*
** Configure this to turn on the CPU Load Module for BIOS.
**
*/
/*
var Load=xdc.useModule('ti.sysbios.utils.Load');
Load.common$.diags_USER4 = Diags.ALWAYS_ON;
*/

var Diags= xdc.useModule('xdc.runtime.Diags');


/* Load the CSL package */
var Csl= 	xdc.useModule('ti.csl.Settings');

/* Load the CPPI package */
var Cppi=xdc.loadPackage('ti.drv.cppi');

/* Load the QMSS package */
var Qmss=xdc.loadPackage('ti.drv.qmss');

/* Load the PA package */
var Pa 							= 	xdc.useModule('ti.drv.pa.Settings');

/* Load the Platform/NDK Transport packages */
var PlatformLib  = xdc.loadPackage('ti.platform.evmc6678l');
var NdkTransport = xdc.loadPackage('ti.transport.ndk');

/* 
** Sets up the exception log so you can read it with ROV in CCS 
*/
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Exc = xdc.useModule('ti.sysbios.family.c64p.Exception');
Exc.common$.logger = LoggerBuf.create();
Exc.enablePrint = true; /* prints exception details to the CCS console */

/*
**  Give the Load module it's own LoggerBuf to make sure the
**  events are not overwritten.
*/
/* var loggerBufParams = new LoggerBuf.Params();
loggerBufParams.exitFlush = true;
loggerBufParams.numEntries = 64;
Load.common$.logger = LoggerBuf.create(loggerBufParams); 
*/

/*
** Use this load to configure NDK 2.2 and above using RTSC. In previous versions of
** the NDK RTSC configuration was not supported and you should comment this out.
*/
var Global= xdc.useModule('ti.ndk.config.Global');

/* 
** This allows the heart beat (poll function) to be created but does not generate the stack threads 
**
** Look in the cdoc (help files) to see what CfgAddEntry items can be configured. We tell it NOT
** to create any stack threads (services) as we configure those ourselves in our Main Task
** thread hpdspuaStart.
*/  
Global.enableCodeGeneration = false;
//Cache.MAR224_255 = 0x0000000f;

var Startup=xdc.useModule('xdc.runtime.Startup');

var System=xdc.useModule('xdc.runtime.System');



/*
** Create a Heap. 
*/
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x200000;
heapMemParams.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams);

/* This is the default memory heap. */
Memory.defaultHeapInstance  =Program.global.heap0;
Program.sectMap["sharedL2"] = "L2SRAM"; 
Program.sectMap["systemHeap"] = "MSMCSRAM";
Program.sectMap[".sysmem"]  = "MSMCSRAM";
Program.sectMap[".args"]= "MSMCSRAM";
Program.sectMap[".cio"]= "MSMCSRAM";
Program.sectMap[".far"] 	= 	"MSMCSRAM";
Program.sectMap[".rodata"] 	= 	"MSMCSRAM";
Program.sectMap[".neardata"] 	= 	"MSMCSRAM";
Program.sectMap[".cppi"] 	= 	"L2SRAM";
Program.sectMap[".init_array"] 	= 	"MSMCSRAM";
Program.sectMap[".qmss"] 	= 	"L2SRAM";
Program.sectMap[".cinit"] 	= 	"L2SRAM";
Program.sectMap[".bss"]		=	"MSMCSRAM";
Program.sectMap[".const"]	=	"MSMCSRAM";
Program.sectMap[".text"]	=	"MSMCSRAM";
Program.sectMap[".code"]	=	"MSMCSRAM";
Program.sectMap[".switch"]	=	"L2SRAM";
Program.sectMap[".data"]	=	"MSMCSRAM";
Program.sectMap[".fardata"] = 	"L2SRAM";
Program.sectMap[".args"] 	= 	"MSMCSRAM";
Program.sectMap[".cio"] 	= 	"L2SRAM";
Program.sectMap[".vecs"] 	= 	"L2SRAM";
Program.sectMap["platform_lib"] 	= 	"MSMCSRAM";
Program.sectMap[".far:taskStackSection"] = "L2SRAM";
Program.sectMap[".stack"]	=	"MSMCSRAM";
Program.sectMap[".nimu_eth_ll2"] = "L2SRAM";
Program.sectMap[".resmgr_memregion"] = {loadSegment: "L2SRAM", loadAlign:128};	/* QMSS descriptors region 	*/
Program.sectMap[".resmgr_handles"] = {loadSegment: "L2SRAM", loadAlign:16};	/* CPPI/QMSS/PA Handles			*/
Program.sectMap[".resmgr_pa"]	= {loadSegment: "L2SRAM", loadAlign:8};		/* PA Memory					*/
Program.sectMap[".far:NDK_PACKETMEM"] = {loadSegment: "DDR3", loadAlign: 128};

/* Required if using System_printf to output on the console */
SysStd		=xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy=SysStd;

/********************************************************************************************************************
* Define hooks and static tasks  that will always be running.										*
 ********************************************************************************************************************/

/* 
** Register an EVM Init handler with BIOS. This will initialize the hardware. BIOS calls before it starts. 
**
** If you are debugging with CCS, then this function will execute as CCS loads it if the option in your 
** Target Configuraiton file (.ccxml) has the option set to execute all code before Main. That is the 
** default.
*/
Startup.lastFxns.$add('&EVM_init');
Startup.lastFxns.$add('&board_init');

/* 
** Create the stack Thread Task for our application.
*/
Program.global.GE_communication = Task.create("&task_NDK_stack");
Program.global.GE_communication.stackSize = 262144;
Program.global.GE_communication.priority = 5;


/* 
** Create a Periodic task to handle all NDK polling functions. 
** If you are using RTSC configuration with NDK 2.2 and above, this is done by default and 
** you do not need to do this.
*/
/*var prdNdkClkParams=new Clock.Params ();
prdNdkClkParams.period=0x64;
prdNdkClkParams.startFlag=true;
Program.global.clockInst1=Clock.create("&llTimerTick", 5, prdNdkClkParams);
*/

/* 
** If you are using RTSC configuration with NDK 2.2 and above, this is done by default, else
** register hooks so that the stack can track all Task creation 
Task.common$.namedInstance  =true;
Task.addHookSet ({ registerFxn: '&NDK_hookInit', createFxn: '&NDK_hookCreate', });

/* Enable BIOS Task Scheduler */
BIOS.taskEnabled			=true;

/*
 * Enable Event Groups here and registering of ISR for specific GEM INTC is done
 * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
 */

Ecm.eventGroupHwiNum[0] = 7;
Ecm.eventGroupHwiNum[1] = 8;
Ecm.eventGroupHwiNum[2] = 9;
Ecm.eventGroupHwiNum[3] = 10;

Memory.defaultHeapSize = 16384;
Sem.supportsEvents = false;
Program.stack = 65536;
Program.heap = 32768;
var task4Params = new Task.Params();
task4Params.instance.name = "main_work";
task4Params.stackSize = 32768;
task4Params.priority = 6;
Program.global.main_work = Task.create("&SYS_work", task4Params);
Program.global.GE_communication.instance.name = "GE_communication";
var hwi3Params = new Hwi.Params();
hwi3Params.instance.name = "Hwi13_CIC0_out_32";
hwi3Params.eventId = 21;
Program.global.Hwi13_CIC0_out_32 = Hwi.create(13, "&ISR_uart_rx", hwi3Params);
var hwi4Params = new Hwi.Params();
hwi4Params.instance.name = "Hwi7_SRIO";
hwi4Params.eventId = 20;
Program.global.Hwi7_SRIO = Hwi.create(11, "&ISR_srio_doorbell", hwi4Params);
var task2Params = new Task.Params();
task2Params.instance.name = "sort_reset";
task2Params.priority = 4;
Program.global.sort_reset = Task.create("&signal_sort_reset", task2Params);
//music
//IPC例程cfg
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
/* Modules explicitly used in the application */
var Notify= xdc.useModule('ti.sdo.ipc.Notify');
var MessageQ= xdc.useModule('ti.sdo.ipc.MessageQ');
var HeapBufMP= xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var Ipc= xdc.useModule('ti.sdo.ipc.Ipc');


/* To avoid wasting shared memory for MessageQ transports */
for (var i = 0; i < MultiProc.numProcessors; i++) {Ipc.setEntryMeta({remoteProcId: i,setupMessageQ: true,});
}

/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;

/**  Need to define the shared region. The IPC modules use this
 *  to make portable pointers. All processors need to add this
 *  call with their base address of the shared memory region.
 *  If the processor cannot access the memory, do not add it.
 */ 
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');

/* Shared Memory base address and length */
var SHAREDMEM_0= 0x0c400000;
var SHAREDMEMSIZE_0= 0x00001000;
SharedRegion.translate = true; // 是否需要进行地址转换


/*SharedRegion.setEntryMeta(0,  // 区域ID{ base: SHAREDMEM_0,// 基地址len:  SHAREDMEMSIZE_0,// 区域大小ownerProcId: 0,// 所有者的核IDisValid: true,// 对于当前核,该区域是否有效name: "DDR2_RAM_0",// 区域名称});*/
SharedRegion.setEntryMeta(0,  // 区域ID{ base: SHAREDMEM_0,// 基地址len:  SHAREDMEMSIZE_0,// 区域大小ownerProcId: 0,// 所有者的核IDisValid: true,// 对于当前核,该区域是否有效name: "DDR2_RAM_0",// 区域名称});
/* Create a semaphore with count 0 */
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
Program.global.semHandle = Semaphore.create(0);
/*
 *  @(#) ti.sdo.ipc.examples.multicore.evm667x; 1, 0, 0, 0,1; 5-22-2012 16:36:06; /db/vtree/library/trees/ipc/ipc-h32/src/ xlibrary*/

var execontextInstance0 = xdc.lookup('xdc.platform.ExeContext.Instance#0');
execontextInstance0.memoryMap["MSMCSRAM"].len = 16777216;
min wei1:

有没有cfg的资料?用的什么编程语言?

Andy Yin1:

回复 min wei1:

具体报的是什么错,参考sysbios user guide及wiki关于cfg的理解。

http://processors.wiki.ti.com/index.php/Category:SYSBIOS

min wei1:

回复 Andy Yin1:

您好这是控制台输出的错误信息,麻烦您指教一下。我想多核运行是不是每个核都要初始化,BIOS start是每个核单独启动码?cfg文件是每个核都会执行一遍吗?希望收到您的解答

[C66xx_0] Initialize PASS clock = 100.00MHzx21/2 = 1050.000MHzInitialize DDR speed = 66.67MHzx20/1 = 1333.333MTS

Currently using VPX Connector Ethernet Interface.

ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument suppliedxdc.runtime.Error.raise: terminating execution[C66xx_1] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHzInitialize PASS clock = 100.00MHzx21/2 = 1050.000MHzInitialize DDR speed = 66.67MHzx20/1 = 1333.333MTS

Currently using VPX Connector Ethernet Interface.

[C66xx_2] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHzInitialize PASS clock = 100.00MHzx21/2 = 1050.000MHzInitialize DDR speed = 66.67MHzx20/1 = 1333.333MTS[C66xx_1] ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument supplied[C66xx_2] [C66xx_3] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHz[C66xx_1] xdc.runtime.Error.raise: terminating execution[C66xx_2] Currently using VPX Connector Ethernet Interface.[C66xx_3] Initialize PASS clock = 100.00MHzx21/2 = 1050.000MHz[C66xx_2] [C66xx_3] Initialize DDR speed = 66.67MHzx20/1 = 1333.333MTS[C66xx_2] ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument supplied[C66xx_3] [C66xx_2] xdc.runtime.Error.raise: terminating execution[C66xx_3] Currently using VPX Connector Ethernet Interface.

[C66xx_4] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHzInitialize PASS clock = 100.00MHzx21/2 = 1050.000MHzInitialize DDR speed = 66.67MHzx20/1 = 1333.333MTS[C66xx_3] ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument supplied[C66xx_4] [C66xx_5] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHz[C66xx_3] xdc.runtime.Error.raise: terminating execution[C66xx_4] Currently using VPX Connector Ethernet Interface.[C66xx_5] Initialize PASS clock = 100.00MHzx21/2 = 1050.000MHz[C66xx_4] [C66xx_5] Initialize DDR speed = 66.67MHzx20/1 = 1333.333MTS[C66xx_4] ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument supplied[C66xx_5] [C66xx_6] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHz[C66xx_4] xdc.runtime.Error.raise: terminating execution[C66xx_5] Currently using VPX Connector Ethernet Interface.[C66xx_6] Initialize PASS clock = 100.00MHzx21/2 = 1050.000MHz[C66xx_5] [C66xx_6] Initialize DDR speed = 66.67MHzx20/1 = 1333.333MTS[C66xx_5] ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument supplied[C66xx_6] [C66xx_5] xdc.runtime.Error.raise: terminating execution[C66xx_6] Currently using VPX Connector Ethernet Interface.

[C66xx_7] Initialize DSP main clock = 100.00MHz/1×10 = 1000MHzInitialize PASS clock = 100.00MHzx21/2 = 1050.000MHzInitialize DDR speed = 66.67MHzx20/1 = 1333.333MTS

Currently using VPX Connector Ethernet Interface.

ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument suppliedxdc.runtime.Error.raise: terminating execution[C66xx_6] ti.sdo.ipc.Notify: line 325: assertion failure: A_invArgument: Invalid argument suppliedxdc.runtime.Error.raise: terminating execution

Thomas Yang1:

回复 min wei1:

每个核有自己的SYS/BIOS系统,如果你的设计中有的核要裸跑,可以不要

http://processors.wiki.ti.com/index.php/How_is_SYS/BIOS_related_to_XDCtools_and_RTSC%3F

赞(0)
未经允许不得转载:TI中文支持网 » 6678BIOS下的网口和IPC例程cfg文件合并有冲突吗?
分享到: 更多 (0)