评估板: 66AK2L06 软件:CCS8 代码在ARM Cortex-A15上
编译结果出现:Cache unsupported on device!
检查后发现,错误是因为连接到了 C:\TI\bios_6_52_00_12\packages\ti\sysbios\family\c64p\Cache.xs;
正常应该链接到:C:\TI\bios_6_52_00_12\packages\ti\sysbios\family\arm\a15\Cache.xs;
问题在 现在不知道在哪设置的这个链接,希望大神多多指教。
.cfg 和 main 代码如下(main 只写了开头):
.cfg
/* Load all required BIOS/XDC runtime packages */
var Memory = xdc.useModule('xdc.runtime.Memory')
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var Log = xdc.useModule('xdc.runtime.Log');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
/* Load the FFTC package */
var Fftc = xdc.useModule('ti.drv.fftc.Settings');
Fftc.deviceType = "k2l";
/* Load the CSL package */
var Csl = xdc.useModule('ti.csl.Settings');
/* Load the CPPI package */
var Cppi = xdc.useModule('ti.drv.cppi.Settings');
/* Load the QMSS package */
var Qmss = xdc.useModule('ti.drv.qmss.Settings');
/* Device specific configuration */
var devName = "k2l";
Csl.deviceType = devName;
var System = xdc.useModule('xdc.runtime.System');
SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd; //SysMin
/* Create a default system heap using ti.bios.HeapMem. */
var heapMemParams1 = new HeapMem.Params;
heapMemParams1.size = 8192 * 30;
heapMemParams1.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams1);
/* This is the default memory heap. */
Memory.defaultHeapInstance = Program.global.heap0;
Program.sectMap["systemHeap"] = Program.platform.stackMemory;
/****** IPC - Shared Memory Settings ********/
/* IPC packages */
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var Settings = xdc.module('ti.sdo.ipc.family.Settings');
var ListMP = xdc.useModule('ti.sdo.ipc.ListMP');
var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
var HeapMemMP = xdc.useModule('ti.sdo.ipc.heaps.HeapMemMP');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var memmap = Program.cpu.memoryMap;
Startup = xdc.useModule('xdc.runtime.Startup');
Startup.firstFxns.$add('&myStartupFxn');
/* Configure the shared memory heap for shared memory allocations required by the
* CPPI and QMSS Libraries */
SharedRegion.translate = false;
/* Create a shared memory heap */
MultiProc.setConfig(null, ["HOST","CORE0", "CORE1", "CORE2", "CORE3"]);
/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;
/* To avoid wasting shared memory for Notify and MessageQ transports */
for (var i = 0; i < MultiProc.numProcessors; i++) {
Ipc.setEntryMeta({
remoteProcId: i,
setupNotify: false,
setupMessageQ: false,
});
}
/* Create a shared memory */
SharedRegion.setEntryMeta(0,
{ base: 0x0C010000,
len: 0x00100000,
ownerProcId: 0,
isValid: true,
name: "sharemem",
});
/* 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;
/*
* @(#) ti.sysbios.genx; 2, 0, 0, 0,275; 4-29-2009 15:45:06; /db/vtree/library/trees/avala/avala-k25x/src/
*/
main
/* FFTC types include */
#include <fftc_types.h>
/* FFTC include */
#include <ti/drv/fftc/fftc.h>
#include <ti/drv/fftc/fftc_osal.h>
/* FFTC example application input data/ configuration files */
#include <fftc_cfg_16.h>
/* Chip Level definitions include */
#include <ti/csl/csl_chip.h>
#include <ti/csl/csl_semAux.h>
#include <ti/csl/csl_qm_queue.h>
/* PSC CSL definitions include */
#include <ti/csl/csl_psc.h>
#include <ti/csl/csl_pscAux.h>
/* CACHE CSL includes */
#include <ti/csl/csl_cache.h>
#include <ti/csl/csl_cacheAux.h>
/* XDC/BIOS includes */
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
/* IPC includes */
#include <ti/ipc/GateMP.h>
#include <ti/ipc/Ipc.h>
#include <ti/ipc/ListMP.h>
#include <ti/ipc/SharedRegion.h>
#include <ti/ipc/MultiProc.h>
#include <ti/sysbios/knl/Task.h>
#include <xdc/runtime/Error.h>
#include <ti/sysbios/hal/Hwi.h>
#include <ti/sysbios/family/c64p/EventCombiner.h>
/* QM Accumalator firmware include */
#include <ti/drv/qmss/qmss_firmware.h>
/* Standard definitions include */
#include <string.h>
/*
* ======== main.c ========
*/
/*
* ======== taskFxn ========
*/
Void taskFxn(UArg a0, UArg a1)
{
System_printf("enter taskFxn()\n");
Task_sleep(10);
System_printf("exit taskFxn()\n");
System_flush(); /* force SysMin output to console */
}
/*
* ======== main ========
*/
Int main()
{
Task_Handle task;
Error_Block eb;
System_printf("enter main()\n");
Error_init(&eb);
task = Task_create(taskFxn, NULL, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}
BIOS_start(); /* does not return */
return(0);
}