Hi, I am using the default Dsp.cfg from the syslink example sharedresources with two tasks added. This has no problem compiling in terminal, but code composer doesn't like it for some reason. The error is occurring in this section of the code:
SharedRegion.setEntryMeta(0, new SharedRegion.Entry({ name: "SR0", base: SR0Mem.base, len: SR0Mem.len, ownerProcId: MultiProc.getIdMeta("HOST"), cacheEnable: false, isValid: true }) );
And here is the full code
/* * Copyright (c) 2012, Texas Instruments Incorporated * All rights reserved. * * 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. */ /* * ======== Dsp.cfg ======== * */ /* root of the configuration object model */ var Program = xdc.useModule('xdc.cfg.Program'); /* application uses the following modules and packages */ xdc.useModule('xdc.runtime.Assert'); xdc.useModule('xdc.runtime.Diags'); xdc.useModule('xdc.runtime.Error'); xdc.useModule('xdc.runtime.Log'); xdc.useModule('xdc.runtime.Registry'); xdc.useModule('xdc.runtime.Timestamp'); xdc.useModule('ti.sysbios.gates.GateHwi'); var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); var Task = xdc.useModule('ti.sysbios.knl.Task'); var BIOS = xdc.useModule('ti.sysbios.BIOS'); BIOS.libType = BIOS.LibType_NonInstrumented; /* * ======== IPC Configuration ======== */ /* required because SysLink is running on the host processor */ xdc.useModule('ti.syslink.ipc.rtos.Syslink'); /* configure processor names */ var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc'); var procNameAry = MultiProc.getDeviceProcNames(); MultiProc.setConfig("DSP", procNameAry); /* ipc configuration */ var Ipc = xdc.useModule('ti.sdo.ipc.Ipc'); /* ipc setup for SR0 Memory (host processor not running Sys/Bios) */ Ipc.sr0MemorySetup = false; /* set ipc sync to pair, requiring Ipc_attach() call on all processors */ Ipc.procSync = Ipc.ProcSync_PAIR; /* define host processor */ Ipc.hostProcId = MultiProc.getIdMeta("HOST"); /* shared region configuration */ var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion'); /* configure SharedRegion #0 (IPC) */ var SR0Mem = Program.cpu.memoryMap["SR_0"]; SharedRegion.setEntryMeta(0, new SharedRegion.Entry({ name: "SR0", base: SR0Mem.base, len: SR0Mem.len, ownerProcId: MultiProc.getIdMeta("HOST"), cacheEnable: false, isValid: true }) ); /* configure SharedRegion #1 (IPC) */ var SR1Mem = Program.cpu.memoryMap["SR_1"]; SharedRegion.setEntryMeta(1, new SharedRegion.Entry({ name: "SR1", base: SR1Mem.base, len: SR1Mem.len, ownerProcId: MultiProc.getIdMeta("HOST"), cacheEnable: false, isValid: true }) ); /* configure external memory cache property * * C000_0000 - C7FF_FFFF 800_0000 ( 128 MB) Cache.MAR192_223 * ---------------------------------------------------------------------------- * C000_0000 - C1FF_FFFF 200_0000 ( 32 MB) -------- don't care * C200_0000 - C200_FFFF 1_0000 ( 64 KB) SR_0 no-cache MAR194 * C201_0000 - C2FF_FFFF FF_0000 ( ~15 MB) SR_1 no-cache MAR194 * C300_0000 - C37F_FFFF 80_0000 ( 8 MB) DSP_PROG cache enable MAR195 * C380_0000 - C3FF_FFFF 80_0000 ( 8 MB) -------- cache enable MAR195 * C400_0000 - C7FF_FFFF 400_0000 ( 64 MB) -------- don't care */ Cache = xdc.useModule('ti.sysbios.family.c64p.Cache'); Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */ /* * ======== Operating System Configuration ======== */ /* no rts heap */ Program.heap = 0; Program.argSize = 100; /* minimum size */ Program.stack = 0x1000; /* create a default heap */ var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); var heapMemParams = new HeapMem.Params(); heapMemParams.size = 0x4000; var Memory = xdc.useModule('xdc.runtime.Memory'); Memory.defaultHeapInstance = HeapMem.create(heapMemParams); /* configure System module */ var SysMin = xdc.useModule('xdc.runtime.SysMin'); SysMin.bufSize = 0x1000; SysMin.flushAtExit = false; var System = xdc.useModule('xdc.runtime.System'); System.SupportProxy = SysMin; /* configure SysBios to use the lower half of Timer 1 */ var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); var Clock = xdc.useModule('ti.sysbios.knl.Clock'); Timer.timerSettings[1].master = true; Timer.defaultHalf = Timer.Half_LOWER; Clock.timerId = 1; /* * ======== Miscellaneous Configuration ======== */ /* set default diags mask */ var Diags = xdc.useModule('xdc.runtime.Diags'); var Defaults = xdc.useModule('xdc.runtime.Defaults'); Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF; Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF; Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF; Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */ Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */ Defaults.common$.diags_STATUS = Diags.RUNTIME_ON; Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF; Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF; Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF; Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF; Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF; Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF; Defaults.common$.diags_INFO = Diags.ALWAYS_OFF; Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF; /* override diags mask for selected modules */ xdc.useModule('xdc.runtime.Main'); Diags.setMaskMeta( "xdc.runtime.Main", Diags.ENTRY | Diags.EXIT | Diags.INFO, Diags.RUNTIME_ON ); var Registry = xdc.useModule('xdc.runtime.Registry'); Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF; Registry.common$.diags_EXIT = Diags.RUNTIME_OFF; Registry.common$.diags_INFO = Diags.RUNTIME_OFF; Registry.common$.diags_USER1 = Diags.RUNTIME_OFF; /* create a logger instance */ var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); var loggerBufP = new LoggerBuf.Params(); loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */ loggerBufP.bufType = LoggerBuf.BufType_FIXED; var appLogger = LoggerBuf.create(loggerBufP); appLogger.instance.name = "AppLog_Core1"; Defaults.common$.logger = appLogger; /* tasks for procTec */ var taskTECParams = new Task.Params(); taskTECParams.instance.name = "procTecTask"; taskTECParams.priority = 1; Program.global.procTecTask = Task.create("&procTec", taskTECParams); var semaphoreTECParams = new Semaphore.Params(); semaphoreTECParams.instance.name = "procTecSem"; Program.global.procTecSem = Semaphore.create(null, semaphoreTECParams); /* task for scint */ var taskSCINTParams = new Task.Params(); taskSCINTParams.instance.name = "procScintTask"; Program.global.procScintTask = Task.create("&procScint", taskSCINTParams); var semaphoreSCINTParams = new Semaphore.Params(); semaphoreSCINTParams.instance.name = "procScintSem"; Program.global.procScintSem = Semaphore.create(null, semaphoreSCINTParams);