add realtime_demo_bios/k2g for CMB DEV.AUDIO_PREPROC.01.01.00.00
authorMing Wei <a0868762@ti.com>
Thu, 29 Dec 2016 23:17:41 +0000 (17:17 -0600)
committerMing Wei <a0868762@ti.com>
Thu, 29 Dec 2016 23:17:41 +0000 (17:17 -0600)
Signed-off-by: Ming Wei <a0868762@ti.com>
60 files changed:
common/components/sys.h
realtime_demo_bios/k2g/.ccsproject [new file with mode: 0644]
realtime_demo_bios/k2g/.cproject [new file with mode: 0644]
realtime_demo_bios/k2g/.project [new file with mode: 0644]
realtime_demo_bios/k2g/.xdchelp [new file with mode: 0644]
realtime_demo_bios/k2g/audioAnalogLoopbackTest.cfg [new file with mode: 0644]
realtime_demo_bios/k2g/bflinker.cmd [new file with mode: 0644]
realtime_demo_bios/k2g/build/makefile [new file with mode: 0644]
realtime_demo_bios/k2g/build/objects.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/sources.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/src/subdir_rules.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/src/subdir_vars.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/src/sysbios/subdir_rules.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/src/sysbios/subdir_vars.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/subdir_rules.mk [new file with mode: 0644]
realtime_demo_bios/k2g/build/subdir_vars.mk [new file with mode: 0644]
realtime_demo_bios/k2g/include/analog_test.h [new file with mode: 0644]
realtime_demo_bios/k2g/include/audio_dc_cfg.h [new file with mode: 0644]
realtime_demo_bios/k2g/include/edma_cfg.h [new file with mode: 0644]
realtime_demo_bios/k2g/include/mcasp_cfg.h [new file with mode: 0644]
realtime_demo_bios/k2g/src/.exclude [new file with mode: 0644]
realtime_demo_bios/k2g/src/audio_dc_cfg.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/edma_cfg.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/main.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/makefile.libs [new file with mode: 0644]
realtime_demo_bios/k2g/src/mcasp_cfg.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/mcasp_osal.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/sample_cs.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/sample_k2g_cfg.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/sample_k2g_int_reg.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/sine.c [new file with mode: 0644]
realtime_demo_bios/k2g/src/test_exit.c [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/Platform.xdc [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/Platform.xs [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/config.bld [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/evmTCI66AK2G02Custom.zip [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package.bld [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package.mak [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package.xdc [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/.vers_b160 [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/.vers_g180 [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/.vers_r170 [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/.xdc-B06 [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/build.cfg [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/evmTCI66AK2G02Custom.ccs [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/evmTCI66AK2G02Custom.class [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/evmTCI66AK2G02Custom.java [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/evmTCI66AK2G02Custom.sch [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package.bld.xml [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package.cfg.dep [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package.cfg.xdc.inc [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package.defs.h [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package.xdc.dep [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package.xdc.inc [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/package_evmTCI66AK2G02Custom.c [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/rel/evmTCI66AK2G02Custom.xdc.inc [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/rel/evmTCI66AK2G02Custom.xdc.inc.manifest [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/rel/evmTCI66AK2G02Custom.xdc.ninc [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/rel/evmTCI66AK2G02Custom.zip.dep [new file with mode: 0644]
realtime_demo_bios/platforms/packages/evmTCI66AK2G02Custom/package/rel/evmTCI66AK2G02Custom/evmTCI66AK2G02Custom/package/package.rel.xml [new file with mode: 0644]

index 0b7882a0d921f882fa4c343f921f493d3588793d..d0fa142bda91aebcce35c2ce7eca30f583d70b92 100644 (file)
@@ -47,7 +47,9 @@
 \r
 #define SYS_MICS_MAX          7       /* Maximum number of microphones in the system */\r
 #define SYS_VMICS_MAX         12      /* Maximum number of virtual microphones in the system */\r
+#define SYS_ADC_FS_HZ         48000   /* ADC sampling rate in Hz */\r
 #define SYS_FS_HZ             16000   /* Sampling rate in Hz */\r
+#define SYS_FS_RATIO          SYS_ADC_FS_HZ/SYS_FS_HZ   /* Sampling rate ratio */\r
 #define SYS_FRAME_DURATION_MS 10      /* Frame duration in ms */\r
 #define SYS_FRAME_LENGTH      (1L*SYS_FS_HZ*SYS_FRAME_DURATION_MS/1000)             /* Frame length in samples */\r
 #define SYS_FRAME_SIZE        (TYP_LINSAMPLE_SIZE*SYS_FRAME_LENGTH/TYP_TWORD_SIZE)  /* Frame size in bytes */\r
diff --git a/realtime_demo_bios/k2g/.ccsproject b/realtime_demo_bios/k2g/.ccsproject
new file mode 100644 (file)
index 0000000..492988b
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+       <deviceVariant value="com.ti.ccstudio.deviceModel.C6000.GenericC66xxDevice"/>
+       <deviceFamily value="C6000"/>
+       <deviceEndianness value="little"/>
+       <codegenToolVersion value="7.4.11"/>
+       <isElfFormat value="true"/>
+       <rts value="libc.a"/>
+       <templateProperties value="id=org.eclipse.rtsc.project.templates.EmptyRtscApplication,buildProfile=release,isHybrid=true,"/>
+       <isTargetManual value="false"/>
+</projectOptions>
diff --git a/realtime_demo_bios/k2g/.cproject b/realtime_demo_bios/k2g/.cproject
new file mode 100644 (file)
index 0000000..e033145
--- /dev/null
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
+       <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">\r
+               <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1301012910">\r
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1301012910" moduleId="org.eclipse.cdt.core.settings" name="Debug">\r
+                               <externalSettings/>\r
+                               <extensions>\r
+                                       <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.rtsc.xdctools.parsers.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>\r
+                               </extensions>\r
+                       </storageModule>\r
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+                               <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1301012910" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">\r
+                                       <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1301012910." name="/" resourcePath="">\r
+                                               <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain.1814774094" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.linkerDebug.958590073">\r
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.860196577" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">\r
+                                                               <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=com.ti.ccstudio.deviceModel.C6000.GenericC66xxDevice"/>\r
+                                                               <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>\r
+                                                               <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>\r
+                                                               <listOptionValue builtIn="false" value="CCS_MBS_VERSION=6.1.3"/>\r
+                                                               <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>\r
+                                                               <listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>\r
+                                                               <listOptionValue builtIn="false" value="XDC_VERSION=3.32.1.22_core"/>\r
+                                                               <listOptionValue builtIn="false" value="RTSC_PRODUCTS=ti.mas.aer.c64Px:17.0.0;com.ti.sdo.edma3:2.12.2;com.ti.rtsc.SYSBIOS:6.46.1.38;com.ti.uia:2.0.6.52;ti.mas.volib.C66:2.1.0.1;com.ti.rtsc.XDAIS:7.24.0.04;com.ti.pdk.k2g:1.0.4;"/>\r
+                                                               <listOptionValue builtIn="false" value="INACTIVE_REPOS="/>\r
+                                                               <listOptionValue builtIn="false" value="EXPANDED_REPOS="/>\r
+                                                               <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>\r
+                                                               <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>\r
+                                                       </option>\r
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1436645997" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="8.1.0" valueType="string"/>\r
+                                                       <targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.targetPlatformDebug.792334621" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.targetPlatformDebug"/>\r
+                                                       <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.builderDebug.2028139338" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.builderDebug"/>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.1964461456" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION.1392375120" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION" value="6600" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.ABI.1026608973" name="Application binary interface (coffabi not supported) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.ABI.eabi" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.INCLUDE_PATH.2101330476" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.INCLUDE_PATH" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/board/diag/nand/src&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../../common/components&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/drv/mcasp&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/board&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/addon/audk2g/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CSL_INSTALL_PATH}&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.99170131" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEFINE.2070968829" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEFINE" valueType="definedSymbols">\r
+                                                                       <listOptionValue builtIn="false" value="DEVICE_K2G"/>\r
+                                                                       <listOptionValue builtIn="false" value="SOC_K2G"/>\r
+                                                                       <listOptionValue builtIn="false" value="evmK2G"/>\r
+                                                                       <listOptionValue builtIn="false" value="PLATFORM_INIT_IN"/>\r
+                                                                       <listOptionValue builtIn="false" value="BUILD_DSP"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WARNING.1939740913" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WARNING" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="225"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WRAP.1871099023" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DISPLAY_ERROR_NUMBER.1175146157" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OTHER_FLAGS.1820479250" name="Other flags" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OTHER_FLAGS" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value=""/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.1782550233" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL._none" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_FOR_SPEED.1176340096" name="Speed vs. size trade-offs (--opt_for_speed, -mf)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_FOR_SPEED.5" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.PREINCLUDE.1038478402" name="Specify a preinclude file (--preinclude)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.PREINCLUDE"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS.1255729686" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS.116807804" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS.2073817097" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1577048755" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.linkerDebug.958590073" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.linkerDebug">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.OUTPUT_FILE.328022270" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.MAP_FILE.945167607" name="Link information (map) listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.LIBRARY.795000517" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.LIBRARY" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="ti.addon.audk2g.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="ti.board.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="ti.drv.mcasp.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="aer_c.ae64P"/>\r
+                                                                       <listOptionValue builtIn="false" value="vau/lib/vau_c.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="vpe/lib/vpe_a.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="vpe/lib/vpe_c.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="util/lib/util_c.ae66"/>\r
+                                                                       <listOptionValue builtIn="false" value="mhm/lib/mhm_c.ae66"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.SEARCH_PATH.1510607192" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.SEARCH_PATH" valueType="libPaths">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/board/lib/evmK2G/c66/release&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/addon/audk2g/lib/k2g/c66/release&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/drv/mcasp/lib/k2g/c66/release&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_MAS_AER_C64PX_INSTALL_DIR}/packages/ti/mas/aer/lib&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_MAS_VOLIB_C66_INSTALL_DIR}/packages/ti/mas/&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DIAG_WRAP.955217510" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DISPLAY_ERROR_NUMBER.1490676194" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.XML_LINK_INFO.1605850618" name="Detailed link information data-base into &lt;file&gt; (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.XML_LINK_INFO" value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.STACK_SIZE.617152444" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.linkerID.STACK_SIZE" value="0x2000" valueType="string"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD_SRCS.74376507" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD2_SRCS.1911887564" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__CMD2_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__GEN_CMDS.1283887487" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exeLinker.inputType__GEN_CMDS"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.hex.1036373993" name="C6000 Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.hex"/>\r
+                                                       <tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1461096259" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.21190467" name="Package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${EDMA3_LLD_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TARGET_CONTENT_BASE}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${BIOS_CG_ROOT}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${COM_TI_UIA_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_PDK_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_MAS_AER_C64PX_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_MAS_VOLIB_C66_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${XDAIS_CG_ROOT}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${XDAIS_CG_ROOT}/examples&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../platforms/packages&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1830685800" name="Target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.elf.C66" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.2096721839" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="evmTCI66AK2G02Custom" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.1501735578" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="evmTCI66AK2G02Custom" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.618088451" name="Build-profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="debug" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1032420246" name="Compiler tools directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="&quot;${CG_TOOL_ROOT}&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_CONFIGURATION_FILE.2009343288" name="Build configuration file (-b)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_CONFIGURATION_FILE" value="" valueType="string"/>\r
+                                                       </tool>\r
+                                               </toolChain>\r
+                                       </folderInfo>\r
+                                       <sourceEntries>\r
+                                               <entry excluding="audiosample.cfg" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+                                       </sourceEntries>\r
+                               </configuration>\r
+                       </storageModule>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+               </cconfiguration>\r
+               <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Release.361549806">\r
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Release.361549806" moduleId="org.eclipse.cdt.core.settings" name="Release">\r
+                               <externalSettings/>\r
+                               <extensions>\r
+                                       <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.rtsc.xdctools.parsers.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>\r
+                               </extensions>\r
+                       </storageModule>\r
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+                               <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Release.361549806" name="Release" parent="com.ti.ccstudio.buildDefinitions.C6000.Release">\r
+                                       <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Release.361549806." name="/" resourcePath="">\r
+                                               <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.ReleaseToolchain.95022308" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.linkerRelease.970619825">\r
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1852469070" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">\r
+                                                               <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=com.ti.ccstudio.deviceModel.C6000.GenericC66xxDevice"/>\r
+                                                               <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>\r
+                                                               <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>\r
+                                                               <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>\r
+                                                               <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>\r
+                                                               <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>\r
+                                                               <listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>\r
+                                                               <listOptionValue builtIn="false" value="XDC_VERSION=3.30.6.67"/>\r
+                                                               <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.sdo.edma3:2.12.0;ti.pdk:3.2.0.0;com.ti.rtsc.SYSBIOS:6.41.2.41;"/>\r
+                                                               <listOptionValue builtIn="false" value="INACTIVE_REPOS="/>\r
+                                                               <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>\r
+                                                       </option>\r
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1022175571" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.4.4" valueType="string"/>\r
+                                                       <targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.targetPlatformRelease.1769307832" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.targetPlatformRelease"/>\r
+                                                       <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.builderRelease.1027260639" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.builderRelease"/>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.compilerRelease.1791684850" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.compilerRelease">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.SILICON_VERSION.1757788119" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.SILICON_VERSION" value="6600" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.ABI.1987760516" name="Application binary interface (coffabi, eabi) [See 'General' page to edit] (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.ABI.eabi" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.INCLUDE_PATH.1255239387" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.INCLUDE_PATH" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../../../../platform_lib/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/drv/mcasp&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PDK_INSTALL_PATH}/ti/platform&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CSL_INSTALL_PATH}&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DEFINE.1408812542" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DEFINE" valueType="definedSymbols">\r
+                                                                       <listOptionValue builtIn="false" value="DEVICE_K2G"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DISPLAY_ERROR_NUMBER.1059312103" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DIAG_WARNING.1540053556" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DIAG_WARNING" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="225"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DIAG_WRAP.746488045" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.C6000_7.4.compilerID.DIAG_WRAP.off" valueType="enumerated"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__C_SRCS.1713511263" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__C_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__CPP_SRCS.1338118469" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__CPP_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__ASM_SRCS.1554403223" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__ASM_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__ASM2_SRCS.587578136" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.compiler.inputType__ASM2_SRCS"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.linkerRelease.970619825" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exe.linkerRelease">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.OUTPUT_FILE.1616734943" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.MAP_FILE.1063491895" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.SEARCH_PATH.6111485" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.SEARCH_PATH" valueType="libPaths">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.DISPLAY_ERROR_NUMBER.561633704" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.DIAG_WRAP.1691696668" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.DIAG_WRAP.off" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.XML_LINK_INFO.1946265745" name="Detailed link information data-base into &lt;file&gt; (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.XML_LINK_INFO" value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.LIBRARY.1629614850" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.linkerID.LIBRARY" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>\r
+                                                               </option>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exeLinker.inputType__CMD_SRCS.290687348" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exeLinker.inputType__CMD_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exeLinker.inputType__CMD2_SRCS.1059391156" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exeLinker.inputType__CMD2_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.4.exeLinker.inputType__GEN_CMDS.452088790" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.exeLinker.inputType__GEN_CMDS"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.4.hex.881943148" name="C6000 Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.4.hex"/>\r
+                                                       <tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.813410185" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.394019807" name="Package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_PDK_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TARGET_CONTENT_BASE}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${EDMA3_LLD_INSTALL_DIR}/packages&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${BIOS_CG_ROOT}/packages&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1182120569" name="Target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.elf.C66" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.888384236" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.evmTCI66AK2G02" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.2015810350" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.evmTCI66AK2G02" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.969415792" name="Build-profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="debug" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.837297218" name="Compiler tools directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="&quot;${CG_TOOL_ROOT}&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_CONFIGURATION_FILE.498028139" name="Build configuration file (-b)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_CONFIGURATION_FILE" value="&quot;${PROJECT_ROOT}/make/configPkg/config.bld&quot;" valueType="string"/>\r
+                                                       </tool>\r
+                                               </toolChain>\r
+                                       </folderInfo>\r
+                                       <sourceEntries>\r
+                                               <entry excluding="src|audiosample.cfg" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/sysbios"/>\r
+                                       </sourceEntries>\r
+                               </configuration>\r
+                       </storageModule>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+               </cconfiguration>\r
+       </storageModule>\r
+       <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>\r
+       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+               <project id="audioAnalogTest.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.728751465" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>\r
+       </storageModule>\r
+       <storageModule moduleId="scannerConfiguration"/>\r
+       <storageModule moduleId="org.eclipse.cdt.core.language.mapping">\r
+               <project-mappings>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>\r
+               </project-mappings>\r
+       </storageModule>\r
+</cproject>\r
diff --git a/realtime_demo_bios/k2g/.project b/realtime_demo_bios/k2g/.project
new file mode 100644 (file)
index 0000000..fa2ee35
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>audioAnalogLoopbackTest</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>\r
+                       <triggers>full,incremental,</triggers>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.rtsc.xdctools.buildDefinitions.XDC.xdcNature</nature>\r
+               <nature>com.ti.ccstudio.core.ccsNature</nature>\r
+               <nature>org.eclipse.cdt.core.cnature</nature>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>\r
+               <nature>org.eclipse.cdt.core.ccnature</nature>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>\r
+       </natures>\r
+       <linkedResources>\r
+               <link>\r
+                       <name>fil.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/fil.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>fil.h</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/fil.h</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>mhm.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/mhm/src/mhm.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>mss.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/mss/src/mss.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>mssproc.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/mss/src/mssproc.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>src</name>\r
+                       <type>2</type>\r
+                       <locationURI>PROJECT_LOC/src</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sys.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sys.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sys.h</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sys.h</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysasnr.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysasnr.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysbf.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysbf.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysbfflt.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysbfflt.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysbfflt.h</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysbfflt.h</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>syseram.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/syseram.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>syseram.h</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/syseram.h</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysiram.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysiram.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysiram.h</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysiram.h</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>sysmss.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>PARENT-2-PROJECT_LOC/common/components/sysmss.c</locationURI>\r
+               </link>\r
+       </linkedResources>\r
+       <variableList>\r
+               <variable>\r
+                       <name>CSL_INSTALL_PATH</name>\r
+                       <value>$%7BPARENT-5-PROJECT_LOC%7D/pdk_k2g_1_0_4/packages/ti/csl</value>\r
+               </variable>\r
+               <variable>\r
+                       <name>PDK_INSTALL_PATH</name>\r
+                       <value>$%7BPARENT-5-PROJECT_LOC%7D/pdk_k2g_1_0_4/packages</value>\r
+               </variable>\r
+       </variableList>\r
+</projectDescription>\r
diff --git a/realtime_demo_bios/k2g/.xdchelp b/realtime_demo_bios/k2g/.xdchelp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/realtime_demo_bios/k2g/audioAnalogLoopbackTest.cfg b/realtime_demo_bios/k2g/audioAnalogLoopbackTest.cfg
new file mode 100644 (file)
index 0000000..ddd8b88
--- /dev/null
@@ -0,0 +1,145 @@
+/*\r
+ * audioAnalogTest.cfg\r
+ *\r
+ * Memory Map and Program intializations for the audio analog test\r
+ *\r
+ * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ \r
+ *  \r
+ *  Redistribution and use in source and binary forms, with or without \r
+ *  modification, are permitted provided that the following conditions \r
+ *  are met:\r
+ *\r
+ *    Redistributions of source code must retain the above copyright \r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ *    Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the \r
+ *    documentation and/or other materials provided with the   \r
+ *    distribution.\r
+ *\r
+ *    Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+*/\r
+\r
+/* load the required files and packages                                       */\r
+var Memory     = xdc.useModule('xdc.runtime.Memory')\r
+var Task        = xdc.useModule ("ti.sysbios.knl.Task");\r
+var BIOS        = xdc.useModule ("ti.sysbios.BIOS");\r
+var ECM         = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner");\r
+var System      = xdc.useModule ("xdc.runtime.System");\r
+var SysStd      = xdc.useModule('xdc.runtime.SysStd');\r
+var cache       = xdc.useModule ("ti.sysbios.hal.Cache");\r
+var Timestamp   = xdc.useModule ("xdc.runtime.Timestamp");\r
+var Hwi         = xdc.useModule ("ti.sysbios.family.c64p.Hwi");\r
+var Sem         = xdc.useModule("ti.sysbios.knl.Semaphore");\r
+var Log        = xdc.useModule('xdc.runtime.Log');\r
+var LoggerBuf  = xdc.useModule('xdc.runtime.LoggerBuf');\r
+var SysMin     = xdc.useModule('xdc.runtime.SysMin');\r
+var System     = xdc.useModule('xdc.runtime.System');\r
+var Defaults   = xdc.useModule('xdc.runtime.Defaults');\r
+var Main       = xdc.useModule('xdc.runtime.Main');\r
+var Diags      = xdc.useModule('xdc.runtime.Diags');\r
+var HeapMem     = xdc.useModule ("ti.sysbios.heaps.HeapMem");\r
+var CpIntc      = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');\r
+\r
+/* Add the drivers and libraries required */\r
+//var mcasp = xdc.useModule('ti.drv.mcasp.Settings');\r
+var devType = "k2g";\r
+var Csl = xdc.useModule('ti.csl.Settings');\r
+Csl.deviceType = devType;\r
+//var PlatformLib  = xdc.loadPackage('ti.platform.evmk2g');\r
+var Edma = xdc.loadPackage('ti.sdo.edma3.drv');\r
+\r
+/* Load the uart package -- required by board */\r
+var Uart = xdc.loadPackage('ti.drv.uart');\r
+Uart.Settings.socType = devType;\r
+\r
+//var Board = xdc.loadPackage('ti.board');\r
+//Board.Settings.boardName = "evmK2G";\r
+\r
+/* Load the osal package -- required by board & interrupt example */\r
+var osType = "tirtos"\r
+var Osal = xdc.loadPackage('ti.osal');\r
+Osal.Settings.osType = osType;\r
+Osal.Settings.socType = devType;\r
+\r
+/* \r
+ * The BIOS module will create the default heap for the system.\r
+ * Specify the size of this default heap.\r
+ */\r
+BIOS.heapSize = 0x2000;\r
+\r
+/* System stack size (used by ISRs and Swis) */\r
+Program.stack = 0x4000;\r
+\r
+System.SupportProxy = SysStd;\r
+\r
+var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');\r
+var heapMemParams = new HeapMem.Params();\r
+heapMemParams.size = 0x28000;\r
+heapMemParams.sectionName = "systemHeap";\r
+Program.global.heapHandle = HeapMem.create(heapMemParams);\r
+\r
+/* \r
+ * Create and install logger for the whole system\r
+ */\r
+var loggerBufParams = new LoggerBuf.Params();\r
+loggerBufParams.numEntries = 32;\r
+var logger0 = LoggerBuf.create(loggerBufParams);\r
+Defaults.common$.logger = logger0;\r
+Main.common$.diags_INFO = Diags.ALWAYS_ON;\r
+\r
+Program.sectMap["systemHeap"]   = "L2SRAM";\r
+Program.sectMap[".sysmem"]      = "L2SRAM";\r
+Program.sectMap[".args"]        = "L2SRAM";\r
+Program.sectMap[".cio"]         = "L2SRAM";\r
+Program.sectMap[".far"]        = "EXT_RAM";\r
+Program.sectMap[".rodata"]     = "L2SRAM";\r
+Program.sectMap[".neardata"]   = "L2SRAM";\r
+Program.sectMap[".init_array"]         = "L2SRAM";\r
+Program.sectMap[".cinit"]      = "L2SRAM";\r
+Program.sectMap[".bss"]                = "L2SRAM";\r
+Program.sectMap[".const"]      = "L2SRAM";\r
+Program.sectMap[".text"]       = "L2SRAM";\r
+Program.sectMap[".code"]       = "L2SRAM";\r
+Program.sectMap[".switch"]     = "L2SRAM";\r
+Program.sectMap[".data"]       = "L2SRAM";\r
+Program.sectMap[".fardata"]     = "L2SRAM";\r
+Program.sectMap[".vecs"]       = "L2SRAM";\r
+Program.sectMap["platform_lib"] = "L2SRAM";\r
+Program.sectMap[".stack"]      = "L2SRAM";\r
+\r
+var task0Params = new Task.Params();\r
+task0Params.priority = 5;\r
+task0Params.instance.name = "task0";\r
+\r
+Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);\r
+\r
+/* Enable BIOS Task Scheduler */\r
+BIOS.taskEnabled                       =   true;\r
+\r
+/*\r
+ * Enable Event Groups here and registering of ISR for specific GEM INTC is done\r
+ * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs\r
+ */\r
+\r
+ECM.eventGroupHwiNum[0] = 7;\r
+ECM.eventGroupHwiNum[1] = 8;\r
+ECM.eventGroupHwiNum[2] = 9;\r
+ECM.eventGroupHwiNum[3] = 10;\r
+\r
+\r
diff --git a/realtime_demo_bios/k2g/bflinker.cmd b/realtime_demo_bios/k2g/bflinker.cmd
new file mode 100644 (file)
index 0000000..ce327af
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * bflinker.cmd: Linker command file for Beamformer
+ */
+
+SECTIONS
+{
+    .bferam:        load >> L2SRAM
+    .bfiram:        load >> L2SRAM
+    .uiaLoggerBuffers load >> EXT_RAM
+    filOutBuf0           >> EXT_RAM
+       filBuf0              >> EXT_RAM
+       filBuf1              >> EXT_RAM
+       filBuf2              >> EXT_RAM
+       filBuf3              >> EXT_RAM
+       filBuf4              >> EXT_RAM
+       filBuf5              >> EXT_RAM
+       filBuf6              >> EXT_RAM
+       filBuf7              >> EXT_RAM
+       .far                 >> EXT_RAM
+}
+/* nothing past this point */
+
diff --git a/realtime_demo_bios/k2g/build/makefile b/realtime_demo_bios/k2g/build/makefile
new file mode 100644 (file)
index 0000000..e0cabd2
--- /dev/null
@@ -0,0 +1,216 @@
+# set global environment variables\r
+SDK_INSTALL_PATH ?= C:/ti\r
+C6X_GEN_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0\r
+XDC_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/xdctools_3_32_01_22_core\r
+BIOS_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/bios_6_46_01_38\r
+UIA_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/uia_2_00_06_52\r
+XDAIS_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/xdais_7_24_00_04\r
+VOLIB_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/volib_C66_2_1_0_1\r
+AER_INSTALL_PATH ?= $(SDK_INSTALL_PATH)/aer_c64Px_obj_17_0_0_0\r
+\r
+CG_TOOL_ROOT := ${C6X_GEN_INSTALL_PATH}\r
+\r
+GEN_OPTS__FLAG := --cmd_file="configPkg/compiler.opt"\r
+GEN_CMDS__FLAG := -l"configPkg/linker.cmd"\r
+\r
+ORDERED_OBJS += \
+"./fil.obj" \
+"./mhm.obj" \
+"./mss.obj" \
+"./mssproc.obj" \
+"./sys.obj" \
+"./sysasnr.obj" \
+"./sysbf.obj" \
+"./sysbfflt.obj" \
+"./syseram.obj" \
+"./sysiram.obj" \
+"./sysmss.obj" \
+"./src/audio_dc_cfg.obj" \
+"./src/edma_cfg.obj" \
+"./src/main.obj" \
+"./src/mcasp_cfg.obj" \
+"./src/mcasp_osal.obj" \
+"./src/sample_cs.obj" \
+"./src/sample_k2g_cfg.obj" \
+"./src/sample_k2g_int_reg.obj" \
+"./src/sine.obj" \
+"./src/test_exit.obj" \
+"../src/sysbios/BIOS.obj" \
+"../src/sysbios/c62_TaskSupport_asm.obj" \
+"../src/sysbios/c64p_Exception_asm.obj" \
+"../src/sysbios/c64p_Hwi_asm.obj" \
+"../src/sysbios/c64p_Hwi_asm_switch.obj" \
+"../src/sysbios/c64p_Hwi_disp_always.obj" \
+"../src/sysbios/ti_tls_get_tp.obj" \
+"../src/sysbios/timer64_Timer_asm.obj" \
+"../bflinker.cmd" \
+$(GEN_CMDS__FLAG) \
+-llibc.a \
+-lti.addon.audk2g.ae66 \
+-lti.board.ae66 \
+-lti.drv.mcasp.ae66 \
+-laer_c.ae64P \
+-lvau/lib/vau_c.ae66 \
+-lvpe/lib/vpe_a.ae66 \
+-lvpe/lib/vpe_c.ae66 \
+-lutil/lib/util_c.ae66 \
+-lmhm/lib/mhm_c.ae66 \
+\r
+-include ../makefile.init\r
+\r
+OS := $(shell uname)\r
+ifeq ($(OS), Linux)\r
+RM := rm -f\r
+RMDIR := rm -d -f -r\r
+else\r
+RM := rm -f\r
+RMDIR := rm -r -f\r
+endif\r
+\r
+# All of the sources participating in the build are defined here\r
+-include sources.mk\r
+-include subdir_vars.mk\r
+-include src/subdir_vars.mk\r
+-include src/sysbios/subdir_vars.mk\r
+-include subdir_rules.mk\r
+-include src/subdir_rules.mk\r
+-include src/sysbios/subdir_rules.mk\r
+-include objects.mk\r
+\r
+ifneq ($(MAKECMDGOALS),clean)\r
+ifneq ($(strip $(S_DEPS)),)\r
+-include $(S_DEPS)\r
+endif\r
+ifneq ($(strip $(S_UPPER_DEPS)),)\r
+-include $(S_UPPER_DEPS)\r
+endif\r
+ifneq ($(strip $(S62_DEPS)),)\r
+-include $(S62_DEPS)\r
+endif\r
+ifneq ($(strip $(C64_DEPS)),)\r
+-include $(C64_DEPS)\r
+endif\r
+ifneq ($(strip $(ASM_DEPS)),)\r
+-include $(ASM_DEPS)\r
+endif\r
+ifneq ($(strip $(CC_DEPS)),)\r
+-include $(CC_DEPS)\r
+endif\r
+ifneq ($(strip $(SV7A_DEPS)),)\r
+-include $(SV7A_DEPS)\r
+endif\r
+ifneq ($(strip $(S55_DEPS)),)\r
+-include $(S55_DEPS)\r
+endif\r
+ifneq ($(strip $(C67_DEPS)),)\r
+-include $(C67_DEPS)\r
+endif\r
+ifneq ($(strip $(CLA_DEPS)),)\r
+-include $(CLA_DEPS)\r
+endif\r
+ifneq ($(strip $(C??_DEPS)),)\r
+-include $(C??_DEPS)\r
+endif\r
+ifneq ($(strip $(CPP_DEPS)),)\r
+-include $(CPP_DEPS)\r
+endif\r
+ifneq ($(strip $(S??_DEPS)),)\r
+-include $(S??_DEPS)\r
+endif\r
+ifneq ($(strip $(C_DEPS)),)\r
+-include $(C_DEPS)\r
+endif\r
+ifneq ($(strip $(C62_DEPS)),)\r
+-include $(C62_DEPS)\r
+endif\r
+ifneq ($(strip $(CXX_DEPS)),)\r
+-include $(CXX_DEPS)\r
+endif\r
+ifneq ($(strip $(C++_DEPS)),)\r
+-include $(C++_DEPS)\r
+endif\r
+ifneq ($(strip $(ASM_UPPER_DEPS)),)\r
+-include $(ASM_UPPER_DEPS)\r
+endif\r
+ifneq ($(strip $(K_DEPS)),)\r
+-include $(K_DEPS)\r
+endif\r
+ifneq ($(strip $(C43_DEPS)),)\r
+-include $(C43_DEPS)\r
+endif\r
+ifneq ($(strip $(INO_DEPS)),)\r
+-include $(INO_DEPS)\r
+endif\r
+ifneq ($(strip $(S67_DEPS)),)\r
+-include $(S67_DEPS)\r
+endif\r
+ifneq ($(strip $(SA_DEPS)),)\r
+-include $(SA_DEPS)\r
+endif\r
+ifneq ($(strip $(S43_DEPS)),)\r
+-include $(S43_DEPS)\r
+endif\r
+ifneq ($(strip $(OPT_DEPS)),)\r
+-include $(OPT_DEPS)\r
+endif\r
+ifneq ($(strip $(PDE_DEPS)),)\r
+-include $(PDE_DEPS)\r
+endif\r
+ifneq ($(strip $(S64_DEPS)),)\r
+-include $(S64_DEPS)\r
+endif\r
+ifneq ($(strip $(C_UPPER_DEPS)),)\r
+-include $(C_UPPER_DEPS)\r
+endif\r
+ifneq ($(strip $(C55_DEPS)),)\r
+-include $(C55_DEPS)\r
+endif\r
+endif\r
+\r
+-include ../makefile.defs\r
+\r
+# Add inputs and outputs from these tool invocations to the build variables \r
+EXE_OUTPUTS += \
+audioAnalogLoopbackTest.out \
+\r
+EXE_OUTPUTS__QUOTED += \
+"audioAnalogLoopbackTest.out" \
+\r
+BIN_OUTPUTS += \
+audioAnalogLoopbackTest.hex \
+\r
+BIN_OUTPUTS__QUOTED += \
+"audioAnalogLoopbackTest.hex" \
+\r
+\r
+# All Target\r
+all: audioAnalogLoopbackTest.out\r
+\r
+# Tool invocations\r
+audioAnalogLoopbackTest.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)\r
+       @echo 'Building target: $@'\r
+       @echo 'Invoking: C6000 Linker'\r
+       "$(C6X_GEN_INSTALL_PATH)/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number -z -m"audioAnalogLoopbackTest.map" --stack_size=0x2000 -i"${C6X_GEN_INSTALL_PATH}/lib" -i"${C6X_GEN_INSTALL_PATH}/include" -i"C:/ti/pdk_k2g_1_0_4/packages/ti/board/lib/evmK2G/c66/release" -i"C:/ti/pdk_k2g_1_0_4/packages/ti/addon/audk2g/lib/k2g/c66/release" -i"C:/ti/pdk_k2g_1_0_4/packages/ti/drv/mcasp/lib/k2g/c66/release" -i"C:/ti/aer_c64Px_obj_17_0_0_0/packages/ti/mas/aer/lib" -i"C:/ti/volib_C66_2_1_0_1/packages/ti/mas/" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="audioAnalogLoopbackTest_linkInfo.xml" --rom_model -o "audioAnalogLoopbackTest.out" $(ORDERED_OBJS)\r
+       @echo 'Finished building target: $@'\r
+       @echo ' '\r
+\r
+audioAnalogLoopbackTest.hex: $(EXE_OUTPUTS)\r
+       @echo 'Invoking: C6000 Hex Utility'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/hex6x"  -o "audioAnalogLoopbackTest.hex" $(EXE_OUTPUTS__QUOTED)\r
+       @echo 'Finished building: $@'\r
+       @echo ' '\r
+\r
+# Other Targets\r
+clean:\r
+       -$(RM) $(GEN_MISC_FILES__QUOTED)$(EXE_OUTPUTS__QUOTED)$(GEN_FILES__QUOTED)$(BIN_OUTPUTS__QUOTED)$(GEN_OPTS__QUOTED)$(GEN_CMDS__QUOTED)\r
+       -$(RMDIR) $(GEN_MISC_DIRS__QUOTED)\r
+       -$(RM) "fil.d" "mhm.d" "mss.d" "mssproc.d" "sys.d" "sysasnr.d" "sysbf.d" "sysbfflt.d" "syseram.d" "sysiram.d" "sysmss.d" "src\audio_dc_cfg.d" "src\edma_cfg.d" "src\main.d" "src\mcasp_cfg.d" "src\mcasp_osal.d" "src\sample_cs.d" "src\sample_k2g_cfg.d" "src\sample_k2g_int_reg.d" "src\sine.d" "src\test_exit.d" \r
+       -$(RM) "fil.obj" "mhm.obj" "mss.obj" "mssproc.obj" "sys.obj" "sysasnr.obj" "sysbf.obj" "sysbfflt.obj" "syseram.obj" "sysiram.obj" "sysmss.obj" "src\audio_dc_cfg.obj" "src\edma_cfg.obj" "src\main.obj" "src\mcasp_cfg.obj" "src\mcasp_osal.obj" "src\sample_cs.obj" "src\sample_k2g_cfg.obj" "src\sample_k2g_int_reg.obj" "src\sine.obj" "src\test_exit.obj" \r
+       -@echo 'Finished clean'\r
+       -@echo ' '\r
+\r
+.PHONY: all clean dependents\r
+.SECONDARY:\r
+\r
+-include ../makefile.targets\r
+\r
diff --git a/realtime_demo_bios/k2g/build/objects.mk b/realtime_demo_bios/k2g/build/objects.mk
new file mode 100644 (file)
index 0000000..ba12ef3
--- /dev/null
@@ -0,0 +1,8 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+USER_OBJS :=\r
+\r
+LIBS := -llibc.a -lti.addon.audk2g.ae66 -lti.board.ae66 -lti.drv.mcasp.ae66 -laer_c.ae64P -lvau/lib/vau_c.ae66 -lvpe/lib/vpe_a.ae66 -lvpe/lib/vpe_c.ae66 -lutil/lib/util_c.ae66 -lmhm/lib/mhm_c.ae66\r
+\r
diff --git a/realtime_demo_bios/k2g/build/sources.mk b/realtime_demo_bios/k2g/build/sources.mk
new file mode 100644 (file)
index 0000000..e8389c3
--- /dev/null
@@ -0,0 +1,129 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+O_SRCS := \r
+CPP_SRCS := \r
+K_SRCS := \r
+LD_SRCS := \r
+S67_SRCS := \r
+LDS_SRCS := \r
+CMD_SRCS := \r
+EXE_SRCS := \r
+CXX_SRCS := \r
+CMD_UPPER_SRCS := \r
+ELF_SRCS := \r
+C43_SRCS := \r
+S55_SRCS := \r
+LD_UPPER_SRCS := \r
+C62_SRCS := \r
+S_UPPER_SRCS := \r
+CFG_SRCS := \r
+A_SRCS := \r
+SA_SRCS := \r
+C55_SRCS := \r
+LDS_UPPER_SRCS := \r
+C_UPPER_SRCS := \r
+OUT_SRCS := \r
+INO_SRCS := \r
+CFG_UPPER_SRCS := \r
+OBJ_SRCS := \r
+S62_SRCS := \r
+LIB_SRCS := \r
+PDE_SRCS := \r
+SV7A_SRCS := \r
+ASM_SRCS := \r
+ASM_UPPER_SRCS := \r
+C++_SRCS := \r
+CLA_SRCS := \r
+S??_SRCS := \r
+C_SRCS := \r
+C67_SRCS := \r
+S_SRCS := \r
+S43_SRCS := \r
+OPT_SRCS := \r
+C64_SRCS := \r
+CC_SRCS := \r
+C??_SRCS := \r
+S64_SRCS := \r
+OBJS := \r
+BIN_OUTPUTS := \r
+S_DEPS := \r
+S_UPPER_DEPS := \r
+S62_DEPS := \r
+GEN_MISC_FILES := \r
+C64_DEPS := \r
+ASM_DEPS := \r
+CC_DEPS := \r
+SV7A_DEPS := \r
+S55_DEPS := \r
+C67_DEPS := \r
+CLA_DEPS := \r
+C??_DEPS := \r
+CPP_DEPS := \r
+S??_DEPS := \r
+C_DEPS := \r
+C62_DEPS := \r
+EXE_OUTPUTS := \r
+GEN_MISC_DIRS := \r
+GEN_CMDS := \r
+CXX_DEPS := \r
+C++_DEPS := \r
+GEN_OPTS := \r
+ASM_UPPER_DEPS := \r
+K_DEPS := \r
+C43_DEPS := \r
+INO_DEPS := \r
+S67_DEPS := \r
+SA_DEPS := \r
+S43_DEPS := \r
+OPT_DEPS := \r
+PDE_DEPS := \r
+S64_DEPS := \r
+GEN_FILES := \r
+C_UPPER_DEPS := \r
+C55_DEPS := \r
+CPP_DEPS__QUOTED := \r
+C67_DEPS__QUOTED := \r
+INO_DEPS__QUOTED := \r
+C??_DEPS__QUOTED := \r
+S_UPPER_DEPS__QUOTED := \r
+CLA_DEPS__QUOTED := \r
+ASM_UPPER_DEPS__QUOTED := \r
+C62_DEPS__QUOTED := \r
+CXX_DEPS__QUOTED := \r
+GEN_MISC_FILES__QUOTED := \r
+EXE_OUTPUTS__QUOTED := \r
+S67_DEPS__QUOTED := \r
+GEN_FILES__QUOTED := \r
+BIN_OUTPUTS__QUOTED := \r
+GEN_MISC_DIRS__QUOTED := \r
+C_DEPS__QUOTED := \r
+GEN_OPTS__QUOTED := \r
+C_UPPER_DEPS__QUOTED := \r
+OPT_DEPS__QUOTED := \r
+S_DEPS__QUOTED := \r
+K_DEPS__QUOTED := \r
+S??_DEPS__QUOTED := \r
+C64_DEPS__QUOTED := \r
+GEN_CMDS__QUOTED := \r
+C++_DEPS__QUOTED := \r
+OBJS__QUOTED := \r
+CC_DEPS__QUOTED := \r
+S43_DEPS__QUOTED := \r
+S55_DEPS__QUOTED := \r
+SA_DEPS__QUOTED := \r
+C55_DEPS__QUOTED := \r
+PDE_DEPS__QUOTED := \r
+C43_DEPS__QUOTED := \r
+S62_DEPS__QUOTED := \r
+ASM_DEPS__QUOTED := \r
+SV7A_DEPS__QUOTED := \r
+S64_DEPS__QUOTED := \r
+\r
+# Every subdirectory with source files must be described here\r
+SUBDIRS := \
+. \
+src \
+src/sysbios \
+\r
diff --git a/realtime_demo_bios/k2g/build/src/subdir_rules.mk b/realtime_demo_bios/k2g/build/src/subdir_rules.mk
new file mode 100644 (file)
index 0000000..10f9f92
--- /dev/null
@@ -0,0 +1,76 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+# Each subdirectory must supply rules for building sources it contributes\r
+src/audio_dc_cfg.obj: ../../../realtime_demo_bios/k2g/src/audio_dc_cfg.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/audio_dc_cfg.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/edma_cfg.obj: ../../../realtime_demo_bios/k2g/src/edma_cfg.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/edma_cfg.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/main.obj: ../../../realtime_demo_bios/k2g/src/main.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/main.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/mcasp_cfg.obj: ../../../realtime_demo_bios/k2g/src/mcasp_cfg.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/mcasp_cfg.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/mcasp_osal.obj: ../../../realtime_demo_bios/k2g/src/mcasp_osal.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/mcasp_osal.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/sample_cs.obj: ../../../realtime_demo_bios/k2g/src/sample_cs.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/sample_cs.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/sample_k2g_cfg.obj: ../../../realtime_demo_bios/k2g/src/sample_k2g_cfg.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/sample_k2g_cfg.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/sample_k2g_int_reg.obj: ../../../realtime_demo_bios/k2g/src/sample_k2g_int_reg.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/sample_k2g_int_reg.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/sine.obj: ../../../realtime_demo_bios/k2g/src/sine.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/sine.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+src/test_exit.obj: ../../../realtime_demo_bios/k2g/src/test_exit.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${EDMA3LLD_BIOS6_INSTALLDIR}/packages" --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="src/test_exit.d" --obj_directory="src" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+\r
diff --git a/realtime_demo_bios/k2g/build/src/subdir_vars.mk b/realtime_demo_bios/k2g/build/src/subdir_vars.mk
new file mode 100644 (file)
index 0000000..dfd6442
--- /dev/null
@@ -0,0 +1,78 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+# Add inputs and outputs from these tool invocations to the build variables \r
+C_SRCS += \
+../src/audio_dc_cfg.c \
+../src/edma_cfg.c \
+../src/main.c \
+../src/mcasp_cfg.c \
+../src/mcasp_osal.c \
+../src/sample_cs.c \
+../src/sample_k2g_cfg.c \
+../src/sample_k2g_int_reg.c \
+../src/sine.c \
+../src/test_exit.c \r
+\r
+OBJS += \
+./src/audio_dc_cfg.obj \
+./src/edma_cfg.obj \
+./src/main.obj \
+./src/mcasp_cfg.obj \
+./src/mcasp_osal.obj \
+./src/sample_cs.obj \
+./src/sample_k2g_cfg.obj \
+./src/sample_k2g_int_reg.obj \
+./src/sine.obj \
+./src/test_exit.obj \r
+\r
+C_DEPS += \
+./src/audio_dc_cfg.d \
+./src/edma_cfg.d \
+./src/main.d \
+./src/mcasp_cfg.d \
+./src/mcasp_osal.d \
+./src/sample_cs.d \
+./src/sample_k2g_cfg.d \
+./src/sample_k2g_int_reg.d \
+./src/sine.d \
+./src/test_exit.d \r
+\r
+C_DEPS__QUOTED += \
+"src\audio_dc_cfg.d" \
+"src\edma_cfg.d" \
+"src\main.d" \
+"src\mcasp_cfg.d" \
+"src\mcasp_osal.d" \
+"src\sample_cs.d" \
+"src\sample_k2g_cfg.d" \
+"src\sample_k2g_int_reg.d" \
+"src\sine.d" \
+"src\test_exit.d" \r
+\r
+OBJS__QUOTED += \
+"src\audio_dc_cfg.obj" \
+"src\edma_cfg.obj" \
+"src\main.obj" \
+"src\mcasp_cfg.obj" \
+"src\mcasp_osal.obj" \
+"src\sample_cs.obj" \
+"src\sample_k2g_cfg.obj" \
+"src\sample_k2g_int_reg.obj" \
+"src\sine.obj" \
+"src\test_exit.obj" \r
+\r
+C_SRCS__QUOTED += \
+"../src/audio_dc_cfg.c" \
+"../src/edma_cfg.c" \
+"../src/main.c" \
+"../src/mcasp_cfg.c" \
+"../src/mcasp_osal.c" \
+"../src/sample_cs.c" \
+"../src/sample_k2g_cfg.c" \
+"../src/sample_k2g_int_reg.c" \
+"../src/sine.c" \
+"../src/test_exit.c" \r
+\r
+\r
diff --git a/realtime_demo_bios/k2g/build/src/sysbios/subdir_rules.mk b/realtime_demo_bios/k2g/build/src/sysbios/subdir_rules.mk
new file mode 100644 (file)
index 0000000..96e2e82
--- /dev/null
@@ -0,0 +1,6 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+# Each subdirectory must supply rules for building sources it contributes\r
+\r
diff --git a/realtime_demo_bios/k2g/build/src/sysbios/subdir_vars.mk b/realtime_demo_bios/k2g/build/src/sysbios/subdir_vars.mk
new file mode 100644 (file)
index 0000000..61d32b3
--- /dev/null
@@ -0,0 +1,16 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+# Add inputs and outputs from these tool invocations to the build variables \r
+OBJ_SRCS += \
+../src/sysbios/BIOS.obj \
+../src/sysbios/c62_TaskSupport_asm.obj \
+../src/sysbios/c64p_Exception_asm.obj \
+../src/sysbios/c64p_Hwi_asm.obj \
+../src/sysbios/c64p_Hwi_asm_switch.obj \
+../src/sysbios/c64p_Hwi_disp_always.obj \
+../src/sysbios/ti_tls_get_tp.obj \
+../src/sysbios/timer64_Timer_asm.obj \r
+\r
+\r
diff --git a/realtime_demo_bios/k2g/build/subdir_rules.mk b/realtime_demo_bios/k2g/build/subdir_rules.mk
new file mode 100644 (file)
index 0000000..48eb15f
--- /dev/null
@@ -0,0 +1,93 @@
+################################################################################\r
+# Automatically-generated file. Do not edit!\r
+################################################################################\r
+\r
+# Each subdirectory must supply rules for building sources it contributes\r
+configPkg/linker.cmd: ../audioAnalogLoopbackTest.cfg\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: XDCtools'\r
+       "${XDC_INSTALL_PATH}/xs" --xdcpath="${EDMA3LLD_BIOS6_INSTALLDIR}/packages;C:/ti/ccsv6/ccs_base;${BIOS_INSTALL_PATH}/packages;${UIA_INSTALL_PATH}/packages;${PDK_INSTALL_PATH};${AER_INSTALL_PATH}/packages;${VOLIB_INSTALL_PATH}/packages;${XDAIS_INSTALL_PATH}/packages;${XDAIS_INSTALL_PATH}/examples;../../../realtime_demo_bios/platforms/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p evmTCI66AK2G02Custom -r debug -c "${C6X_GEN_INSTALL_PATH}" "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+configPkg/compiler.opt: | configPkg/linker.cmd\r
+configPkg/: | configPkg/linker.cmd\r
+\r
+fil.obj: ../../../common/components/fil.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="fil.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+mhm.obj: ../../../common/components/mhm/src/mhm.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="mhm.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+mss.obj: ../../../common/components/mss/src/mss.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="mss.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+mssproc.obj: ../../../common/components/mss/src/mssproc.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="mssproc.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+sys.obj: ../../../common/components/sys.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="sys.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+sysasnr.obj: ../../../common/components/sysasnr.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="sysasnr.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+sysbf.obj: ../../../common/components/sysbf.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="sysbf.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+sysbfflt.obj: ../../../common/components/sysbfflt.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="sysbfflt.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+syseram.obj: ../../../common/components/syseram.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="syseram.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+sysiram.obj: ../../../common/components/sysiram.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="sysiram.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+sysmss.obj: ../../../common/components/sysmss.c $(GEN_OPTS) $(GEN_HDRS)\r
+       @echo 'Building file: $<'\r
+       @echo 'Invoking: C6000 Compiler'\r
+       "${C6X_GEN_INSTALL_PATH}/bin/cl6x" -mv6600 --abi=eabi --opt_for_speed=5 --include_path="${C6X_GEN_INSTALL_PATH}/include" --include_path="${PDK_INSTALL_PATH}/ti/board/diag/nand/src" --include_path="../../../realtime_demo_bios/k2g/include" --include_path="../../../common/components" --include_path="${PDK_INSTALL_PATH}/ti/drv/mcasp" --include_path="${PDK_INSTALL_PATH}/ti/board" --include_path="${PDK_INSTALL_PATH}/ti/board/src/evmK2G/include" --include_path="${PDK_INSTALL_PATH}/ti/addon/audk2g/include" --include_path="${PDK_INSTALL_PATH}" --include_path="${PDK_INSTALL_PATH}/ti/csl" -g --define=DEVICE_K2G --define=SOC_K2G --define=evmK2G --define=PLATFORM_INIT_IN --define=BUILD_DSP --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="sysmss.d" $(GEN_OPTS__FLAG) "$<"\r
+       @echo 'Finished building: $<'\r
+       @echo ' '\r
+\r
+\r
diff --git a/realtime_demo_bios/k2g/build/subdir_vars.mk b/realtime_demo_bios/k2g/build/subdir_vars.mk
new file mode 100644 (file)
index 0000000..6fa9ea3
--- /dev/null
@@ -0,0 +1,110 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+CMD_SRCS += \
+../bflinker.cmd 
+
+CFG_SRCS += \
+../audioAnalogLoopbackTest.cfg 
+
+C_SRCS += \
+../../../common/components/fil.c \
+../../../common/components/mhm/src/mhm.c \
+../../../common/components/mss/src/mss.c \
+../../../common/components/mss/src/mssproc.c \
+../../../common/components/sys.c \
+../../../common/components/sysasnr.c \
+../../../common/components/sysbf.c \
+../../../common/components/sysbfflt.c \
+../../../common/components/syseram.c \
+../../../common/components/sysiram.c \
+../../../common/components/sysmss.c 
+
+OBJS += \
+./fil.obj \
+./mhm.obj \
+./mss.obj \
+./mssproc.obj \
+./sys.obj \
+./sysasnr.obj \
+./sysbf.obj \
+./sysbfflt.obj \
+./syseram.obj \
+./sysiram.obj \
+./sysmss.obj 
+
+C_DEPS += \
+./fil.d \
+./mhm.d \
+./mss.d \
+./mssproc.d \
+./sys.d \
+./sysasnr.d \
+./sysbf.d \
+./sysbfflt.d \
+./syseram.d \
+./sysiram.d \
+./sysmss.d 
+
+GEN_MISC_DIRS += \
+./configPkg/ 
+
+GEN_CMDS += \
+./configPkg/linker.cmd 
+
+GEN_OPTS += \
+./configPkg/compiler.opt 
+
+GEN_FILES += \
+./configPkg/linker.cmd \
+./configPkg/compiler.opt 
+
+GEN_FILES__QUOTED += \
+"configPkg\linker.cmd" \
+"configPkg\compiler.opt" 
+
+GEN_MISC_DIRS__QUOTED += \
+"configPkg\" 
+
+C_DEPS__QUOTED += \
+"fil.d" \
+"mhm.d" \
+"mss.d" \
+"mssproc.d" \
+"sys.d" \
+"sysasnr.d" \
+"sysbf.d" \
+"sysbfflt.d" \
+"syseram.d" \
+"sysiram.d" \
+"sysmss.d" 
+
+OBJS__QUOTED += \
+"fil.obj" \
+"mhm.obj" \
+"mss.obj" \
+"mssproc.obj" \
+"sys.obj" \
+"sysasnr.obj" \
+"sysbf.obj" \
+"sysbfflt.obj" \
+"syseram.obj" \
+"sysiram.obj" \
+"sysmss.obj" 
+
+C_SRCS__QUOTED += \
+"../../../common/components/fil.c" \
+"../../../common/components/mhm/src/mhm.c" \
+"../../../common/components/mss/src/mss.c" \
+"../../../common/components/mss/src/mssproc.c" \
+"../../../common/components/sys.c" \
+"../../../common/components/sysasnr.c" \
+"../../../common/components/sysbf.c" \
+"../../../common/components/sysbfflt.c" \
+"../../../common/components/syseram.c" \
+"../../../common/components/sysiram.c" \
+"../../../common/components/sysmss.c" 
+
+
diff --git a/realtime_demo_bios/k2g/include/analog_test.h b/realtime_demo_bios/k2g/include/analog_test.h
new file mode 100644 (file)
index 0000000..7bc559a
--- /dev/null
@@ -0,0 +1,100 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      analog_test.h\r
+ *\r
+ * \brief     Common header file for audio analog test\r
+ *\r
+ */\r
+\r
+#ifndef _ANALOG_TEST_H_\r
+#define _ANALOG_TEST_H_\r
+\r
+#include <audk2g.h>\r
+\r
+#include <xdc/std.h>\r
+#include <xdc/runtime/Memory.h>\r
+#include <xdc/runtime/IHeap.h>\r
+#include <xdc/runtime/Error.h>\r
+#include <xdc/runtime/Log.h>\r
+#include <xdc/runtime/System.h>\r
+\r
+#include <ti/sysbios/io/GIO.h>\r
+#include <ti/sysbios/io/IOM.h>\r
+#include <ti/sysbios/heaps/HeapMem.h>\r
+#include <ti/sysbios/BIOS.h>\r
+#include <ti/sysbios/knl/Semaphore.h>\r
+#include <ti/sdo/edma3/drv/edma3_drv.h>\r
+#include <ti/sysbios/knl/Task.h>\r
+#include <ti/sysbios/hal/Cache.h>\r
+#include <ti/sysbios/family/c64p/Hwi.h>\r
+\r
+#include <stdio.h>\r
+\r
+#include <mcasp_drv.h>\r
+#include <include/McaspLocal.h>\r
+\r
+#include "audk2g_audio.h"\r
+#include "audio_dc_cfg.h"\r
+#include "mcasp_cfg.h"\r
+#include "edma_cfg.h"\r
+\r
+/**\r
+ *  \brief    Configures audio DAC module\r
+ *\r
+ *  \return    none\r
+ */\r
+void configAudioDAC(void);\r
+\r
+/**\r
+ *  \brief   Function to exit the test\r
+ *\r
+ *  \return    None\r
+ */\r
+void testRet(uint32_t status);\r
+\r
+/**\r
+ *  \brief    Function to exit the test\r
+ *\r
+ *  This function should be called by standalone diagnostic\r
+ *  tests at the end of the test to return to diagnostic test framework\r
+ *\r
+ *  \param result [IN]  Test result\r
+ *                      0 - Test Pass\r
+ *                      1 - Test Fail\r
+ *\r
+ */\r
+void testExit(int result);\r
+\r
+#endif /* _ANALOG_TEST_H_ */\r
diff --git a/realtime_demo_bios/k2g/include/audio_dc_cfg.h b/realtime_demo_bios/k2g/include/audio_dc_cfg.h
new file mode 100644 (file)
index 0000000..36c9132
--- /dev/null
@@ -0,0 +1,98 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      audio_dc_cfg.h\r
+ *\r
+ * \brief     Audio daughter card configuration header file\r
+ *\r
+ */\r
+\r
+#ifndef _AUDIO_DC_CFG_H_\r
+#define _AUDIO_DC_CFG_H_\r
+\r
+#include "analog_test.h"\r
+\r
+typedef struct _AdcConfig\r
+{\r
+       uint8_t          gain;\r
+       Audk2gAdcLeftInputMux  adc1LMux;\r
+       Audk2gAdcLeftInputMux  adc2LMux;\r
+       Audk2gAdcRightInputMux adc1RMux;\r
+       Audk2gAdcRightInputMux adc2RMux;\r
+       Audk2gAdcRxWordLen     wlen;\r
+       Audk2gAdcDataFormat    format;\r
+       uint8_t          intEnable;\r
+} Audk2gAdcConfig;\r
+\r
+typedef struct _DacConfig\r
+{\r
+       Audk2gDacAmuteCtrl    amuteCtrl;\r
+       uint8_t         amuteEnable;\r
+       Audk2gDacSamplingMode samplingMode;\r
+       Audk2gDacDataFormat   dataFormat;\r
+       uint8_t         softMuteEnable;\r
+       Audk2gDacAttnMode     attnMode;\r
+       Audk2gDacDeempCtrl    deempCtrl;\r
+       uint8_t         volume;\r
+} Audk2gDacConfig;\r
+\r
+/**\r
+ *  \brief    Initializes ADC module\r
+ *\r
+ *  This function initializes and configures the ADC modules\r
+ *  on audio daughter card\r
+ *\r
+ *  \param     devId  [IN]  ADC Device Id\r
+ *  \param     config [IN]  ADC configuration parameters\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS audioAdcConfig(Audk2gAdcDevId  devId, Audk2gAdcConfig *config);\r
+\r
+/**\r
+ *  \brief    Initializes DAC module\r
+ *\r
+ *  This function initializes and configures the DAC modules\r
+ *  on audio daughter card\r
+ *\r
+ *  \param     devId  [IN]  DAC Device Id\r
+ *  \param     config [IN]  DAC configuration parameters\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS audioDacConfig(Audk2gDacDevId devId, Audk2gDacConfig *config);\r
+\r
+#endif /* _AUDIO_DC_CFG_H_ */\r
+\r
+/* Nothing past this point */\r
diff --git a/realtime_demo_bios/k2g/include/edma_cfg.h b/realtime_demo_bios/k2g/include/edma_cfg.h
new file mode 100644 (file)
index 0000000..9ddb70c
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      edma_cfg.h\r
+ *\r
+ * \brief     eDMA configuration header file\r
+ *\r
+ */\r
+\r
+#ifndef _EDMA_CFG_H_\r
+#define _EDMA_CFG_H_\r
+\r
+#include "analog_test.h"\r
+\r
+/**\r
+ *  \brief    Configures eDMA module\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS eDmaConfig(void);\r
+\r
+#endif /* _EDMA_CFG_H_ */\r
+\r
+/* Nothing past this point */\r
diff --git a/realtime_demo_bios/k2g/include/mcasp_cfg.h b/realtime_demo_bios/k2g/include/mcasp_cfg.h
new file mode 100644 (file)
index 0000000..e6e221a
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      mcasp_config.h\r
+ *\r
+ * \brief     McASP configuration header file\r
+ *\r
+ */\r
+\r
+#ifndef _MCASP_CONFIG_H_\r
+#define _MCASP_CONFIG_H_\r
+\r
+#include "analog_test.h"\r
+\r
+/*\r
+ * Buffers placed in external memory are aligned on a 128 bytes boundary.\r
+ * In addition, the buffer should be of a size multiple of 128 bytes for\r
+ * the cache work optimally on the C6x.\r
+ */\r
+#define BUFLEN                  (960)         /* Number of samples in the frame */\r
+#define BUFALIGN                (128) /* Alignment of buffer for use of L2 cache */\r
+\r
+/** Number of serializers configured for Rx */\r
+#define RX_NUM_SERIALIZER       (4u)\r
+/** Number of serializers configured for Tx */\r
+#define TX_NUM_SERIALIZER       (1u)\r
+\r
+/** Size of the McASP serializer buffers */\r
+#define BUFSIZE                 (BUFLEN * sizeof(Ptr))\r
+\r
+/** Num Bufs to be issued and reclaimed */\r
+#define NUM_BUFS                2\r
+\r
+/**\r
+ *  \brief   Configures McASP module and creates the channel\r
+ *           for audio Tx and Rx\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS mcaspAudioConfig(void);\r
+\r
+#endif /* _MCASP_CONFIG_H_ */\r
diff --git a/realtime_demo_bios/k2g/src/.exclude b/realtime_demo_bios/k2g/src/.exclude
new file mode 100644 (file)
index 0000000..8c86331
--- /dev/null
@@ -0,0 +1 @@
+This file exists to prevent Eclipse/CDT from adding the C sources contained in this directory (or below) to any enclosing project.
diff --git a/realtime_demo_bios/k2g/src/audio_dc_cfg.c b/realtime_demo_bios/k2g/src/audio_dc_cfg.c
new file mode 100644 (file)
index 0000000..eff6a45
--- /dev/null
@@ -0,0 +1,237 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      audio_dc_config.c\r
+ *\r
+ * \brief     Configures Audio daughter card HW modules\r
+ *\r
+ */\r
+\r
+#include "audio_dc_cfg.h"\r
+\r
+/**\r
+ *  \brief    Initializes ADC module\r
+ *\r
+ *  This function initializes and configures the ADC modules\r
+ *  on audio daughter card\r
+ *\r
+ *  \param     devId  [IN]  ADC Device Id\r
+ *  \param     config [IN]  ADC configuration parameters\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS audioAdcConfig(Audk2gAdcDevId  devId, Audk2gAdcConfig *config)\r
+{\r
+       Audk2g_STATUS status;\r
+\r
+       if(config == NULL)\r
+       {\r
+               IFPRINT(audk2g_write("Invalid Inputs\n"));\r
+               return (Audk2g_EINVALID);\r
+       }\r
+\r
+       /* Initialize all the HW instances of ADC */\r
+       //status = platformAudioAdcInit(devId);\r
+       status = (Audk2g_STATUS)audk2g_AudioAdcInit((Audk2gAdcDevId)devId);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformaudioAdcConfig Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Set ADC channel gain */\r
+       //status = platformAudioAdcSetGain(devId, ADC_CH_ALL, config->gain);\r
+    status = (Audk2g_STATUS)audk2g_AudioAdcSetGain((Audk2gAdcDevId)devId, (Audk2gAdcChanId)AUDK2G_ADC_CH_ALL, config->gain);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcSetGain Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Configure Left input mux for ADC1L */\r
+       //status = platformAudioAdcSetLeftInputMux(devId, ADC_CH1_LEFT, config->adc1LMux);\r
+    status = (Audk2g_STATUS)audk2g_AudioAdcSetLeftInputMux((Audk2gAdcDevId)devId, (Audk2gAdcChanId)AUDK2G_ADC_CH1_LEFT, (Audk2gAdcLeftInputMux)(config->adc1LMux));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcSetLeftInputMux Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Configure Left input mux for ADC2L*/\r
+       //status = platformAudioAdcSetLeftInputMux(devId, ADC_CH2_LEFT, config->adc2LMux);\r
+       status = (Audk2g_STATUS)audk2g_AudioAdcSetLeftInputMux((Audk2gAdcDevId)devId, (Audk2gAdcChanId)AUDK2G_ADC_CH2_LEFT, (Audk2gAdcLeftInputMux)(config->adc2LMux));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcSetLeftInputMux Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Configure Right input mux for ADC1R */\r
+       //status = platformAudioAdcSetRightInputMux(devId, ADC_CH1_RIGHT, config->adc1RMux);\r
+    status = (Audk2g_STATUS)audk2g_AudioAdcSetRightInputMux((Audk2gAdcDevId)devId, (Audk2gAdcChanId)AUDK2G_ADC_CH1_RIGHT, (Audk2gAdcRightInputMux)(config->adc1RMux));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcSetRightInputMux Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Configure Right input mux for ADC2R */\r
+       //status = platformAudioAdcSetRightInputMux(devId, ADC_CH2_RIGHT, config->adc2RMux);\r
+    status = (Audk2g_STATUS)audk2g_AudioAdcSetRightInputMux((Audk2gAdcDevId)devId, (Audk2gAdcChanId)AUDK2G_ADC_CH2_RIGHT, (Audk2gAdcRightInputMux)(config->adc2RMux));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcSetRightInputMux Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Configure audio data format */\r
+    //status = platformAudioAdcDataConfig(devId, config->wlen, config->format);\r
+       status = (Audk2g_STATUS)audk2g_AudioAdcDataConfig((Audk2gAdcDevId)devId, (Audk2gAdcRxWordLen)(config->wlen), (Audk2gAdcDataFormat)(config->format));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcDataConfig Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Configure all the interrupts */\r
+       //status = platformAudioAdcConfigIntr(devId, ADC_INTR_ALL, config->intEnable);\r
+    status = (Audk2g_STATUS)audk2g_AudioAdcConfigIntr((Audk2gAdcDevId)devId, (Audk2gAdcIntr)AUDK2G_ADC_INTR_ALL, config->intEnable);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioAdcConfig : platformAudioAdcConfigIntr Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       return (status);\r
+}\r
+\r
+/**\r
+ *  \brief    Initializes DAC module\r
+ *\r
+ *  This function initializes and configures the DAC modules\r
+ *  on audio daughter card\r
+ *\r
+ *  \param     devId  [IN]  DAC Device Id\r
+ *  \param     config [IN]  DAC configuration parameters\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+#if AUDK2G_AUDIO_DAC\r
+Audk2g_STATUS audioDacConfig(Audk2gDacDevId devId, Audk2gDacConfig *config)\r
+{\r
+       Audk2g_STATUS status;\r
+\r
+       if(config == NULL)\r
+       {\r
+               IFPRINT(audk2g_write("Invalid Inputs\n"));\r
+               return (Audk2g_EINVALID);\r
+       }\r
+\r
+       /* Initialize Audio DAC */\r
+       //status = platformAudioDacInit(devId);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacInit((Audk2gDacDevId)devId);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformaudioDacConfig Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+#if 0\r
+       /* Configure AMUTE control event */\r
+       //status = platformAudioDacAmuteCtrl(devId, config->amuteCtrl, config->amuteEnable);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacAmuteCtrl((Audk2gDacDevId)devId, (Audk2gDacAmuteCtrl)(config->amuteCtrl), config->amuteEnable);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacAmuteCtrl Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Set sampling mode */\r
+       //status = platformAudioDacSetSamplingMode(devId, config->samplingMode);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacSetSamplingMode((Audk2gDacDevId)devId, (Audk2gDacSamplingMode)(config->samplingMode));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacSetSamplingMode Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Set data format */\r
+       //status = platformAudioDacSetDataFormat(devId, config->dataFormat);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacSetDataFormat((Audk2gDacDevId)devId, (Audk2gDacDataFormat)(config->dataFormat));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacSetDataFormat Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Enable soft mute control */\r
+       //status = platformAudioDacSoftMuteCtrl(devId, DAC_CHAN_ALL, config->softMuteEnable);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacSoftMuteCtrl((Audk2gDacDevId)devId, (Audk2gDacChanId)AUDK2G_DAC_CHAN_ALL, config->softMuteEnable);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacSoftMuteCtrl Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Set attenuation mode */\r
+       //status = platformAudioDacSetAttnMode(devId, config->attnMode);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacSetAttnMode((Audk2gDacDevId)devId, (Audk2gDacAttnMode)(config->attnMode));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacSetAttnMode Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Set De-emphasis control */\r
+       //status = platformAudioDacDeempCtrl(devId, config->deempCtrl);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacDeempCtrl((Audk2gDacDevId)devId, (Audk2gDacDeempCtrl)(config->deempCtrl));\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacDeempCtrl Failed\n"));\r
+               return (status);\r
+       }\r
+\r
+       /* Set DAC volume */\r
+       //status = platformAudioDacSetVolume(devId, DAC_CHAN_ALL, config->volume);\r
+    status = (Audk2g_STATUS)audk2g_AudioDacSetVolume((Audk2gDacDevId)devId, (Audk2gDacChanId)AUDK2G_DAC_CHAN_ALL, config->volume);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("audioDacConfig : platformAudioDacSetVolume Failed\n"));\r
+               return (status);\r
+       }\r
+#endif\r
+       return (status);\r
+}\r
+#endif\r
+/* Nothing past this point */\r
diff --git a/realtime_demo_bios/k2g/src/edma_cfg.c b/realtime_demo_bios/k2g/src/edma_cfg.c
new file mode 100644 (file)
index 0000000..f242c75
--- /dev/null
@@ -0,0 +1,247 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      edma_config.c\r
+ *\r
+ * \brief     Initializes eDMA module\r
+ *\r
+ */\r
+\r
+#include "edma_cfg.h"\r
+\r
+#include <ti/sysbios/knl/Semaphore.h>\r
+#include <ti/sysbios/family/c64p/EventCombiner.h>\r
+#include <ti/sdo/edma3/rm/sample/bios6_edma3_rm_sample.h>\r
+\r
+/** @brief EDMA3 Driver Instance specific Semaphore handle */\r
+extern EDMA3_OS_Sem_Handle semHandle[];\r
+\r
+/**  To Register the ISRs with the underlying OS, if required. */\r
+extern void registerEdma3Interrupts (unsigned int edma3Id);\r
+/**  To Unregister the ISRs with the underlying OS, if previously registered. */\r
+extern void unregisterEdma3Interrupts (unsigned int edma3Id);\r
+\r
+/* To find out the DSP# */\r
+extern unsigned short determineProcId();\r
+\r
+/**\r
+ * To check whether the global EDMA3 configuration is required or not.\r
+ * It should be done ONCE by any of the masters present in the system.\r
+ * This function checks whether the global configuration is required by the\r
+ * current master or not. In case of many masters, it should be done only\r
+ * by one of the masters. Hence this function will return TRUE only once\r
+ * and FALSE for all other masters.\r
+ */\r
+extern unsigned short isGblConfigRequired(unsigned int dspNum);\r
+\r
+/**\r
+ * DSP instance number on which the executable is running. Its value is\r
+ * determined by reading the processor specific register DNUM.\r
+ */\r
+unsigned int dsp_num;\r
+\r
+/**\r
+ * Shadow Region on which the executable is running. Its value is populated\r
+ * with the DSP Instance Number here in this case.\r
+ */\r
+unsigned int region_id;\r
+\r
+/* Number of EDMA3 controllers present in the system */\r
+extern const unsigned int numEdma3Instances;\r
+\r
+/* External Global Configuration Structure */\r
+extern EDMA3_DRV_GblConfigParams sampleEdma3GblCfgParams[];\r
+\r
+/* External Instance Specific Configuration Structure */\r
+extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[][EDMA3_MAX_REGIONS];\r
+\r
+EDMA3_DRV_Handle hEdma0;\r
+EDMA3_DRV_Handle hEdma1;\r
+\r
+/**\r
+ *  \brief    Configures eDMA module\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS eDmaConfig(void)\r
+{\r
+    EDMA3_DRV_Result edmaResult = 0;\r
+    uint32_t temp;\r
+\r
+    /* Enabling the dmaChannel MCASP2 Events to EDMACC1 (50 & 51) */\r
+    temp=sampleEdma3GblCfgParams[1].dmaChannelHwEvtMap[1];\r
+    sampleEdma3GblCfgParams[1].dmaChannelHwEvtMap[1]= temp | 0x000C0000;\r
+\r
+       /* Initialize eDMA 0 */\r
+    hEdma0 = edma3init(CSL_EDMACC_0, &edmaResult);\r
+    if((hEdma0 == NULL) || (edmaResult != 0))\r
+    {\r
+               IFPRINT(audk2g_write("eDMA instance 0 Initialization Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+\r
+       /* Initialize eDMA 1 */\r
+    hEdma1 = edma3init(CSL_EDMACC_1, &edmaResult);\r
+    if((hEdma1 == NULL) || (edmaResult != 0))\r
+    {\r
+               IFPRINT(audk2g_write("eDMA instance 1 Initialization Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+\r
+       return (Audk2g_EOK);\r
+}\r
+\r
+/**\r
+ * \brief   EDMA3 Initialization\r
+ *\r
+ * This function initializes the EDMA3 Driver and registers the\r
+ * interrupt handlers.\r
+ *\r
+ * \return  EDMA3_DRV_SOK if success, else error code\r
+ */\r
+EDMA3_DRV_Handle edma3init (unsigned int edma3Id, EDMA3_DRV_Result *errorCode)\r
+{\r
+    EDMA3_DRV_Result edma3Result = EDMA3_DRV_E_INVALID_PARAM;\r
+    Semaphore_Params semParams;\r
+    EDMA3_DRV_GblConfigParams *globalConfig = NULL;\r
+       EDMA3_DRV_InitConfig initCfg;\r
+       EDMA3_RM_MiscParam miscParam;\r
+       EDMA3_DRV_Handle hEdma = NULL;\r
+\r
+       if ((edma3Id >= numEdma3Instances) || (errorCode == NULL))\r
+               return hEdma;\r
+\r
+    /* DSP instance number */\r
+    dsp_num = determineProcId();\r
+\r
+    globalConfig = &sampleEdma3GblCfgParams[edma3Id];\r
+\r
+       /* Configure it as master, if required */\r
+       miscParam.isSlave = isGblConfigRequired(dsp_num);\r
+       edma3Result = EDMA3_DRV_create (edma3Id, globalConfig ,\r
+                                                                       (void *)&miscParam);\r
+\r
+       if (edma3Result == EDMA3_DRV_SOK)\r
+       {\r
+               /**\r
+               * Driver Object created successfully.\r
+               * Create a semaphore now for driver instance.\r
+               */\r
+               Semaphore_Params_init(&semParams);\r
+\r
+               initCfg.drvSemHandle = NULL;\r
+               edma3Result = edma3OsSemCreate(1, &semParams, &initCfg.drvSemHandle);\r
+       }\r
+\r
+       if (edma3Result == EDMA3_DRV_SOK)\r
+       {\r
+               /* Save the semaphore handle for future use */\r
+               semHandle[edma3Id] = initCfg.drvSemHandle;\r
+\r
+        /* Driver instance specific config NULL */\r
+               initCfg.drvInstInitConfig = NULL;\r
+\r
+#ifndef EDMA3_DRV_USE_DEF_RM_CFG\r
+        /* Hook for running examples with default RM config */\r
+               /* configuration structure for the Driver */\r
+               initCfg.drvInstInitConfig = &sampleInstInitConfig[edma3Id][dsp_num];\r
+#endif\r
+\r
+               initCfg.isMaster = TRUE;\r
+               /* Choose shadow region according to the DSP# */\r
+               initCfg.regionId = (EDMA3_RM_RegionId)dsp_num;\r
+               /*Saving the regionId for using it in the sample_cs.c file */\r
+               region_id = (EDMA3_RM_RegionId)dsp_num;\r
+               /* Driver instance specific config NULL */\r
+\r
+               initCfg.gblerrCb = NULL;\r
+               initCfg.gblerrData = NULL;\r
+\r
+               /* Open the Driver Instance */\r
+               hEdma = EDMA3_DRV_open (edma3Id, (void *) &initCfg, &edma3Result);\r
+       }\r
+\r
+       if(hEdma && (edma3Result == EDMA3_DRV_SOK))\r
+       {\r
+               /**\r
+               * Register Interrupt Handlers for various interrupts\r
+               * like transfer completion interrupt, CC error\r
+               * interrupt, TC error interrupts etc, if required.\r
+               */\r
+               registerEdma3Interrupts(edma3Id);\r
+       }\r
+\r
+       *errorCode = edma3Result;\r
+\r
+       return (hEdma);\r
+}\r
+\r
+\r
+/**\r
+ * \brief   EDMA3 De-initialization\r
+ *\r
+ * This function removes the EDMA3 Driver instance and unregisters the\r
+ * interrupt handlers.\r
+ *\r
+  * \return  EDMA3_DRV_SOK if success, else error code\r
+ */\r
+EDMA3_DRV_Result edma3deinit (unsigned int edma3Id, EDMA3_DRV_Handle hEdma)\r
+{\r
+    EDMA3_DRV_Result edma3Result = EDMA3_DRV_E_INVALID_PARAM;\r
+\r
+    /* Unregister Interrupt Handlers first */\r
+    unregisterEdma3Interrupts(edma3Id);\r
+\r
+    /* Delete the semaphore */\r
+    edma3Result = edma3OsSemDelete(semHandle[edma3Id]);\r
+\r
+    if (EDMA3_DRV_SOK == edma3Result )\r
+    {\r
+        /* Make the semaphore handle as NULL. */\r
+        semHandle[edma3Id] = NULL;\r
+\r
+        /* Now, close the EDMA3 Driver Instance */\r
+        edma3Result = EDMA3_DRV_close (hEdma, NULL);\r
+    }\r
+\r
+       if (EDMA3_DRV_SOK == edma3Result )\r
+    {\r
+        /* Now, delete the EDMA3 Driver Object */\r
+        edma3Result = EDMA3_DRV_delete (edma3Id, NULL);\r
+    }\r
+\r
+    return (edma3Result);\r
+}\r
+\r
+/* Nothing past this point */\r
diff --git a/realtime_demo_bios/k2g/src/main.c b/realtime_demo_bios/k2g/src/main.c
new file mode 100644 (file)
index 0000000..1369f0c
--- /dev/null
@@ -0,0 +1,357 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      main.c\r
+ *\r
+ * \brief     Audio DC analog test main file\r
+ *\r
+ *  Audio analog test verifies the functionality of ADC and DAC available on\r
+ *  audio daughter card. During this test, data received from ADC will be\r
+ *  sent to DAC. There are two instances of DAC and ADC available on\r
+ *  audio daughter card. One ADC supports 4 analog channels and one DAC\r
+ *  supports 8 analog channels. Data received from one DAC shall be sent\r
+ *  to both the ADCs making 8 channel Rx/Tx. Each DAC should be validated\r
+ *  separately.\r
+ *\r
+ */\r
+\r
+#include "analog_test.h"\r
+#include "board.h"\r
+\r
+/* System header files */\r
+#include <xdc/std.h>\r
+\r
+#include <xdc/runtime/Error.h>\r
+#include <xdc/runtime/System.h>\r
+\r
+/*----------------------------------------\r
+ * BIOS header files\r
+ *----------------------------------------*/\r
+\r
+#include <ti/sysbios/BIOS.h>            /* mandatory - if you call APIs like BIOS_start() */\r
+\r
+/* Portable data types */\r
+#include <ti/mas/types/types.h>\r
+#include <ti/mas/util/ecomem.h>\r
+\r
+#include "../../../common/components/fil.h"\r
+#include "../../../common/components/sys.h"\r
+\r
+/* Global System Configuration Structure */\r
+sysConfig_t sysConfig = {\r
+  SYS_MICS_MAX,   /* #microphones */\r
+  SYS_VMICS_MAX,  /* #virtual microphones */\r
+  FALSE,          /* Do not use file I/O to load files (must use GEL to load into memory) */\r
+  TRUE            /* Use default angles for microphone configurations */\r
+};\r
+\r
+/* Global FILE I/O Configuration Structure (must be configured even when file I/O not used */\r
+filConfig_t filConfig = {\r
+  FIL_LENGTH_MAX,   /* number of samples to load from a file */\r
+  SYS_MICS_MAX,     /* number of files to use */\r
+  TRUE,             /* big endian */\r
+  FALSE,            /* do not wrap around */\r
+  40*SYS_FS_HZ      /* Process 40s of the signal (current mic input file length */\r
+};\r
+\r
+/* Acoustic environment */\r
+/* Room Size (X,Y,Z) in meters */\r
+/*    5.2000    4.3000    2.7000  */\r
+\r
+/* Table size (X,Y,Z) in meters */\r
+/*    3.0000    2.4000    0.7600  */\r
+\r
+/* "Echo" generating speaker position (X,Y,Z) in meters */\r
+/*    0         2.1500    1.2172     180  -90   VM-9 */\r
+\r
+/* People positions (X,Y,Z) in meters and angles relative to the table and array  */\r
+/*    1.8200    0.6452    1.2172  position#1  (person#1)   -123.6056 -146.3944 VM-7\r
+      2.8200    0.6452    1.2172  -not used-                -90.0000  180.0000 VM-6\r
+      3.8200    0.6452    1.2172              (person#2)    -56.3944  146.3944 VM-5\r
+      1.8200    3.6548    1.2172              (person#3)    123.6056  -33.6056 VM-11\r
+      2.8200    3.6548    1.2172  -not used-                 90.0000    0.0000 VM-0\r
+      3.8200    3.6548    1.2172  position#6  (person#4)     56.3944   33.6056 VM-1\r
+*/\r
+\r
+/* Microphone array mic positions (X,Y,Z) in meters */\r
+/*    2.7922    2.1500    0.7600  mic#1 ("left" most)    180\r
+      2.8004    2.1304    0.7600                        -135\r
+      2.8200    2.1222    0.7600        ("lower" most)  -90\r
+      2.8396    2.1304    0.7600                        -45\r
+      2.8478    2.1500    0.7600        ("right" most)   0\r
+      2.8396    2.1696    0.7600                         45\r
+      2.8200    2.1778    0.7600        ("upper" most)   90\r
+      2.8004    2.1696    0.7600  mic#8                  135\r
+*/\r
+/* Array Center = (2.82, 2.15, 0.76) (same as table center) */\r
+\r
+/* Noise source position (X,Y,Z) in meters */\r
+/*    2.6000    2.1500    2.3000  */\r
+\r
+/* Initialize FILE I/O, system context */\r
+static void system_init(void)\r
+{\r
+  int err;\r
+\r
+  err = sysCreate(&sysConfig);        /* Create system context */\r
+  SYS_CHECK_ERROR(err);\r
+\r
+  err = sysPrintConfig(SYSM_SCOPE_STATIC|SYSM_SCOPE_DYNAMIC);\r
+  SYS_CHECK_ERROR(err);\r
+\r
+} /* system_init */\r
+\r
+/* ADC default configuration parameters */\r
+Audk2gAdcConfig adcCfg =\r
+{\r
+       80,                  /* ADC gain */\r
+       AUDK2G_ADC_INL_SE_VINL1,    /* Left input mux for ADC1L */\r
+       AUDK2G_ADC_INL_SE_VINL2,    /* Left input mux for ADC2L */\r
+       AUDK2G_ADC_INR_SE_VINR1,    /* Right input mux for ADC1R */\r
+       AUDK2G_ADC_INR_SE_VINR2,    /* Right input mux for ADC2R */\r
+       AUDK2G_ADC_RX_WLEN_24BIT,   /* ADC word length */\r
+       AUDK2G_ADC_DATA_FORMAT_I2S, /* ADC data format */\r
+       0\r
+};\r
+\r
+/* DAC default configuration parameters */\r
+Audk2gDacConfig  dacCfg =\r
+{\r
+       AUDK2G_DAC_AMUTE_CTRL_SCKI_LOST,   /* Amute event */\r
+       0,                          /* Amute control */\r
+       AUDK2G_DAC_SAMPLING_MODE_AUTO,     /* Sampling mode */\r
+       AUDK2G_DAC_DATA_FORMAT_I2S,        /* Data format */\r
+       0,                          /* Soft mute control */\r
+       AUDK2G_DAC_ATTENUATION_WIDE_RANGE, /* Attenuation mode */\r
+       AUDK2G_DAC_DEEMP_44KHZ,            /* De-emph control */\r
+       80                          /* Volume */\r
+};\r
+\r
+typedef enum {\r
+    PADCONFIG_MUX_MODE_PRIMARY = 0,  /**< Primary pin mux mode    */\r
+    PADCONFIG_MUX_MODE_SECONDARY,    /**< Secondary pin mux mode  */\r
+    PADCONFIG_MUX_MODE_TERTIARY,     /**< Tertiary pin mux mode   */\r
+    PADCONFIG_MUX_MODE_QUATERNARY,   /**< Quaternary pin mux mode */\r
+    PADCONFIG_MUX_MODE_QUINARY,      /**< Quinary pin mux mode    */\r
+    PADCONFIG_MUX_MODE_SENARY        /**< Senary pin mux mode     */\r
+\r
+} PadCfgMuxMode;\r
+\r
+/*\r
+ * Function to enable the pinmux for the mcasp and i2c devices in the soc.\r
+ *\r
+ */\r
+void pinMuxSetMode_local(uint32_t padCfgId, PadCfgMuxMode muxMode)\r
+{\r
+       volatile uint32_t *padCfgBase;\r
+\r
+    padCfgBase = &hBootCfg->PADCONFIG0;\r
+    CSL_FINS(*(padCfgBase + padCfgId), BOOTCFG_PADCONFIG0_MUXMODE, muxMode);\r
+}\r
+\r
+char write_buffer[MAX_WRITE_LEN];\r
+void audk2g_write(const char *fmt, ... )\r
+{\r
+       va_list         arg_ptr;\r
+       uint32_t        length;\r
+\r
+       /* Initial platform_write to temporary buffer.. at least try some sort of sanity check so we don't write all over\r
+        * memory if the print is too large.\r
+        */\r
+       if (strlen(fmt) > MAX_WRITE_LEN) {return;}\r
+\r
+       va_start( arg_ptr, fmt );\r
+       length = vsprintf( (char *)write_buffer, fmt, arg_ptr );\r
+       va_end( arg_ptr );\r
+\r
+       printf( "%s", write_buffer );\r
+       //fflush(stdout);\r
+\r
+       return;\r
+}\r
+\r
+void McaspDevice_init(void);\r
+\r
+/**\r
+ *  \brief    Initializes platform specific modules\r
+ *\r
+ *  This function initializes the modules like PLL, DDR, I2C etc\r
+ *  which are required for audio processing. Need to call this function\r
+ *  before doing any HW related operations.\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS initPlatform(void)\r
+{\r
+       Board_STATUS status = BOARD_SOK;\r
+       Board_initCfg arg = BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_MODULE_CLOCK;\r
+       status = Board_init(arg);\r
+\r
+#if 1\r
+       /* Configure McASP AUXCLK source as AUDIO_OSCCLK  */\r
+       hBootCfg->SERIALPORT_CLKCTL = 0;\r
+       /* Enable audio oscillator  */\r
+       hBootCfg->OSC_CTL = 0x200;      //SW2:SW1 = 01 (15 - 30 MHz)\r
+\r
+       {\r
+               int padCfg;\r
+               for (padCfg = 139; padCfg <= 191; padCfg++)\r
+               {\r
+                       pinMuxSetMode_local(padCfg, PADCONFIG_MUX_MODE_QUINARY);\r
+               }\r
+       }\r
+#endif\r
+\r
+        // I2C init\r
+    /* Initialize all the I2C ports - Needed for different I2C devices on the board */\r
+       evmI2CInit(I2C_PORT_0);\r
+       evmI2CInit(I2C_PORT_1);\r
+       evmI2CInit(I2C_PORT_2);\r
+\r
+       ///pinMuxSetMode(125, PADCONFIG_MUX_MODE_QUATERNARY);\r
+       ///gpioSetDirection(GPIO_PORT_1, 54, GPIO_OUT);\r
+       ///gpioSetOutput(GPIO_PORT_1, 54);\r
+\r
+       /* Configure platform log messages to standard printf */\r
+    ///Audk2g_write_configure(Audk2g_WRITE_UART);\r
+\r
+    /* Initialize UART */\r
+    ///Audk2g_uart_init();\r
+    ///Audk2g_uart_set_baudrate(115200);\r
+\r
+    return(status);\r
+}\r
+\r
+/**\r
+ *  \brief    Audio analog test main function\r
+ *\r
+ *  \return    none\r
+ */\r
+void main (void)\r
+{\r
+       Audk2g_STATUS status;\r
+\r
+       status = initPlatform();\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("Platform Init Failed!\n");\r
+               testRet(1);\r
+       }\r
+\r
+       audk2g_delay(10000);\r
+\r
+\r
+       system_init();      /* initialize system context, etc. */\r
+\r
+       sysBfCreate();      /* Create beamformers */\r
+       sysAsnrCreate();    /* Create ASNR's */\r
+       sysMssCreate();     /* Create MSS */\r
+       ///sysVauCreate();     /* Create VAU */\r
+\r
+\r
+       audk2g_write("\n******************************************\n");\r
+       audk2g_write(  "        CMB Analog Loopback Test          \n");\r
+    audk2g_write(  "******************************************\n");\r
+\r
+    audk2g_write("\nTest Verifies ADC and DAC Channels\n");\r
+       audk2g_write("Test Runs in Audio Loopback Mode\n");\r
+       audk2g_write("Confirm that CMB Mic 1 and Mic 8 Input are Played at On-Board Line-Out Left and Right Channels\n");\r
+\r
+       /* Initialize McASP HW details */\r
+       McaspDevice_init();\r
+\r
+       /* Configure eDMA module */\r
+       status = eDmaConfig();\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("eDMA Configuration Failed!\n");\r
+               testRet(1);\r
+       }\r
+\r
+       /* Initialize common audio configurations */\r
+       status = (Audk2g_STATUS)audk2g_AudioInit();\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("Audio Init Failed!\n");\r
+               testRet(1);\r
+       }\r
+\r
+       /* Initialize Audio ADC module */\r
+       status = audioAdcConfig(AUDK2G_ADC_DEVICE_0, &adcCfg);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("Audio ADC0 Configuration Failed!\n");\r
+               testRet(1);\r
+       }\r
+\r
+       status = audioAdcConfig(AUDK2G_ADC_DEVICE_1, &adcCfg);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("Audio ADC1 Configuration Failed!\n");\r
+               testRet(1);\r
+       }\r
+\r
+       /* Initialize McASP module */\r
+       status = mcaspAudioConfig();\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("McASP Configuration Failed!\n");\r
+               testRet(1);\r
+       }\r
+\r
+       /* Start BIOS execution */\r
+       BIOS_start();\r
+}\r
+\r
+/**\r
+ *  \brief    Configures audio DAC module\r
+ *\r
+ *  \return    none\r
+ */\r
+#if AUDK2G_AUDIO_DAC\r
+void configAudioDAC(void)\r
+{\r
+       Audk2g_STATUS status;\r
+\r
+       /* Initialize Audio DAC0 module */\r
+       status = audioDacConfig(AUDK2G_DAC_DEVICE_0, &dacCfg);\r
+       if(status != Audk2g_EOK)\r
+       {\r
+               audk2g_write("Audio DAC0 Configuration Failed!\n");\r
+               testRet(1);\r
+       }\r
+}\r
+#endif\r
+\r
+/* Nothing past this point */\r
diff --git a/realtime_demo_bios/k2g/src/makefile.libs b/realtime_demo_bios/k2g/src/makefile.libs
new file mode 100644 (file)
index 0000000..db1526e
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# This file was generated based on the configuration script:
+#     C:\ti\processor_sdk_rtos_k2g_3_02_00_05\demos\audio-preprocessing\realtime_demo_bios\k2g\audioAnalogLoopbackTest.cfg
+#
+# This makefile may be included in other makefiles that need to build
+# the libraries containing the compiled source files generated as
+# part of the configuration step.
+
+#
+# ======== GEN_SRC_DIR =========
+# The path to the sources generated during configuration
+#
+# This path must be either absolute or relative to the build directory.
+#
+# The absolute path to the generated source directory (at the time the
+# sources were generated) is:
+#    C:\ti\processor_sdk_rtos_k2g_3_02_00_05\demos\audio-preprocessing\realtime_demo_bios\k2g\src
+#
+GEN_SRC_DIR ?= ../src
+
+ifeq (,$(wildcard $(GEN_SRC_DIR)))
+$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
+endif
+
+#
+# ======== .force ========
+# The .force goal is used to force the build of any goal that names it as
+# a prerequisite
+#
+.PHONY: .force
+      
+#
+# ======== library macros ========
+#
+sysbios_SRC = $(GEN_SRC_DIR)/sysbios
+sysbios_LIB = $(GEN_SRC_DIR)/sysbios/sysbios.ae66
+
+#
+# ======== dependencies ========
+#
+all: $(sysbios_LIB)
+clean: .sysbios_clean
+
+
+# ======== convenient build goals ========
+.PHONY: sysbios
+sysbios: $(GEN_SRC_DIR)/sysbios/sysbios.ae66
+
+# CDT managed make executables depend on $(OBJS)
+OBJS += $(sysbios_LIB)
+
+#
+# ======== rules ========
+#
+$(sysbios_LIB): .force 
+       @echo making $@ ...
+       @$(MAKE) -C $(sysbios_SRC)
+
+.sysbios_clean:
+       @echo cleaning $(sysbios_SRC) ...
+       -@$(MAKE) --no-print-directory -C $(sysbios_SRC) clean
+
diff --git a/realtime_demo_bios/k2g/src/mcasp_cfg.c b/realtime_demo_bios/k2g/src/mcasp_cfg.c
new file mode 100644 (file)
index 0000000..0fb790c
--- /dev/null
@@ -0,0 +1,869 @@
+/*\r
+ * Copyright (c) 2015, Texas Instruments Incorporated\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * *  Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ * *  Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * *  Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+/**\r
+ * \file      mcasp_config.c\r
+ *\r
+ * \brief     Configures McASP module\r
+ *\r
+ */\r
+\r
+#include "mcasp_cfg.h"\r
+#include "../include/audk2g.h"\r
+\r
+\r
+/* The infamous xdc/std.h must come before any header file which uses XDC symbols */\r
+#include <xdc/std.h>              /* mandatory - have to include first, for BIOS types */\r
+#include <ti/mas/types/types.h>\r
+#include <ti/mas/aer/bf.h>\r
+#include "../../../common/components/mss/mss.h"              /* local version used */\r
+#include <ti/mas/vpe/asnr.h>\r
+\r
+/*----------------------------------------\r
+ *  BIOS header files\r
+ *----------------------------------------*/\r
+#include <ti/sysbios/BIOS.h>          /* mandatory - if you call APIs like BIOS_start() */\r
+#include <xdc/cfg/global.h>           /* header file for statically defined objects/handles */\r
+#include <xdc/runtime/System.h>       /* for System_printf, and similar */\r
+#include <xdc/runtime/Timestamp.h>    /* for benchmarking/profiling */\r
+\r
+#include <xdc/runtime/Log.h>          /* for tracing */\r
+#include <xdc/runtime/Diags.h>\r
+#include <ti/uia/events/UIAEvt.h>     /* and more tracing */\r
+\r
+#include <ti/sysbios/knl/Semaphore.h> /* this looks obvious */\r
+\r
+#include "fil.h"                      /* FILE I/O implementation */\r
+#include "sys.h"                      /* System API and structures */\r
+#include "sysbfflt.h"                 /* System support for BF filters */\r
+\r
+#define Timestamp_get Timestamp_get32 /* use 32-bit time stamps */\r
+\r
+#define MIN(a,b)    (((a)>(b))?(b):(a))     /* Min/Max macros */\r
+#define MAX(a,b)    (((a)<(b))?(b):(a))\r
+#define loop        while(1)                /* endless loop for the task */\r
+\r
+\r
+/* Frame index for Rx and Tx buffers */\r
+uint8_t rxFrameIndex = 1;\r
+uint8_t txFrameIndex = 1;\r
+uint32_t gtxFrameIndexCount = 0;\r
+uint32_t grxFrameIndexCount = 0;\r
+\r
+/* Flags for counting Rx and Tx interrupts */\r
+volatile uint32_t rxFlag = 0;\r
+volatile uint32_t txFlag = 0;\r
+\r
+/* Semaphore handle for Tx and Rx */\r
+Semaphore_Handle semR;\r
+Semaphore_Handle semT;\r
+Semaphore_Params params;\r
+\r
+/* McASP device handles */\r
+Ptr hMcaspDevTx;\r
+Ptr hMcaspDevRx;\r
+\r
+/* McASP channel handles */\r
+Ptr hMcaspTxChan;\r
+Ptr hMcaspRxChan;\r
+\r
+/* McASP channel parameters */\r
+Mcasp_Params mcaspTxParams;\r
+Mcasp_Params mcaspRxParams;\r
+\r
+/* McASP Callback function argument */\r
+uint32_t txChanMode;\r
+uint32_t rxChanMode;\r
+uint32_t mcaspRxChanArg = 1;\r
+uint32_t mcaspTxChanArg = 2;\r
+\r
+/* McASP Tx and Rx frame buffers */\r
+MCASP_Packet rxFrame[NUM_BUFS];\r
+MCASP_Packet txFrame[NUM_BUFS];\r
+\r
+/* McASP Tx and Rx frame buffer pointers */\r
+Ptr txBuf[NUM_BUFS];\r
+Ptr rxBuf[NUM_BUFS];\r
+Ptr wkBuf[NUM_BUFS];\r
+Ptr outBuf[NUM_BUFS];\r
+\r
+int chanToMicMapping[8] = {0, 1, 4, 5, 2, 3, 6, 7};\r
+\r
+/* Error flag */\r
+uint32_t gblErrFlag = 0;\r
+Error_Block eb;\r
+\r
+/* External function declarations */\r
+void GblErr(int arg);\r
+signed char*  getGlobalAddr(signed char* addr);\r
+\r
+/* McASP HW setup for receive */\r
+Mcasp_HwSetupData mcaspRcvSetup = {\r
+        /* .rmask    = */ 0xFFFFFFFF, /* 16 bits are to be used     */\r
+        /* .rfmt     = */ 0x000180F0, /*\r
+                                       * 1 bit delay from framesync\r
+                                       * MSB first\r
+                                       * No extra bit padding\r
+                                       * Padding bit (ignore)\r
+                                       * slot Size is 32\r
+                                       * Reads from DMA port\r
+                                       * NO rotation\r
+                                       */\r
+        /* .afsrctl  = */ 0X00000111, /* I2S mode - 2 slot TDM\r
+                                       * Frame sync is one word\r
+                                       * Externally generated frame sync\r
+                                       * Falling edge is start of frame\r
+                                       */\r
+        /* .rtdm     = */ 0x00000003, /* slot 1 and 2 are active (I2S)        */\r
+        /* .rintctl  = */ 0x00000000, /* sync error and overrun error         */\r
+        /* .rstat    = */ 0x000001FF, /* reset any existing status bits       */\r
+        /* .revtctl  = */ 0x00000000, /* DMA request is enabled               */\r
+        {\r
+             /* .aclkrctl  = */ 0x00000080, /* Bit CLK Pol: falling edge, ACLKR is external */\r
+             /* .ahclkrctl = */ 0x00000000, /* AHCLKR is external */\r
+             /* .rclkchk   = */ 0x00000000\r
+        }\r
+};\r
+\r
+/* McASP HW setup for transmit */\r
+#if (AUDK2G_AUDIO_DAC)\r
+Mcasp_HwSetupData mcaspXmtSetup = {\r
+        /* .xmask    = */ 0xFFFFFFFF, /* 16 bits are to be used     */\r
+        /* .xfmt     = */ 0x000180F0, /*\r
+                                       * 1 bit delay from framesync\r
+                                       * MSB first\r
+                                       * No extra bit padding\r
+                                       * Padding bit (ignore)\r
+                                       * slot Size is 32\r
+                                       * Reads from DMA port\r
+                                       * NO rotation\r
+                                       */\r
+        /* .afsxctl  = */ 0x00000113, /* I2S mode - 2 slot TDM\r
+                                       * Frame sync is one word\r
+                                       * Falling edge is start of frame\r
+                                       * Externally generated frame sync\r
+                                       */\r
+        /* .xtdm     = */ 0x00000003, /* slot 1 and 2 are active (I2S)               */\r
+        /* .xintctl  = */ 0x00000000, /* sync error,overrun error,clK error   */\r
+        /* .xstat    = */ 0x000001FF, /* reset any existing status bits       */\r
+        /* .xevtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */\r
+        {\r
+             /* .aclkxctl  = */ 0X000000E7, /* Bit CLK Pol: falling edge, ASYNC is 1, ACLKX is internal, HF CLK to BCLK divider is 8 */\r
+             /* .ahclkxctl = */ 0x00000000, /* AHCLKX is external */\r
+             /* .xclkchk   = */ 0x00000000\r
+        },\r
+\r
+};\r
+#endif\r
+\r
+/* McAsp channel parameters for receive                      */\r
+Mcasp_ChanParams  mcaspRxChanParam =\r
+{\r
+       0x0004,                    /* number of serializers      */\r
+       {Mcasp_SerializerNum_0,\r
+        Mcasp_SerializerNum_1,\r
+        Mcasp_SerializerNum_2,\r
+        Mcasp_SerializerNum_3 }, /* serializer index           */\r
+       &mcaspRcvSetup,\r
+       TRUE,\r
+       Mcasp_OpMode_TDM,          /* Mode (TDM/DIT)             */\r
+       Mcasp_WordLength_32,\r
+       NULL,\r
+       0,\r
+       NULL,\r
+       GblErr,\r
+       2,                        /* number of TDM channels      */\r
+       ///Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1,\r
+       Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2,\r
+       TRUE,\r
+       TRUE\r
+};\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+/* McAsp channel parameters for transmit             */\r
+Mcasp_ChanParams  mcaspTxChanParam =\r
+{\r
+       0x0001,                   /* number of serializers       */\r
+       {Mcasp_SerializerNum_2,}, /* serializer index for DAC0    */\r
+       &mcaspXmtSetup,\r
+       TRUE,\r
+       Mcasp_OpMode_TDM,\r
+       Mcasp_WordLength_32,      /* word width                  */\r
+       NULL,\r
+       0,\r
+       NULL,\r
+       GblErr,\r
+       2,                        /* number of TDM channels      */\r
+       Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,\r
+       ///Mcasp_BufferFormat_1SER_MULTISLOT_NON_INTERLEAVED,\r
+       TRUE,\r
+       TRUE\r
+};\r
+#endif\r
+\r
+typedef struct txBfDebug_stc {\r
+ tulong frmcnt;     /* normal frames */\r
+ tulong silcnt;     /* silence frames */\r
+ tuint  invsrc;     /* no mic active, invalid output */\r
+ tuint  invopt;     /* >1 mic active, invalid output */\r
+} txBfDebug_t;\r
+\r
+typedef struct txTaskDebug_stc {\r
+  tuint overrun;                    /* counts how many times we ran out of MIPS */\r
+  txBfDebug_t bf[SYS_VMICS_MAX];    /* beamformer statistics */\r
+} txTaskDebug_t;\r
+\r
+txTaskDebug_t txTaskDebug;      /* Tx task debug stats */\r
+\r
+/* Profiling/benchmarking information for the Tx task */\r
+typedef struct txTaskProfileData_stc {\r
+  tulong  min;              /* Minimum number of cycles */\r
+  tulong  max;              /* Maximum number of cycles */\r
+  tulong  n;                /* Number of measurements */\r
+  float   total;            /* Total number of cycles */\r
+} txTaskProfileData_t;\r
+\r
+typedef struct txTaskProfile_stc {\r
+  txTaskProfileData_t   bf;       /* Beamformer profile */\r
+  txTaskProfileData_t   asnr;     /* ASNR profile */\r
+  txTaskProfileData_t   mss;      /* MSS profile */\r
+  txTaskProfileData_t   vau;      /* VAU profile */\r
+} txTaskProfile_t;\r
+volatile txTaskProfile_t  txTaskProfile = {\r
+  {~(0uL), 0, 0, 0.0f},\r
+  {~(0uL), 0, 0, 0.0f},\r
+  {~(0uL), 0, 0, 0.0f},\r
+  {~(0uL), 0, 0, 0.0f}\r
+};\r
+\r
+/* To be used for debug trace */\r
+mssSrc_t    mssDbgCurSrc = {\r
+  -1, -1                        /* Current source group/index */\r
+};\r
+mssSrc_t    mssDbgNewSrc = {\r
+  -1, -1                        /* New source group/index */\r
+};\r
+\r
+/* Handle to eDMA */\r
+extern EDMA3_DRV_Handle hEdma1;\r
+\r
+/**\r
+ *  \brief    Function called by McASP driver in case of error\r
+ *\r
+ *  \return    None\r
+ */\r
+void GblErr(int arg)\r
+{\r
+       gblErrFlag = 1;\r
+}\r
+\r
+/**\r
+ *  \brief   McASP callback function called up on the data transfer completion\r
+ *\r
+ *  \param  arg   [IN]  - Application specific callback argument\r
+ *  \param  ioBuf [IN]  - McASP IO buffer\r
+ *\r
+ *  \return    None\r
+ */\r
+void mcaspAppCallback(void *arg, MCASP_Packet *ioBuf)\r
+{\r
+       /* Callback is triggered by Rx completion */\r
+       if(ioBuf->cmd == MCASP_READ)\r
+       {\r
+               rxFlag++;\r
+\r
+               if(rxFrameIndex == 0)\r
+               {\r
+                       rxFrameIndex = 1;\r
+               }\r
+               else\r
+               {\r
+                       rxFrameIndex = 0;\r
+               }\r
+\r
+               /* Post semaphore */\r
+               Semaphore_post(semR);\r
+       }\r
+\r
+       /* Callback is triggered by Tx completion */\r
+       if(ioBuf->cmd == MCASP_WRITE)\r
+       {\r
+               if(txFrameIndex == 0)\r
+               {\r
+                       txFrameIndex = 1;\r
+               }\r
+               else\r
+               {\r
+                       txFrameIndex = 0;\r
+               }\r
+\r
+               txFlag++;\r
+\r
+               /* Post semaphore */\r
+               Semaphore_post(semT);\r
+       }\r
+}\r
+\r
+/**\r
+ *  \brief   Initializes McASP data buffers and submits to McASP driver\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS initBuffers(void)\r
+{\r
+       Error_Block  eb;\r
+    uint32_t     count = 0;\r
+    IHeap_Handle iheap;\r
+    Int          status;\r
+\r
+    iheap = HeapMem_Handle_to_xdc_runtime_IHeap(heapHandle);\r
+    Error_init(&eb);\r
+\r
+    /* Allocate buffers for the McASP data exchanges */\r
+    for(count = 0; count < NUM_BUFS; count++)\r
+    {\r
+        rxBuf[count] = Memory_calloc(iheap, (BUFSIZE * RX_NUM_SERIALIZER),\r
+                                                            BUFALIGN, &eb);\r
+        if(NULL == rxBuf[count])\r
+        {\r
+            IFPRINT(audk2g_write("\r\nMEM_calloc failed for Rx\n"));\r
+        }\r
+    }\r
+\r
+    /* Allocate work buffers for signal processing */\r
+    for(count = 0; count < NUM_BUFS; count++)\r
+    {\r
+        wkBuf[count] = Memory_calloc(iheap, (BUFSIZE * RX_NUM_SERIALIZER/(SYS_FS_RATIO*2)),\r
+                                                            BUFALIGN, &eb);\r
+        if(NULL == wkBuf[count])\r
+        {\r
+            IFPRINT(audk2g_write("\r\nMEM_calloc failed for Wk\n"));\r
+        }\r
+    }\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+    /* Allocate buffers for the McASP data exchanges */\r
+    for(count = 0; count < NUM_BUFS; count++)\r
+    {\r
+        txBuf[count] = Memory_calloc(iheap, (BUFSIZE * TX_NUM_SERIALIZER),\r
+                                                                BUFALIGN, &eb);\r
+        if(NULL == txBuf[count])\r
+        {\r
+            IFPRINT(audk2g_write("\r\nMEM_calloc failed for Tx\n"));\r
+        }\r
+    }\r
+\r
+    /* Allocate output buffers for the MSS */\r
+    for(count = 0; count < NUM_BUFS; count++)\r
+    {\r
+        outBuf[count] = Memory_calloc(iheap, (BUFSIZE * TX_NUM_SERIALIZER/(SYS_FS_RATIO*2*2)),\r
+                                                                BUFALIGN, &eb);\r
+        if(NULL == outBuf[count])\r
+        {\r
+            IFPRINT(audk2g_write("\r\nMEM_calloc failed for Out\n"));\r
+        }\r
+    }\r
+#endif\r
+    for(count = 0; count < NUM_BUFS; count++)\r
+    {\r
+        /* Issue the first & second empty buffers to the input stream */\r
+       memset((uint8_t *)rxBuf[count], 0xAA, (BUFSIZE * RX_NUM_SERIALIZER));\r
+       memset((uint8_t *)wkBuf[count], 0xBB, (BUFSIZE * RX_NUM_SERIALIZER/(SYS_FS_RATIO*2)));\r
+\r
+               /* RX frame processing */\r
+               rxFrame[count].cmd    = MCASP_READ;\r
+               rxFrame[count].addr   = (void*)(getGlobalAddr(rxBuf[count]));\r
+               rxFrame[count].size   = BUFSIZE * RX_NUM_SERIALIZER;\r
+               rxFrame[count].arg    = (uint32_t) mcaspRxChanArg;\r
+               rxFrame[count].status = 0;\r
+               rxFrame[count].misc   = 1;   /* reserved - used in callback to indicate asynch packet */\r
+\r
+               /* Submit McASP packet for Rx */\r
+               status = mcaspSubmitChan(hMcaspRxChan, &rxFrame[count]);\r
+               if((status != MCASP_COMPLETED) && (status != MCASP_PENDING))\r
+               {\r
+                       IFPRINT(audk2g_write("mcaspSubmitChan for Rx Failed\n"));\r
+                       return (Audk2g_EFAIL);\r
+               }\r
+    }\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+    for(count = 0; count < NUM_BUFS; count++)\r
+    {\r
+       memset((uint8_t *)txBuf[count], 0xCC, (BUFSIZE * TX_NUM_SERIALIZER));\r
+       memset((uint8_t *)outBuf[count], 0xDD, (BUFSIZE * TX_NUM_SERIALIZER/(3*2*2)));\r
+\r
+               /* TX frame processing */\r
+               txFrame[count].cmd    = MCASP_WRITE;\r
+               txFrame[count].addr   = (void*)(getGlobalAddr(txBuf[count]));\r
+               txFrame[count].size   = BUFSIZE * TX_NUM_SERIALIZER;\r
+               txFrame[count].arg    = (uint32_t) mcaspTxChanArg;\r
+               txFrame[count].status = 0;\r
+               txFrame[count].misc   = 1;   /* reserved - used in callback to indicate asynch packet */\r
+\r
+               /* Submit McASP packet for Tx */\r
+               status = mcaspSubmitChan(hMcaspTxChan, &txFrame[count]);\r
+               if((status != MCASP_COMPLETED) && (status != MCASP_PENDING))\r
+               {\r
+                       IFPRINT(audk2g_write("mcaspSubmitChan for Tx Failed\n"));\r
+                       return (Audk2g_EFAIL);\r
+               }\r
+    }\r
+#endif\r
+    return (Audk2g_EOK);\r
+}\r
+\r
+/**\r
+ *  \brief   Configures McASP module and creates the channel\r
+ *           for audio Tx and Rx\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+Audk2g_STATUS mcaspAudioConfig(void)\r
+{\r
+       Int status;\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+       hMcaspDevTx  = NULL;\r
+       hMcaspTxChan = NULL;\r
+#endif\r
+       hMcaspDevRx  = NULL;\r
+       hMcaspRxChan = NULL;\r
+\r
+       /* Initialize McASP Tx and Rx parameters */\r
+#if (AUDK2G_AUDIO_DAC)\r
+       mcaspTxParams = Mcasp_PARAMS;\r
+#endif\r
+       mcaspRxParams = Mcasp_PARAMS;\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+       mcaspTxParams.mcaspHwSetup.tx.clk.clkSetupClk = 0x63;\r
+       mcaspTxParams.mcaspHwSetup.rx.clk.clkSetupClk = 0x23;\r
+#endif\r
+       mcaspRxParams.mcaspHwSetup.rx.clk.clkSetupClk = 0x23;\r
+       mcaspRxParams.mcaspHwSetup.tx.clk.clkSetupClk = 0x63;\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+       mcaspTxParams.mcaspHwSetup.glb.pdir |= 0x2000000; //Set Amute pin as output for Tx channel\r
+#endif\r
+\r
+       /* Set the HW interrupt number */\r
+#if (AUDK2G_AUDIO_DAC)\r
+       mcaspTxParams.hwiNumber = 8;\r
+#endif\r
+       mcaspRxParams.hwiNumber = 8;\r
+\r
+       /* Initialize eDMA handle */\r
+       mcaspRxChanParam.edmaHandle  = hEdma1;\r
+#if (AUDK2G_AUDIO_DAC)\r
+       mcaspTxChanParam.edmaHandle = hEdma1;\r
+\r
+       /* Bind McASP2 for Tx */\r
+       status = mcaspBindDev(&hMcaspDevTx, CSL_MCASP_2, &mcaspTxParams);\r
+       if((status != MCASP_COMPLETED) || (hMcaspDevTx == NULL))\r
+       {\r
+               IFPRINT(audk2g_write("mcaspBindDev for Tx Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+#endif\r
+       /* Bind McASP1 for Rx */\r
+       status = mcaspBindDev(&hMcaspDevRx, CSL_MCASP_1, &mcaspRxParams);\r
+       if((status != MCASP_COMPLETED) || (hMcaspDevRx == NULL))\r
+       {\r
+               IFPRINT(audk2g_write("mcaspBindDev for Rx Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+       /* Create McASP channel for Tx */\r
+       status = mcaspCreateChan(&hMcaspTxChan, hMcaspDevTx,\r
+                                MCASP_OUTPUT,\r
+                                &mcaspTxChanParam,\r
+                                mcaspAppCallback, &txChanMode);\r
+       if((status != MCASP_COMPLETED) || (hMcaspTxChan == NULL))\r
+       {\r
+               IFPRINT(audk2g_write("mcaspCreateChan for Tx Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+\r
+       configAudioDAC();\r
+#endif\r
+\r
+       /* Create McASP channel for Rx */\r
+       status = mcaspCreateChan(&hMcaspRxChan, hMcaspDevRx,\r
+                                MCASP_INPUT,\r
+                                &mcaspRxChanParam,\r
+                                mcaspAppCallback, &rxChanMode);\r
+       if((status != MCASP_COMPLETED) || (hMcaspRxChan == NULL))\r
+       {\r
+               IFPRINT(audk2g_write("mcaspCreateChan for Rx Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+\r
+       /* Initialize the buffers and submit for McASP Tx/Rx */\r
+       if(initBuffers() != Audk2g_EOK)\r
+       {\r
+               IFPRINT(audk2g_write("McASP Buffer Initialization Failed\n"));\r
+               return (Audk2g_EFAIL);\r
+       }\r
+\r
+       return (Audk2g_EOK);\r
+}\r
+\r
+/**\r
+ *  \brief   Function to exit the test\r
+ *\r
+ *  \return    None\r
+ */\r
+void testRet(uint32_t status)\r
+{\r
+       audk2g_write("\n\nAudio DC Analog Interface Test Completed!\n");\r
+\r
+       testExit(status);\r
+}\r
+\r
+/**\r
+ *  \brief   Task to echo the input data to output\r
+ *\r
+ *  Waits for the McASP data transfer completion and copies the\r
+ *  Rx data to Tx buffers\r
+ *\r
+ *  \return    Audk2g_EOK on Success or error code\r
+ */\r
+#define DUMP_SEC                       5\r
+#define FRAME_PER_SEC          100\r
+int gAudDumpBufIdx = 0;\r
+unsigned char gAudDumpBuf[(BUFSIZE*RX_NUM_SERIALIZER)*FRAME_PER_SEC*DUMP_SEC];\r
+unsigned char gAudOutDumpBuf[(BUFSIZE*TX_NUM_SERIALIZER)*FRAME_PER_SEC*DUMP_SEC];\r
+Void Audio_echo_Task(void)\r
+{\r
+    int32_t i, j, k;\r
+    unsigned char *tempTxPtr, *tempRxPtr, *tempWkPtr;\r
+    unsigned char *tempOutPtr, *tempMicPtr;\r
+    tint      nmics, nvmics, err, angle;\r
+    volatile tulong t1, t2;       /* for profiling */\r
+    tulong          delta;\r
+\r
+    void      *inst_p;\r
+    linSample *in_r;                      /* pointer to current microphone input buffer */\r
+    linSample *frame_p;                   /* pointer to signal frame */\r
+    linSample *mics_in[SYS_MICS_MAX+1];     /* pointers to microphone inputs */\r
+\r
+    mssDebugStat_t  mssDbg;\r
+\r
+    Semaphore_Params_init(&params);\r
+\r
+       /* Create semaphores to wait for buffer reclaiming */\r
+    semR = Semaphore_create(0, &params, &eb);\r
+    semT = Semaphore_create(0, &params, &eb);\r
+\r
+    /* Forever loop to continuously receive and transmit audio data */\r
+    while (1)\r
+    {\r
+       if(gblErrFlag)\r
+       {\r
+               break;\r
+               }\r
+\r
+       /* Reclaim full buffer from the input stream */\r
+       Semaphore_pend(semR, BIOS_WAIT_FOREVER);\r
+#if (AUDK2G_AUDIO_DAC)\r
+       Semaphore_pend(semT, BIOS_WAIT_FOREVER);\r
+#endif\r
+        /* Reclaim full buffer from the input stream */\r
+#if (AUDK2G_AUDIO_DAC)\r
+       gtxFrameIndexCount = txFrameIndex;\r
+#endif\r
+       grxFrameIndexCount = rxFrameIndex;\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+\r
+#if 0  // Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_1\r
+       // copy RX mic 1 to TX left channel and RX mic 5 to right channel\r
+               // set the RX pointer to mic 1\r
+       tempRxPtr = (uint32_t *)rxBuf[grxFrameIndexCount];\r
+       // set the TX pointer to left cahhnel\r
+               tempTxPtr = (uint32_t *)txBuf[gtxFrameIndexCount];\r
+               // copy RX mic 1 to TX left channel\r
+               for (i=0; i<BUFLEN/2; i++)\r
+       {\r
+                       // copy the left channel of first serializer to the left channel of TX buffer\r
+                       *tempTxPtr = *tempRxPtr;\r
+               tempTxPtr++;\r
+                       // copy the left channel of swecond serializer to the right channel of TX buffer\r
+                       *tempTxPtr = *(tempRxPtr+BUFLEN+2);\r
+               tempTxPtr++;\r
+               tempRxPtr += RX_NUM_SERIALIZER*2;\r
+       }\r
+\r
+#else   // Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2\r
+#if 1   // Signal Processing Path\r
+        // 48khz to 16khz, 24bit to 16bit conversion\r
+           nmics = sysContext.nmics;                   /* fetch number of mics */\r
+       // for each channel, convert and copy the RX buffer to WK buffer\r
+               for (j=0; j<(nmics+1); j++)\r
+               {\r
+                       // set the RX pointer\r
+                       tempRxPtr = (unsigned char *)rxBuf[grxFrameIndexCount] + (j/2)*BUFSIZE + (j&0x00000001)*sizeof(Ptr) + sizeof(short);\r
+                       // set the WK pointer\r
+                       tempWkPtr = (unsigned char *)wkBuf[grxFrameIndexCount] + j*BUFSIZE/(SYS_FS_RATIO*2*2);\r
+                       // convert and copy RX to WK every third sample\r
+                       for (i=0; i<BUFLEN/2; i+=SYS_FS_RATIO)\r
+                       {\r
+                               // only copy the two most significant bytes (Q31 to Q15 conversion)\r
+                               memcpy(tempWkPtr, tempRxPtr, sizeof(short));\r
+                               tempWkPtr += sizeof(short);\r
+                               tempRxPtr += sizeof(Ptr)*2*SYS_FS_RATIO;\r
+                       }\r
+               }\r
+\r
+               // set the sysContext.in_r\r
+               sysContext.in_r = wkBuf[grxFrameIndexCount];\r
+           in_r  = (linSample *)sysContext.in_r;\r
+           for (k = 0; k < (nmics+1); k++) {\r
+             mics_in[chanToMicMapping[k]] = &in_r[k*SYS_FRAME_LENGTH];   /* find the frame start for each microphone */\r
+           }\r
+           /* consume samples pointed to by read pointer in_r as provided in misc_in[] */\r
+\r
+           // BF+ASNR+MSS processing\r
+           /* Here comes a lot of work */\r
+           /* We start with beamformers */\r
+\r
+           // get the number of virtual mics\r
+           nvmics = sysContext.nvmics;\r
+           t1 = Timestamp_get();\r
+           for (k = 0; k < nvmics; k++) {\r
+             inst_p  = sysContext.bfInst_p[k];     /* fetch the bf instance pointer */\r
+             frame_p = sysContext.vmicfrm[k];      /* point to the output frame buffer */\r
+\r
+             err = bfProcess(inst_p, (void*)&mics_in[0], (void*)frame_p);\r
+\r
+             if (err != bf_NOERR) {\r
+               SYS_CHECK_ERROR(SYS_ERR_BFERROR);\r
+             }\r
+           } /* for */\r
+           t2 = Timestamp_get();\r
+           delta = t2-t1;\r
+           txTaskProfile.bf.min = MIN(txTaskProfile.bf.min,delta);\r
+           txTaskProfile.bf.max = MAX(txTaskProfile.bf.max,delta);\r
+           txTaskProfile.bf.n++;\r
+           txTaskProfile.bf.total += (float)delta;\r
+\r
+           /* At this point we have consumed all input samples. Currently we did not implement\r
+            * any protection to prevent the swiDataIn from stepping over while we were doing this.\r
+            * We could let this task to handle the read pointer and SWI to handle write pointer which\r
+            * could be used to detect if such overrun would happen. */\r
+\r
+           /* Done with the beamformers */\r
+           /* Start ASNR's */\r
+\r
+           t1 = Timestamp_get();\r
+           for (k = 0; k < nvmics; k++) {\r
+             inst_p  = sysContext.asnrInst_p[k];   /* fetch the bf instance pointer */\r
+             frame_p = sysContext.vmicfrm[k];      /* point to the output frame buffer */\r
+\r
+             err = asnrProcess(inst_p, (void*)frame_p, (void*)frame_p);\r
+\r
+             if (err != asnr_NOERR) {\r
+               SYS_CHECK_ERROR(SYS_ERR_ASNRERROR);\r
+             } /* if */\r
+           } /* for */\r
+           t2 = Timestamp_get();\r
+           delta = t2-t1;\r
+           txTaskProfile.asnr.min = MIN(txTaskProfile.asnr.min,delta);\r
+           txTaskProfile.asnr.max = MAX(txTaskProfile.asnr.max,delta);\r
+           txTaskProfile.asnr.n++;\r
+           txTaskProfile.asnr.total += (float)delta;\r
+\r
+           /* Done with the ASNR's */\r
+           /* Run MSS */\r
+\r
+           t1 = Timestamp_get();\r
+           inst_p  = sysContext.mssInst_p;         /* fetch the MSS instance pointer */\r
+           frame_p = outBuf[gtxFrameIndexCount];    /* point to the output frame buffer */\r
+\r
+           err = mssProcess(inst_p,                            /* instance */\r
+                                        (void*)frame_p,                /* output frame pointers */\r
+                            (void*)frame_p,        /* WORKAROUND (not used, but no NULL) */\r
+                            (void**)sysContext.vmicfrm,  /* Virtual microphones (beams) */\r
+                            NULL,                        /* No remote mics */\r
+                            NULL,                        /* No clean mics */\r
+                            (void**)mics_in,             /* Raw microphone array inputs */\r
+                            NULL);                       /* Beam not supported (see fixed inputs) */\r
+\r
+           if (err != mss_NOERR) {\r
+             SYS_CHECK_ERROR(SYS_ERR_MSSERROR);\r
+           } /* if */\r
+           t2 = Timestamp_get();\r
+           delta = t2-t1;\r
+           txTaskProfile.mss.min = MIN(txTaskProfile.mss.min,delta);\r
+           txTaskProfile.mss.max = MAX(txTaskProfile.mss.max,delta);\r
+           txTaskProfile.mss.n++;\r
+           txTaskProfile.mss.total += (float)delta;\r
+\r
+           /* Trace source selection */\r
+           /*    Write Args:\r
+            *      arg2: (value) Angle in degrees\r
+            *      arg3: (aux1)  0 - current source, 1 - new source\r
+            *      arg4: (aux2)  source index\r
+            */\r
+           err = mssDebugStat(inst_p, &mssDbg);\r
+           if (err !=mss_NOERR) {\r
+             SYS_CHECK_ERROR(SYS_ERR_MSSDEBUG);\r
+           }\r
+           /* mssDbg.cur_src.group/.index has the current source */\r
+           /* mssDbg.new_src.group/.index has "proposed" source */\r
+           if (mssDbg.cur_src.group != mssDbgCurSrc.group ||\r
+               mssDbg.cur_src.index != mssDbgCurSrc.index)\r
+           {\r
+             mssDbgCurSrc = mssDbg.cur_src;\r
+             angle = sysBfFilterAngles[sysBfVMicAngles[mssDbgCurSrc.index]];\r
+             ///Log_write6(UIAEvt_intWithKey, angle, 0, mssDbgCurSrc.index, (IArg)"MSS-C: %d, G:%d", 0, mssDbgCurSrc.group);\r
+           }\r
+           if (mssDbg.new_src.group != mssDbgNewSrc.group ||\r
+               mssDbg.new_src.index != mssDbgNewSrc.index)\r
+           {\r
+             mssDbgNewSrc = mssDbg.new_src;\r
+             angle = sysBfFilterAngles[sysBfVMicAngles[mssDbgNewSrc.index]];\r
+             ///Log_write6(UIAEvt_intWithKey, angle, 1, mssDbgNewSrc.index, (IArg)"MSS-N: %d, G:%d", 1, mssDbgNewSrc.group);\r
+           }\r
+\r
+           /* Done with MSS */\r
+\r
+           /*---------------------------------*/\r
+           /* Save samples to the TX buffer */\r
+           /*---------------------------------*/\r
+               // copy MSS output to TX left channel and RX mic 5 to TX right channel\r
+               // set the tempOutPtr to MSS output\r
+       tempOutPtr = outBuf[gtxFrameIndexCount];\r
+               // set the tempMicPtr to mic_in[4]\r
+       tempMicPtr = (unsigned char *)mics_in[4];\r
+       // set the TX pointer to left cahhnel\r
+               tempTxPtr = txBuf[gtxFrameIndexCount];\r
+               // copy upsampled and Q15 to Q31 converted MSS output to TX left channel\r
+               // copy upsampled and Q15 to Q31 converted mics_in[4] to TX right channel\r
+               for (i=0; i<BUFLEN/(SYS_FS_RATIO*2); i++)\r
+       {\r
+                       // up sampling by SYS_FS_RATIO (16khz to 48khz)\r
+                       for (k=0; k<SYS_FS_RATIO; k++)\r
+                       {\r
+                               // MSS output\r
+                               // Q15 to Q31\r
+                               memset(tempTxPtr, 0, sizeof(short));\r
+                               tempTxPtr += sizeof(short);\r
+                               // copy the MSS output to the left channel of TX buffer\r
+                               memcpy(tempTxPtr, tempOutPtr, sizeof(short));\r
+                               tempTxPtr += sizeof(short);\r
+\r
+                               // mics_in[4]\r
+                               // Q15 to Q31\r
+                               memset(tempTxPtr, 0, sizeof(short));\r
+                               tempTxPtr += sizeof(short);\r
+                               // copy the mics_in[4] to the right channel of TX buffer\r
+                               memcpy(tempTxPtr, tempMicPtr, sizeof(short));\r
+                               tempTxPtr += sizeof(short);\r
+                       }\r
+                       // move to next sample\r
+                       tempOutPtr += sizeof(short);\r
+                       tempMicPtr += sizeof(short);\r
+       }\r
+#else   // 7 to 2 Loopback Path\r
+               // copy RX mic 1 to TX left channel and RX mic 5 to TX right channel\r
+               // set the RX pointer to mic 1\r
+       tempRxPtr = rxBuf[grxFrameIndexCount];\r
+       // set the TX pointer to left cahhnel\r
+               tempTxPtr = txBuf[gtxFrameIndexCount];\r
+               // copy RX mic 1 to TX left channel\r
+               for (i=0; i<BUFLEN/2; i++)\r
+       {\r
+                       // copy the left channel of first serializer to the left channel of TX buffer\r
+                       memcpy(tempTxPtr, tempRxPtr, 4);\r
+               tempTxPtr += 4;\r
+                       // copy the left channel of second serializer to the right channel of TX buffer\r
+                       memcpy(tempTxPtr, tempRxPtr+BUFSIZE, 4);\r
+               tempTxPtr += 4;\r
+               tempRxPtr += RX_NUM_SERIALIZER*2;\r
+       }\r
+#endif   // Signal Processing Path\r
+#endif   // Mcasp_BufferFormat\r
+#endif   // AUDK2G_AUDIO_DAC\r
+\r
+        // Audio debug dump\r
+        if (gAudDumpBufIdx<FRAME_PER_SEC*DUMP_SEC)\r
+        {\r
+               // copy the MSS output\r
+                       ///memcpy((Ptr)(&gAudDumpBuf[gAudDumpBufIdx*BUFSIZE/(SYS_FS_RATIO*2*2)]), outBuf[gtxFrameIndexCount], (BUFSIZE/(SYS_FS_RATIO*2*2)));\r
+\r
+                       // copy first down-sampled and converted channel (L channel for first serializer)\r
+                       ///memcpy((Ptr)(&gAudDumpBuf[gAudDumpBufIdx*BUFSIZE/(SYS_FS_RATIO*2*2)]), mics_in[0], (BUFSIZE/(SYS_FS_RATIO*2*2)));\r
+\r
+               // copy RX all 8 channels (L/R channels for all 4 serializers)\r
+                       ///memcpy((Ptr)(&gAudDumpBuf[gAudDumpBufIdx*BUFSIZE*RX_NUM_SERIALIZER]), rxBuf[grxFrameIndexCount], (BUFSIZE * RX_NUM_SERIALIZER));\r
+\r
+                       // copy RX first channel (L channel for the first serializer)\r
+                       ///memcpy((Ptr)(&gAudDumpBuf[gAudDumpBufIdx*(BUFSIZE/2)]), rxBuf[grxFrameIndexCount], (BUFSIZE/2));\r
+\r
+               // copy TX buffer\r
+               ///memcpy((Ptr)(&gAudDumpBuf[gAudDumpBufIdx*(BUFSIZE)]), txBuf[gtxFrameIndexCount], BUFSIZE);\r
+\r
+                       gAudDumpBufIdx++;\r
+        }\r
+\r
+#if (AUDK2G_AUDIO_DAC)\r
+        /* Issue full buffer to the output stream                             */\r
+        /* TX frame processing */\r
+               txFrame[gtxFrameIndexCount].cmd    = MCASP_WRITE;\r
+               txFrame[gtxFrameIndexCount].addr   = (void*)(getGlobalAddr(txBuf[gtxFrameIndexCount]));\r
+               txFrame[gtxFrameIndexCount].size   = (BUFSIZE * TX_NUM_SERIALIZER);\r
+               txFrame[gtxFrameIndexCount].arg    = (uint32_t) mcaspTxChanArg;\r
+               txFrame[gtxFrameIndexCount].status = 0;\r
+               txFrame[gtxFrameIndexCount].misc   = 1;   /* reserved - used in callback to indicate asynch packet */\r
+\r
+               mcaspSubmitChan(hMcaspTxChan, &txFrame[gtxFrameIndexCount]);\r
+#endif\r
+\r
+        /* Issue an empty buffer to the input stream                          */\r
+               rxFrame[grxFrameIndexCount].cmd    = MCASP_READ;\r
+               rxFrame[grxFrameIndexCount].addr   = (void*)(getGlobalAddr(rxBuf[grxFrameIndexCount]));\r
+               rxFrame[grxFrameIndexCount].size   = (BUFSIZE * RX_NUM_SERIALIZER);\r
+               rxFrame[grxFrameIndexCount].arg    = (uint32_t) mcaspRxChanArg;\r
+               rxFrame[grxFrameIndexCount].status = 0;\r
+               rxFrame[grxFrameIndexCount].misc   = 1;   /* reserved - used in callback to indicate asynch packet */\r
+\r
+        mcaspSubmitChan(hMcaspRxChan, &rxFrame[grxFrameIndexCount]);\r
+       }\r
+\r
+    testRet(0);\r
+}\r
+\r
+/* Nothing past this point */\r
diff --git a/realtime_demo_bios/k2g/src/mcasp_osal.c b/realtime_demo_bios/k2g/src/mcasp_osal.c
new file mode 100644 (file)
index 0000000..16186f9
--- /dev/null
@@ -0,0 +1,184 @@
+#include <mcasp_osal.h>\r
+#include <mcasp_drv.h>\r
+#include <ti/csl/cslr_device.h>\r
+#include <include/McaspLocal.h>\r
+extern Mcasp_Module_State Mcasp_module;\r
+#ifdef _TMS320C6X\r
+#include <ti/sysbios/family/c64p/Hwi.h>\r
+#include <ti/sysbios/family/c66/tci66xx/CpIntc.h>\r
+#include <ti/sysbios/family/c64p/EventCombiner.h>\r
+#else\r
+#include <ti/sysbios/hal/Hwi.h>\r
+#endif\r
+\r
+#include <ti/sysbios/BIOS.h>\r
+#include <ti/sysbios/hal/Cache.h>\r
+\r
+#include <ti/sysbios/knl/Queue.h>\r
+#include <ti/sysbios/knl/Task.h>\r
+#include <ti/sysbios/knl/Swi.h>\r
+#include <ti/osal/osal.h>\r
+\r
+\r
+void * osal_Queue_handle(void *structPtr)\r
+{\r
+       return(Queue_handle(structPtr));\r
+}\r
+\r
+void osal_Queue_construct(void * ptr, int32_t arg)\r
+{\r
+       Queue_construct((Queue_Struct*)ptr, NULL);\r
+}\r
+\r
+void osal_Task_sleep(int32_t msec)\r
+{\r
+       int i,j;\r
+       //Task_sleep(msec);\r
+        for (i=0; i < msec; i++) {\r
+               for (j=0; j < 1000; j++) {\r
+#ifdef _TMS320C6X\r
+                       asm("* Comment to maintain loops through compiler optimization");\r
+#endif\r
+               }\r
+        }\r
+}\r
+int32_t osal_getThreadType()\r
+{\r
+       return BIOS_getThreadType() == BIOS_ThreadType_Task;\r
+\r
+}\r
+#ifdef _TMS320C6X\r
+int hostintArr[6]={33,34,35,36,37,38};\r
+int eventIdArr[6]={0x33,0x34,0x35,0x36,0x37,0x38};\r
+void osal_EventCombiner_disableEvent(int32_t cpuEventNum)\r
+{\r
+\r
+       EventCombiner_disableEvent(eventIdArr[cpuEventNum- CSL_CIC_McASP_0_XINT]);\r
+\r
+\r
+}\r
+void osal_EventCombiner_enableEvent(int32_t cpuEventNum)\r
+{\r
+\r
+       EventCombiner_enableEvent(eventIdArr[cpuEventNum- CSL_CIC_McASP_0_XINT]);\r
+\r
+}\r
+\r
+void osal_EventCombiner_dispatchPlug(uint32_t evt, void * intIsr, void *arg, int32_t flag )\r
+{\r
+       int hostint,eventId;\r
+         CpIntc_dispatchPlug(evt, (CpIntc_FuncPtr)intIsr, 0, TRUE);\r
+         hostint=hostintArr[evt- CSL_CIC_McASP_0_XINT];\r
+                                  /* The configuration is for CPINTC0. We map system interrupt 0x88 to Host Interrupt 32. */\r
+                                  CpIntc_mapSysIntToHostInt(0, evt, hostint);\r
+\r
+                                  /* Enable the Host Interrupt. */\r
+                                  CpIntc_enableHostInt(0, hostint);\r
+\r
+                                  /* Enable the System Interrupt */\r
+                                  CpIntc_enableSysInt(0, evt);\r
+\r
+                                  /* Get the event id associated with the host interrupt. */\r
+                                  eventId = eventIdArr[evt- CSL_CIC_McASP_0_XINT];\r
+                                  /* enable the 'global' switch */\r
+\r
+                                 /* Enable the Xfer Completion Event Interrupt */\r
+                                      EventCombiner_dispatchPlug(eventId,\r
+                                                                               (EventCombiner_FuncPtr)(&CpIntc_dispatch),\r
+                                                               hostint, 1);\r
+\r
+\r
+       //EventCombiner_dispatchPlug(evt, (EventCombiner_FuncPtr)intIsr, arg, flag);\r
+}\r
+#endif\r
+\r
+\r
+#if 0\r
+int gDebug=0;\r
+\r
+void assert(int in)\r
+{\r
+if(in <=0)\r
+       gDebug++;\r
+}\r
+#endif\r
+\r
+void osal_Swi_post(void * obj)\r
+{\r
+       Swi_post((Swi_Handle)obj);\r
+\r
+}\r
+int32_t osal_Queue_empty(void * handle)\r
+{\r
+return Queue_empty(Queue_handle(handle));\r
+//     return ((Mcasp_QueueElem*)handle->next == &((Mcasp_QueueElem*)handle));\r
+\r
+}\r
+\r
+MCASP_Packet * osal_Queue_get(void * handle)\r
+{\r
+return Queue_get(Queue_handle(handle));\r
+}\r
+\r
+void osal_Queue_put(void * handle,Ptr ptr)\r
+               {\r
+       Queue_put(Queue_handle(handle),(Ptr)ptr);\r
+               }\r
+\r
+\r
+McaspOsal_IntrHandle McaspOsal_registerIntr(\r
+    uint32_t              intNum,\r
+    McaspOsal_IntrFuncPtr fxn,\r
+    const void         *arg0)\r
+{\r
+    Hwi_Params hwiParams = {0};\r
+\r
+    Hwi_Params_init(&hwiParams);\r
+    hwiParams.arg = (uint32_t) arg0;\r
+    return (McaspOsal_IntrHandle) Hwi_create(\r
+               (int32_t) intNum,\r
+               (Hwi_FuncPtr) fxn,\r
+               &hwiParams,\r
+               0U);\r
+}\r
+void McaspOsal_unRegisterIntr(McaspOsal_IntrHandle  handle)\r
+{\r
+    Hwi_delete(handle);\r
+}\r
+\r
+/* OSAL functions for Platform Library */\r
+uint8_t *Osal_platformMalloc (uint32_t num_bytes, uint32_t alignment)\r
+{\r
+       return malloc(num_bytes);\r
+}\r
+\r
+void Osal_platformFree (uint8_t *dataPtr, uint32_t num_bytes)\r
+{\r
+    /* Free up the memory */\r
+    if (dataPtr)\r
+    {\r
+        free(dataPtr);\r
+    }\r
+}\r
+\r
+void Osal_platformSpiCsEnter(void)\r
+{\r
+    /* Get the hardware semaphore.\r
+     *\r
+     * Acquire Multi core CPPI synchronization lock\r
+     */\r
+    //while ((CSL_semAcquireDirect (PLATFORM_SPI_HW_SEM)) == 0);\r
+\r
+    return;\r
+}\r
+\r
+void Osal_platformSpiCsExit (void)\r
+{\r
+    /* Release the hardware semaphore\r
+     *\r
+     * Release multi-core lock.\r
+     */\r
+    //CSL_semReleaseSemaphore (PLATFORM_SPI_HW_SEM);\r
+\r
+    return;\r
+}\r
diff --git a/realtime_demo_bios/k2g/src/sample_cs.c b/realtime_demo_bios/k2g/src/sample_cs.c
new file mode 100644 (file)
index 0000000..2e2475c
--- /dev/null
@@ -0,0 +1,421 @@
+/*\r
+ * sample_cs.c\r
+ *\r
+ * Sample functions showing the implementation of critical section entry/exit\r
+ * routines and various semaphore related routines (all BIOS6 depenedent).\r
+ * These implementations MUST be provided by the user / application, using the\r
+ * EDMA3 driver, for its correct functioning.\r
+ *\r
+ * Copyright (C) 2009-2012 Texas Instruments Incorporated - http://www.ti.com/\r
+ *\r
+ *\r
+ *  Redistribution and use in source and binary forms, with or without\r
+ *  modification, are permitted provided that the following conditions\r
+ *  are met:\r
+ *\r
+ *    Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ *    Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the\r
+ *    distribution.\r
+ *\r
+ *    Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+*/\r
+\r
+#include <ti/sysbios/family/c64p/EventCombiner.h>\r
+#include <ti/sysbios/hal/Cache.h>\r
+#include <ti/sysbios/hal/Hwi.h>\r
+#include <ti/sysbios/knl/Task.h>\r
+#include <ti/sysbios/knl/Semaphore.h>\r
+\r
+#include <ti/sdo/edma3/rm/sample/bios6_edma3_rm_sample.h>\r
+#include <ti/sdo/edma3/drv/edma3_drv.h>\r
+\r
+extern unsigned int ccXferCompInt[][EDMA3_MAX_REGIONS];\r
+extern unsigned int ccErrorInt[];\r
+extern unsigned int tcErrorInt[][EDMA3_MAX_TC];\r
+\r
+/**\r
+ * Shadow Region on which the executable is running. Its value is\r
+ * populated with the DSP Instance Number here in this case.\r
+ */\r
+extern unsigned int region_id;\r
+\r
+/**\r
+ * \brief   EDMA3 OS Protect Entry\r
+ *\r
+ *      This function saves the current state of protection in 'intState'\r
+ *      variable passed by caller, if the protection level is\r
+ *      EDMA3_OS_PROTECT_INTERRUPT. It then applies the requested level of\r
+ *      protection.\r
+ *      For EDMA3_OS_PROTECT_INTERRUPT_XFER_COMPLETION and\r
+ *      EDMA3_OS_PROTECT_INTERRUPT_CC_ERROR, variable 'intState' is ignored,\r
+ *      and the requested interrupt is disabled.\r
+ *      For EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR, '*intState' specifies the\r
+ *      Transfer Controller number whose interrupt needs to be disabled.\r
+ *\r
+ * \param   level is numeric identifier of the desired degree of protection.\r
+ * \param   intState is memory location where current state of protection is\r
+ *      saved for future use while restoring it via edma3OsProtectExit() (Only\r
+ *      for EDMA3_OS_PROTECT_INTERRUPT protection level).\r
+ * \return  None\r
+ */\r
+void edma3OsProtectEntry (unsigned int edma3InstanceId,\r
+                                                       int level, unsigned int *intState)\r
+    {\r
+    if (((level == EDMA3_OS_PROTECT_INTERRUPT)\r
+        || (level == EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR))\r
+        && (intState == NULL))\r
+        {\r
+        return;\r
+        }\r
+    else\r
+        {\r
+        switch (level)\r
+            {\r
+            /* Disable all (global) interrupts */\r
+            case EDMA3_OS_PROTECT_INTERRUPT :\r
+                *intState = Hwi_disable();\r
+                break;\r
+\r
+            /* Disable scheduler */\r
+            case EDMA3_OS_PROTECT_SCHEDULER :\r
+                                       Task_disable();\r
+                break;\r
+\r
+            /* Disable EDMA3 transfer completion interrupt only */\r
+            case EDMA3_OS_PROTECT_INTERRUPT_XFER_COMPLETION :\r
+                EventCombiner_disableEvent(ccXferCompInt[edma3InstanceId][region_id]);\r
+                break;\r
+\r
+            /* Disable EDMA3 CC error interrupt only */\r
+            case EDMA3_OS_PROTECT_INTERRUPT_CC_ERROR :\r
+                EventCombiner_disableEvent(ccErrorInt[edma3InstanceId]);\r
+                break;\r
+\r
+            /* Disable EDMA3 TC error interrupt only */\r
+            case EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR :\r
+                switch (*intState)\r
+                    {\r
+                    case 0:\r
+                    case 1:\r
+                    case 2:\r
+                    case 3:\r
+                    case 4:\r
+                    case 5:\r
+                    case 6:\r
+                    case 7:\r
+                        /* Fall through... */\r
+                        /* Disable the corresponding interrupt */\r
+                        EventCombiner_disableEvent(tcErrorInt[edma3InstanceId][*intState]);\r
+                        break;\r
+\r
+                     default:\r
+                        break;\r
+                    }\r
+\r
+                break;\r
+\r
+            default:\r
+                break;\r
+            }\r
+        }\r
+    }\r
+\r
+\r
+/**\r
+ * \brief   EDMA3 OS Protect Exit\r
+ *\r
+ *      This function undoes the protection enforced to original state\r
+ *      as is specified by the variable 'intState' passed, if the protection\r
+ *      level is EDMA3_OS_PROTECT_INTERRUPT.\r
+ *      For EDMA3_OS_PROTECT_INTERRUPT_XFER_COMPLETION and\r
+ *      EDMA3_OS_PROTECT_INTERRUPT_CC_ERROR, variable 'intState' is ignored,\r
+ *      and the requested interrupt is enabled.\r
+ *      For EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR, 'intState' specifies the\r
+ *      Transfer Controller number whose interrupt needs to be enabled.\r
+ * \param   level is numeric identifier of the desired degree of protection.\r
+ * \param   intState is original state of protection at time when the\r
+ *      corresponding edma3OsProtectEntry() was called (Only\r
+ *      for EDMA3_OS_PROTECT_INTERRUPT protection level).\r
+ * \return  None\r
+ */\r
+void edma3OsProtectExit (unsigned int edma3InstanceId,\r
+                        int level, unsigned int intState)\r
+    {\r
+    switch (level)\r
+        {\r
+        /* Enable all (global) interrupts */\r
+        case EDMA3_OS_PROTECT_INTERRUPT :\r
+            Hwi_restore(intState);\r
+            break;\r
+\r
+        /* Enable scheduler */\r
+        case EDMA3_OS_PROTECT_SCHEDULER :\r
+            Task_enable();\r
+            break;\r
+\r
+        /* Enable EDMA3 transfer completion interrupt only */\r
+        case EDMA3_OS_PROTECT_INTERRUPT_XFER_COMPLETION :\r
+            EventCombiner_enableEvent(ccXferCompInt[edma3InstanceId][region_id]);\r
+            break;\r
+\r
+        /* Enable EDMA3 CC error interrupt only */\r
+        case EDMA3_OS_PROTECT_INTERRUPT_CC_ERROR :\r
+            EventCombiner_enableEvent(ccErrorInt[edma3InstanceId]);\r
+            break;\r
+\r
+        /* Enable EDMA3 TC error interrupt only */\r
+        case EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR :\r
+            switch (intState)\r
+                {\r
+                case 0:\r
+                case 1:\r
+                case 2:\r
+                case 3:\r
+                case 4:\r
+                case 5:\r
+                case 6:\r
+                case 7:\r
+                    /* Fall through... */\r
+                    /* Enable the corresponding interrupt */\r
+                    EventCombiner_enableEvent(tcErrorInt[edma3InstanceId][intState]);\r
+                    break;\r
+\r
+                 default:\r
+                    break;\r
+                }\r
+\r
+            break;\r
+\r
+        default:\r
+            break;\r
+        }\r
+    }\r
+\r
+\r
+/**\r
+ *  \brief   EDMA3 Cache Invalidate\r
+ *\r
+ *  This function invalidates the D cache.\r
+ *\r
+ *  \param  mem_start_ptr [IN]      Starting address of memory.\r
+ *                                  Please note that this should be\r
+ *                                  aligned according to the cache line size.\r
+ *  \param  num_bytes [IN]          length of buffer\r
+ *  \return  EDMA3_DRV_SOK if success, else error code in case of error\r
+ *          or non-alignment of buffers.\r
+ *\r
+ * Note: This function is required if the buffer is in DDR.\r
+ * For other cases, where buffer is NOT in DDR, user\r
+ * may or may not require the below implementation and\r
+ * should modify it according to her need.\r
+ */\r
+EDMA3_DRV_Result Edma3_CacheInvalidate(unsigned int mem_start_ptr,\r
+                           unsigned int    num_bytes)\r
+    {\r
+    EDMA3_DRV_Result cacheInvResult = EDMA3_DRV_SOK;\r
+\r
+    /* Verify whether the start address is cache aligned or not */\r
+    if((mem_start_ptr & (EDMA3_CACHE_LINE_SIZE_IN_BYTES-1u))    !=    0)\r
+        {\r
+#ifdef EDMA3_DRV_DEBUG\r
+        EDMA3_DRV_PRINTF("\r\n Cache : Memory is not %d bytes alinged\r\n",\r
+                            EDMA3_CACHE_LINE_SIZE_IN_BYTES);\r
+#endif\r
+        cacheInvResult = EDMA3_NON_ALIGNED_BUFFERS_ERROR;\r
+        }\r
+    else\r
+        {\r
+               Cache_inv((Ptr)mem_start_ptr, num_bytes, Cache_Type_ALL, TRUE);\r
+        }\r
+\r
+    return cacheInvResult;\r
+}\r
+\r
+\r
+\r
+/**\r
+ * \brief   EDMA3 Cache Flush\r
+ *\r
+ *  This function flushes (cleans) the Cache\r
+ *\r
+ *  \param  mem_start_ptr [IN]      Starting address of memory.\r
+ *                                  Please note that this should be\r
+ *                                  aligned according to the cache line size.\r
+ *  \param  num_bytes [IN]          length of buffer\r
+ *  \return  EDMA3_DRV_SOK if success, else error code in case of error\r
+ *          or non-alignment of buffers.\r
+ *\r
+ * Note: This function is required if the buffer is in DDR.\r
+ * For other cases, where buffer is NOT in DDR, user\r
+ * may or may not require the below implementation and\r
+ * should modify it according to her need.\r
+ */\r
+EDMA3_DRV_Result Edma3_CacheFlush(unsigned int mem_start_ptr,\r
+                      unsigned int num_bytes)\r
+    {\r
+    EDMA3_DRV_Result cacheFlushResult = EDMA3_DRV_SOK;\r
+\r
+    /* Verify whether the start address is cache aligned or not */\r
+    if((mem_start_ptr & (EDMA3_CACHE_LINE_SIZE_IN_BYTES-1u))    !=    0)\r
+        {\r
+#ifdef EDMA3_DRV_DEBUG\r
+        EDMA3_DRV_PRINTF("\r\n Cache : Memory is not %d bytes alinged\r\n",\r
+                            EDMA3_CACHE_LINE_SIZE_IN_BYTES);\r
+#endif\r
+        cacheFlushResult = EDMA3_NON_ALIGNED_BUFFERS_ERROR;\r
+        }\r
+    else\r
+        {\r
+               Cache_wb((Ptr)mem_start_ptr, num_bytes, Cache_Type_ALL, TRUE);\r
+        }\r
+\r
+    return cacheFlushResult;\r
+}\r
+\r
+\r
+/**\r
+  * Counting Semaphore related functions (OS dependent) should be\r
+  * called/implemented by the application. A handle to the semaphore\r
+  * is required while opening the driver/resource manager instance.\r
+  */\r
+\r
+/**\r
+ * \brief   EDMA3 OS Semaphore Create\r
+ *\r
+ *      This function creates a counting semaphore with specified\r
+ *      attributes and initial value. It should be used to create a semaphore\r
+ *      with initial value as '1'. The semaphore is then passed by the user\r
+ *      to the EDMA3 driver/RM for proper sharing of resources.\r
+ * \param   initVal [IN] is initial value for semaphore\r
+ * \param   semParams [IN] is the semaphore attributes.\r
+ * \param   hSem [OUT] is location to recieve the handle to just created\r
+ *      semaphore\r
+ * \return  EDMA3_DRV_SOK if succesful, else a suitable error code.\r
+ */\r
+EDMA3_DRV_Result edma3OsSemCreate(int initVal,\r
+                                                       const Semaphore_Params *semParams,\r
+                               EDMA3_OS_Sem_Handle *hSem)\r
+    {\r
+    EDMA3_DRV_Result semCreateResult = EDMA3_DRV_SOK;\r
+\r
+    if(NULL == hSem)\r
+        {\r
+        semCreateResult = EDMA3_DRV_E_INVALID_PARAM;\r
+        }\r
+    else\r
+        {\r
+        *hSem = (EDMA3_OS_Sem_Handle)Semaphore_create(initVal, semParams, NULL);\r
+        if ( (*hSem) == NULL )\r
+            {\r
+            semCreateResult = EDMA3_DRV_E_SEMAPHORE;\r
+            }\r
+        }\r
+\r
+    return semCreateResult;\r
+    }\r
+\r
+\r
+/**\r
+ * \brief   EDMA3 OS Semaphore Delete\r
+ *\r
+ *      This function deletes or removes the specified semaphore\r
+ *      from the system. Associated dynamically allocated memory\r
+ *      if any is also freed up.\r
+ * \param   hSem [IN] handle to the semaphore to be deleted\r
+ * \return  EDMA3_DRV_SOK if succesful else a suitable error code\r
+ */\r
+EDMA3_DRV_Result edma3OsSemDelete(EDMA3_OS_Sem_Handle hSem)\r
+    {\r
+    EDMA3_DRV_Result semDeleteResult = EDMA3_DRV_SOK;\r
+\r
+    if(NULL == hSem)\r
+        {\r
+        semDeleteResult = EDMA3_DRV_E_INVALID_PARAM;\r
+        }\r
+    else\r
+        {\r
+               Semaphore_delete((Semaphore_Handle *)&hSem);\r
+        }\r
+\r
+    return semDeleteResult;\r
+    }\r
+\r
+\r
+/**\r
+ * \brief   EDMA3 OS Semaphore Take\r
+ *\r
+ *      This function takes a semaphore token if available.\r
+ *      If a semaphore is unavailable, it blocks currently\r
+ *      running thread in wait (for specified duration) for\r
+ *      a free semaphore.\r
+ * \param   hSem [IN] is the handle of the specified semaphore\r
+ * \param   mSecTimeout [IN] is wait time in milliseconds\r
+ * \return  EDMA3_DRV_Result if successful else a suitable error code\r
+ */\r
+EDMA3_DRV_Result edma3OsSemTake(EDMA3_OS_Sem_Handle hSem, int mSecTimeout)\r
+    {\r
+    EDMA3_DRV_Result semTakeResult = EDMA3_DRV_SOK;\r
+    unsigned short semPendResult;\r
+\r
+    if(NULL == hSem)\r
+        {\r
+        semTakeResult = EDMA3_DRV_E_INVALID_PARAM;\r
+        }\r
+    else\r
+        {\r
+        semPendResult = Semaphore_pend(hSem, mSecTimeout);\r
+        if (semPendResult == FALSE)\r
+            {\r
+            semTakeResult = EDMA3_DRV_E_SEMAPHORE;\r
+            }\r
+        }\r
+\r
+    return semTakeResult;\r
+    }\r
+\r
+\r
+/**\r
+ * \brief   EDMA3 OS Semaphore Give\r
+ *\r
+ *      This function gives or relinquishes an already\r
+ *      acquired semaphore token\r
+ * \param   hSem [IN] is the handle of the specified semaphore\r
+ * \return  EDMA3_DRV_Result if successful else a suitable error code\r
+ */\r
+EDMA3_DRV_Result edma3OsSemGive(EDMA3_OS_Sem_Handle hSem)\r
+    {\r
+    EDMA3_DRV_Result semGiveResult = EDMA3_DRV_SOK;\r
+\r
+    if(NULL == hSem)\r
+        {\r
+        semGiveResult = EDMA3_DRV_E_INVALID_PARAM;\r
+        }\r
+    else\r
+        {\r
+               Semaphore_post(hSem);\r
+        }\r
+\r
+    return semGiveResult;\r
+    }\r
+\r
+/* End of File */\r
+\r
diff --git a/realtime_demo_bios/k2g/src/sample_k2g_cfg.c b/realtime_demo_bios/k2g/src/sample_k2g_cfg.c
new file mode 100644 (file)
index 0000000..05677d9
--- /dev/null
@@ -0,0 +1,1218 @@
+/*\r
+ * sample_tci616_cfg.c\r
+ *\r
+ * Platform specific EDMA3 hardware related information like number of transfer\r
+ * controllers, various interrupt ids etc. It is used while interrupts\r
+ * enabling / disabling. It needs to be ported for different SoCs.\r
+ *\r
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/\r
+ *\r
+ *\r
+ *  Redistribution and use in source and binary forms, with or without\r
+ *  modification, are permitted provided that the following conditions\r
+ *  are met:\r
+ *\r
+ *    Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ *    Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the\r
+ *    distribution.\r
+ *\r
+ *    Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+*/\r
+\r
+#include <ti/sdo/edma3/rm/edma3_rm.h>\r
+\r
+/* Number of EDMA3 controllers present in the system */\r
+#define NUM_EDMA3_INSTANCES                    2u\r
+const unsigned int numEdma3Instances = NUM_EDMA3_INSTANCES;\r
+\r
+/* Number of DSPs present in the system */\r
+#define NUM_DSPS                                       1u\r
+//const unsigned int numDsps = NUM_DSPS;\r
+\r
+#define CGEM_REG_START                  (0x01800000)\r
+\r
+\r
+extern cregister volatile unsigned int DNUM;\r
+\r
+#define MAP_LOCAL_TO_GLOBAL_ADDR(addr) ((1<<28)|(DNUM<<24)|(((unsigned int)addr)&0x00ffffff))\r
+\r
+\r
+/* Determine the processor id by reading DNUM register. */\r
+unsigned short determineProcId()\r
+       {\r
+       volatile unsigned int *addr;\r
+       unsigned int core_no;\r
+\r
+    /* Identify the core number */\r
+    addr = (unsigned int *)(CGEM_REG_START+0x40000);\r
+    core_no = ((*addr) & 0x000F0000)>>16;\r
+\r
+       return core_no;\r
+       }\r
+\r
+signed char*  getGlobalAddr(signed char* addr)\r
+{\r
+    if (((unsigned int)addr & (unsigned int)0xFF000000) != 0)\r
+    {\r
+        return (addr); /* The address is already a global address */\r
+    }\r
+\r
+    return((signed char*)(MAP_LOCAL_TO_GLOBAL_ADDR(addr)));\r
+}\r
+/** Whether global configuration required for EDMA3 or not.\r
+ * This configuration should be done only once for the EDMA3 hardware by\r
+ * any one of the masters (i.e. DSPs).\r
+ * It can be changed depending on the use-case.\r
+ */\r
+unsigned int gblCfgReqdArray [NUM_DSPS] = {\r
+                                                                       0,      /* DSP#0 is Master, will do the global init */\r
+\r
+                                                                       };\r
+\r
+unsigned short isGblConfigRequired(unsigned int dspNum)\r
+       {\r
+       return gblCfgReqdArray[dspNum];\r
+       }\r
+\r
+/* Semaphore handles */\r
+EDMA3_OS_Sem_Handle semHandle[NUM_EDMA3_INSTANCES] = {NULL,NULL};\r
+\r
+\r
+/* Variable which will be used internally for referring number of Event Queues. */\r
+unsigned int numEdma3EvtQue[NUM_EDMA3_INSTANCES] = {2u, 2u};\r
+\r
+/* Variable which will be used internally for referring number of TCs. */\r
+unsigned int numEdma3Tc[NUM_EDMA3_INSTANCES] = {2u, 2u};\r
+\r
+/**\r
+ * Variable which will be used internally for referring transfer completion\r
+ * interrupt. Completion interrupts for all the shadow regions and all the\r
+ * EDMA3 controllers are captured since it is a multi-DSP platform.\r
+ */\r
+unsigned int ccXferCompInt[NUM_EDMA3_INSTANCES][EDMA3_MAX_REGIONS] = {\r
+                                                                                                       {\r
+                                                                                                       0x88, 0x89, 0x8a, 0x8b,\r
+                                                                                                       0x8c, 0x8d, 0x8e, 0x8f,\r
+                                                                                                       },\r
+                                                                                                       {\r
+                                                                                                       0x90, 0x91, 0x92, 0x93,\r
+                                                                                                       0x94, 0x95, 0x96, 0x97,\r
+                                                                                                       },\r
+                                                                                               };\r
+\r
+/**\r
+ * Variable which will be used internally for referring channel controller's\r
+ * error interrupt.\r
+ */\r
+unsigned int ccErrorInt[NUM_EDMA3_INSTANCES] = {0x99, 0x9c};\r
+\r
+/**\r
+ * Variable which will be used internally for referring transfer controllers'\r
+ * error interrupts.\r
+ */\r
+unsigned int tcErrorInt[NUM_EDMA3_INSTANCES][EDMA3_MAX_TC] =    {\r
+                                                                                                       {\r
+                                                                                                       0xA0,0xA1, 0u, 0u,\r
+                                                                                                       0u, 0u, 0u, 0u,\r
+                                                                                                       },\r
+                                                                                                       {\r
+                                                                                                       0xA4, 0xA5, 0u, 0u,\r
+                                                                                                       0u, 0u, 0u, 0u,\r
+                                                                                                       },\r
+                                                                                               };\r
+\r
+/* Driver Object Initialization Configuration */\r
+EDMA3_RM_GblConfigParams sampleEdma3GblCfgParams[NUM_EDMA3_INSTANCES] =\r
+       {\r
+               {\r
+               /* EDMA3 INSTANCE# 0 */\r
+               /** Total number of DMA Channels supported by the EDMA3 Controller */\r
+               64u,\r
+               /** Total number of QDMA Channels supported by the EDMA3 Controller */\r
+               8u,\r
+               /** Total number of TCCs supported by the EDMA3 Controller */\r
+               64u,\r
+               /** Total number of PaRAM Sets supported by the EDMA3 Controller */\r
+               512u,\r
+               /** Total number of Event Queues in the EDMA3 Controller */\r
+               2u,\r
+               /** Total number of Transfer Controllers (TCs) in the EDMA3 Controller */\r
+               2u,\r
+               /** Number of Regions on this EDMA3 controller */\r
+               8u,\r
+\r
+               /**\r
+                * \brief Channel mapping existence\r
+                * A value of 0 (No channel mapping) implies that there is fixed association\r
+                * for a channel number to a parameter entry number or, in other words,\r
+                * PaRAM entry n corresponds to channel n.\r
+                */\r
+               1u,\r
+\r
+               /** Existence of memory protection feature */\r
+               1u,\r
+\r
+               /** Global Register Region of CC Registers */\r
+               (void *)0x02700000u,\r
+               /** Transfer Controller (TC) Registers */\r
+               {\r
+               (void *)0x02760000u,\r
+               (void *)0x02768000u,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL\r
+               },\r
+               /** Interrupt no. for Transfer Completion */\r
+               0x88,\r
+               /** Interrupt no. for CC Error */\r
+               0x99,\r
+               /** Interrupt no. for TCs Error */\r
+               {\r
+               0xA0,\r
+               0xA1,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               },\r
+\r
+               /**\r
+                * \brief EDMA3 TC priority setting\r
+                *\r
+                * User can program the priority of the Event Queues\r
+                * at a system-wide level.  This means that the user can set the\r
+                * priority of an IO initiated by either of the TCs (Transfer Controllers)\r
+                * relative to IO initiated by the other bus masters on the\r
+                * device (ARM, DSP, USB, etc)\r
+                */\r
+               {\r
+               0u,\r
+               1u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u\r
+               },\r
+               /**\r
+                * \brief To Configure the Threshold level of number of events\r
+                * that can be queued up in the Event queues. EDMA3CC error register\r
+                * (CCERR) will indicate whether or not at any instant of time the\r
+                * number of events queued up in any of the event queues exceeds\r
+                * or equals the threshold/watermark value that is set\r
+                * in the queue watermark threshold register (QWMTHRA).\r
+                */\r
+               {\r
+               16u,\r
+               16u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u\r
+               },\r
+\r
+               /**\r
+                * \brief To Configure the Default Burst Size (DBS) of TCs.\r
+                * An optimally-sized command is defined by the transfer controller\r
+                * default burst size (DBS). Different TCs can have different\r
+                * DBS values. It is defined in Bytes.\r
+                */\r
+               {\r
+               128u,\r
+               128u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u\r
+               },\r
+\r
+               /**\r
+                * \brief Mapping from each DMA channel to a Parameter RAM set,\r
+                * if it exists, otherwise of no use.\r
+                */\r
+               {\r
+               0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u,\r
+               8u, 9u, 10u, 11u, 12u, 13u, 14u, 15u,\r
+               16u, 17u, 18u, 19u, 20u, 21u, 22u, 23u,\r
+               24u, 25u, 26u, 27u, 28u, 29u, 30u, 31u,\r
+               32u, 33u, 34u, 35u, 36u, 37u, 38u, 39u,\r
+               40u, 41u, 42u, 43u, 44u, 45u, 46u, 47u,\r
+               48u, 49u, 50u, 51u, 52u, 53u, 54u, 55u,\r
+               56u, 57u, 58u, 59u, 60u, 61u, 62u, 63u\r
+               },\r
+\r
+                /**\r
+                 * \brief Mapping from each DMA channel to a TCC. This specific\r
+                 * TCC code will be returned when the transfer is completed\r
+                 * on the mapped channel.\r
+                 */\r
+               {\r
+               0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u,\r
+               8u, 9u, 10u, 11u, 12u, 13u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP,\r
+               16u, 17u, 18u, 19u, 20u, 21u, 22u, 23u,\r
+               24u, 25u, 26u, 27u, 28u, 29u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP,\r
+               32u, 33u, 34u, 35u, 36u, 37u, 38u, 39u,\r
+               40u, 41u, 42u, 43u, 44u, 45u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP,\r
+               48u, 49u, 50u, 51u, 52u, 53u, 54u, 55u,\r
+               56u, 57u, 58u, 59u, 60u, 61u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP\r
+               },\r
+\r
+               /**\r
+                * \brief Mapping of DMA channels to Hardware Events from\r
+                * various peripherals, which use EDMA for data transfer.\r
+                * All channels need not be mapped, some can be free also.\r
+                */\r
+               {\r
+               0x03003333u,\r
+               0x0000000Fu\r
+               }\r
+               },\r
+\r
+               {\r
+               /* EDMA3 INSTANCE# 1 */\r
+               /** Total number of DMA Channels supported by the EDMA3 Controller */\r
+               64u,\r
+               /** Total number of QDMA Channels supported by the EDMA3 Controller */\r
+               8u,\r
+               /** Total number of TCCs supported by the EDMA3 Controller */\r
+               64u,\r
+               /** Total number of PaRAM Sets supported by the EDMA3 Controller */\r
+               512u,\r
+               /** Total number of Event Queues in the EDMA3 Controller */\r
+               2u,\r
+               /** Total number of Transfer Controllers (TCs) in the EDMA3 Controller */\r
+               2u,\r
+               /** Number of Regions on this EDMA3 controller */\r
+               8u,\r
+\r
+               /**\r
+                * \brief Channel mapping existence\r
+                * A value of 0 (No channel mapping) implies that there is fixed association\r
+                * for a channel number to a parameter entry number or, in other words,\r
+                * PaRAM entry n corresponds to channel n.\r
+                */\r
+               1u,\r
+\r
+               /** Existence of memory protection feature */\r
+               1u,\r
+\r
+               /** Global Register Region of CC Registers */\r
+               (void *)0x02728000U,\r
+               /** Transfer Controller (TC) Registers */\r
+               {\r
+               (void *)0x027b0000U,\r
+               (void *)0x027b8000U,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL,\r
+               (void *)NULL\r
+               },\r
+               /** Interrupt no. for Transfer Completion */\r
+               0x90,\r
+               /** Interrupt no. for CC Error */\r
+               0x9C,\r
+               /** Interrupt no. for TCs Error */\r
+               {\r
+               0xA4,\r
+               0xA5,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               },\r
+\r
+               /**\r
+                * \brief EDMA3 TC priority setting\r
+                *\r
+                * User can program the priority of the Event Queues\r
+                * at a system-wide level.  This means that the user can set the\r
+                * priority of an IO initiated by either of the TCs (Transfer Controllers)\r
+                * relative to IO initiated by the other bus masters on the\r
+                * device (ARM, DSP, USB, etc)\r
+                */\r
+               {\r
+               0u,\r
+               1u,\r
+               2u,\r
+               3u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u\r
+               },\r
+               /**\r
+                * \brief To Configure the Threshold level of number of events\r
+                * that can be queued up in the Event queues. EDMA3CC error register\r
+                * (CCERR) will indicate whether or not at any instant of time the\r
+                * number of events queued up in any of the event queues exceeds\r
+                * or equals the threshold/watermark value that is set\r
+                * in the queue watermark threshold register (QWMTHRA).\r
+                */\r
+               {\r
+               16u,\r
+               16u,\r
+               16u,\r
+               16u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u\r
+               },\r
+\r
+               /**\r
+                * \brief To Configure the Default Burst Size (DBS) of TCs.\r
+                * An optimally-sized command is defined by the transfer controller\r
+                * default burst size (DBS). Different TCs can have different\r
+                * DBS values. It is defined in Bytes.\r
+                */\r
+               {\r
+               64u,\r
+               64u,\r
+               64u,\r
+               64u,\r
+               0u,\r
+               0u,\r
+               0u,\r
+               0u\r
+               },\r
+\r
+               /**\r
+                * \brief Mapping from each DMA channel to a Parameter RAM set,\r
+                * if it exists, otherwise of no use.\r
+                */\r
+               {\r
+               0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u,\r
+               8u, 9u, 10u, 11u, 12u, 13u, 14u, 15u,\r
+               16u, 17u, 18u, 19u, 20u, 21u, 22u, 23u,\r
+               24u, 25u, 26u, 27u, 28u, 29u, 30u, 31u,\r
+               32u, 33u, 34u, 35u, 36u, 37u, 38u, 39u,\r
+               40u, 41u, 42u, 43u, 44u, 45u, 46u, 47u,\r
+               48u, 49u, 50u, 51u, 52u, 53u, 54u, 55u,\r
+               56u, 57u, 58u, 59u, 60u, 61u, 62u, 63u\r
+               },\r
+\r
+                /**\r
+                 * \brief Mapping from each DMA channel to a TCC. This specific\r
+                 * TCC code will be returned when the transfer is completed\r
+                 * on the mapped channel.\r
+                 */\r
+               {\r
+               0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u,\r
+               8u, 9u, 10u, 11u, 12u, 13u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP,\r
+               16u, 17u, 18u, 19u, 20u, 21u, 22u, 23u,\r
+               24u, 25u, 26u, 27u, 28u, 29u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP,\r
+               32u, 33u, 34u, 35u, 36u, 37u, 38u, 39u,\r
+               40u, 41u, 42u, 43u, 44u, 45u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP,\r
+               48u, 49u, 50u, 51u, 52u, 53u, 54u, 55u,\r
+               56u, 57u, 58u, 59u, 60u, 61u, EDMA3_RM_CH_NO_TCC_MAP, EDMA3_RM_CH_NO_TCC_MAP\r
+               },\r
+\r
+               /**\r
+                * \brief Mapping of DMA channels to Hardware Events from\r
+                * various peripherals, which use EDMA for data transfer.\r
+                * All channels need not be mapped, some can be free also.\r
+                */\r
+               {\r
+               0x3FFF3FFFu,\r
+               0x3FFF3FFFu\r
+               }\r
+               },\r
+\r
+       };\r
+\r
+EDMA3_RM_InstanceInitConfig sampleInstInitConfig[NUM_EDMA3_INSTANCES][EDMA3_MAX_REGIONS] =\r
+       {\r
+               /* EDMA3 INSTANCE# 0 */\r
+               {\r
+                       /* Resources owned/reserved by region 0 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0xFFFF000Fu, 0x00000FFFu, 0xFFFFFFFFu, 0xFFFFFFFFu,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0xFFFFFFFFu, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x0f00000Fu, 0x0000000Fu},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000003u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x0f00000Fu, 0x0000000Fu},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31           0 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31           0 */\r
+                               {0x00000000u, 0xFFF00000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 1 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x000000F0u, 0xFFFFF000u, 0x000000FFu, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x000000F0u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x0000000Cu},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x000000F0u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000030u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000030u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000030u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 2 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000F00u, 0x00000000u, 0xFFFFFF00u, 0x0000000Fu,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000F00u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000030u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000F00u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000300u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000300u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000300u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 3 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x0000F000u, 0x00000000u, 0x00000000u, 0xFFFFFFF0u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x0000F000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x000000C0u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x0000F000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00003000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00003000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00003000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 4 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x0000F000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 5 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x0000F000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 6 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x0000F000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 7 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x0000F000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+           },\r
+\r
+               /* EDMA3 INSTANCE# 1 */\r
+           {\r
+               /* Resources owned/reserved by region 0 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x0000FFFFu, 0x000F0000u, 0xFFFFFFFFu, 0xFFFFFFFFu,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0xFFFFFFFFu, 0x0000FFFFu, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x0000FFFFu, 0x000F0000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000003u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x0000FFFFu, 0x000F0000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00003FFFu, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00003FFFu, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00003FFFu, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 1 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0xFFFF0000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0xFFFF0000u, 0xFFFFFFFFu, 0xFFFFFFFFu,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0xFFFFFFFFu, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0xFFFF0000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x0000000Cu},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0xFFFF0000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x3FFF0000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x3FFF0000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x3FFF0000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 2 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x0000FFFFu, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x0000FFFFu, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x0000FFFFu},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000030u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x0000FFFFu},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00003FFFu, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00003FFFu},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00003FFFu},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 3 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0xFFFF0000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0xFFFF0000u, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu,},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0xFFFF0000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x000000C0u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0xFFFF0000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x3FFF0000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x3FFF0000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x3FFF0000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 4 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 5 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 6 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+\r
+               /* Resources owned/reserved by region 7 */\r
+                       {\r
+                               /* ownPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* ownDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* ownQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* ownTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdPaRAMSets */\r
+                               /* 31     0     63    32     95    64     127   96 */\r
+                               {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 159  128     191  160     223  192     255  224 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 287  256     319  288     351  320     383  352 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,\r
+                               /* 415  384     447  416     479  448     511  480 */\r
+                                0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdDmaChannels */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+\r
+                               /* resvdQdmaChannels */\r
+                               /* 31     0 */\r
+                               {0x00000000u},\r
+\r
+                               /* resvdTccs */\r
+                               /* 31     0     63    32 */\r
+                               {0x00000000u, 0x00000000u},\r
+                       },\r
+           },\r
+\r
+       };\r
+\r
+/* End of File */\r
diff --git a/realtime_demo_bios/k2g/src/sample_k2g_int_reg.c b/realtime_demo_bios/k2g/src/sample_k2g_int_reg.c
new file mode 100644 (file)
index 0000000..fb891ab
--- /dev/null
@@ -0,0 +1,255 @@
+/*\r
+ * sample_tci6616_int_reg.c\r
+ *\r
+ * Platform specific interrupt registration and un-registration routines.\r
+ *\r
+ * Copyright