]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/big-data-ipc-examples.git/blobdiff - host_bios/simple_buffer_example/host/Host.cfg
Merge pull request #1 in PROCESSOR-SDK/big-data-ipc-examples from dev_branch_1 to...
[processor-sdk/big-data-ipc-examples.git] / host_bios / simple_buffer_example / host / Host.cfg
diff --git a/host_bios/simple_buffer_example/host/Host.cfg b/host_bios/simple_buffer_example/host/Host.cfg
new file mode 100644 (file)
index 0000000..35fcfd7
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2017 Texas Instruments Incorporated - http://www.ti.com
+ * 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.
+ */
+
+/*
+ *  ======== Host.cfg ========
+ */
+
+/* root of the configuration object model */
+var Program = xdc.useModule('xdc.cfg.Program');
+var cfgArgs = Program.build.cfgArgs;
+var RB = (cfgArgs.profile == "release" ? true : false);
+
+/* application uses the following modules and packages */
+xdc.useModule('xdc.runtime.Diags');
+xdc.useModule('xdc.runtime.Error');
+xdc.useModule('xdc.runtime.IHeap');
+xdc.useModule('xdc.runtime.Log');
+xdc.useModule('xdc.runtime.Memory');
+xdc.useModule('xdc.runtime.System');
+
+xdc.useModule('ti.sdo.ipc.Ipc');
+xdc.useModule('ti.sdo.ipc.MessageQ');
+xdc.useModule('ti.sdo.ipc.SharedRegion');
+xdc.useModule('ti.sdo.utils.MultiProc');
+
+xdc.useModule('ti.sysbios.heaps.HeapBuf');
+xdc.useModule('ti.sysbios.knl.Task');
+
+
+/*
+ *  ======== IPC Configuration ========
+ */
+xdc.global.SR0_cacheEnable = true;
+xdc.global.SR1_cacheEnable = true;
+xdc.global.procName = cfgArgs.procname;
+var ipc_cfg = xdc.loadCapsule("../shared/ipc.cfg.xs");
+
+/* select ipc libraries */
+var Build = xdc.useModule('ti.sdo.ipc.Build');
+Build.libType = (RB ? Build.LibType_NonInstrumented : Build.LibType_Debug);
+Build.assertsEnabled = (RB ? false : true);
+Build.logsEnabled = (RB ? false : true);
+
+/*
+ *  ======== SYS/BIOS 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 = 0x8000;
+
+var Memory = xdc.useModule('xdc.runtime.Memory');
+Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
+
+var SysMin = xdc.useModule('xdc.runtime.SysMin');
+SysMin.bufSize = 0x1000;
+SysMin.flushAtExit = false;
+
+var System = xdc.useModule('xdc.runtime.System');
+System.SupportProxy = SysMin;
+
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+BIOS.libType = (RB ? BIOS.LibType_NonInstrumented : BIOS.LibType_Instrumented);
+// BIOS.libType = BIOS.LibType_Custom;
+// BIOS.libType = BIOS.LibType_Debug;
+
+
+/*
+ *  ======== 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  = (RB ? Diags.ALWAYS_OFF : Diags.ALWAYS_ON);
+Defaults.common$.diags_ASSERT    = (RB ? Diags.ALWAYS_OFF : Diags.ALWAYS_ON);
+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_ANALYSIS = 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 = 256;  /* 256 entries = 8 KB of memory */
+loggerBufP.bufType = LoggerBuf.BufType_FIXED;
+
+var appLogger = LoggerBuf.create(loggerBufP);
+appLogger.instance.name = "AppLog";
+Defaults.common$.logger = appLogger;
+
+var board_cfg = xdc.loadCapsule(cfgArgs.boardname+"/board.cfg.xs");