Update repo
This commit is contained in:
1 parent
749dab5721
commit
ce65a0f59a
14950 files changed
+4408250
-1
No files matched your search
@@ -0,0 +1,48 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="ipc_ex1_gpio_toggle_cpu1"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex1_gpio_toggle_cpu1.c" targetDirectory="" />
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex1_gpio_toggle_cpu2"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
<configuration name="CPU2_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="CPU2_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu2.cmd" targetDirectory="" applicableConfigurations="CPU2_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu2.cmd" targetDirectory="" applicableConfigurations="CPU2_FLASH" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../../../../../../device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex1_gpio_toggle_cpu2.c" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,67 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="ipc_ex2_gpio_sysconfig_multi"
|
||||
configurations="
|
||||
FLASH,
|
||||
RAM,
|
||||
"
|
||||
device="TMS320F28377D"
|
||||
outputType="system"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
>
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<file path="../system.xml" action="copy" openOnCreation="true"/>
|
||||
<configuration name="FLASH"
|
||||
></configuration>
|
||||
<configuration name="RAM"
|
||||
></configuration>
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex2_gpio_sysconfig_cpu1"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json"
|
||||
>
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../ipc_ex2_gpio_sysconfig_cpu1.c" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex2_gpio_sysconfig_cpu1.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex2_gpio_sysconfig_cpu2"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json"
|
||||
>
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../ipc_ex2_gpio_sysconfig_cpu2.c" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex2_gpio_sysconfig_cpu2.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,67 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="ipc_ex3_basic_sysconfig_multi"
|
||||
configurations="
|
||||
FLASH,
|
||||
RAM,
|
||||
"
|
||||
device="TMS320F28377D"
|
||||
outputType="system"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
>
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<file path="../system/system_ex3/system.xml" action="copy" openOnCreation="true"/>
|
||||
<configuration name="FLASH"
|
||||
></configuration>
|
||||
<configuration name="RAM"
|
||||
></configuration>
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex3_basic_sysconfig_c28x1"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD --context CPU1"
|
||||
>
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../ipc_ex3_basic_sysconfig_c28x1.c" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex3_basic_sysconfig_c28x1.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex3_basic_sysconfig_c28x2"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD --context CPU2"
|
||||
>
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../ipc_ex3_basic_sysconfig_c28x2.c" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex3_basic_sysconfig_c28x2.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="ipc_ex4_msgqueue_sysconfig_multi"
|
||||
configurations="
|
||||
FLASH,
|
||||
RAM,
|
||||
"
|
||||
device="TMS320F28377D"
|
||||
outputType="system"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
>
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<file path="../system/system_ex4/system.xml" action="copy" openOnCreation="true"/>
|
||||
<configuration name="FLASH"
|
||||
></configuration>
|
||||
<configuration name="RAM"
|
||||
></configuration>
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex4_msgqueue_sysconfig_c28x1"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD --context CPU1"
|
||||
>
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU1 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../ipc_ex4_msgqueue_sysconfig_c28x1.c" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex4_msgqueue_sysconfig_c28x1.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
<project
|
||||
name="ipc_ex4_msgqueue_sysconfig_c28x2"
|
||||
device="TMS320F28377D"
|
||||
cgtVersion="20.2.1.LTS"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD --context CPU2"
|
||||
>
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=CPU2 -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/F2837xD/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../ipc_ex4_msgqueue_sysconfig_c28x2.c" targetDirectory="" />
|
||||
<file action="copy" path="../ipc_ex4_msgqueue_sysconfig_c28x2.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,249 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: ipc_ex1_gpio_toggle_cpu1.c
|
||||
//
|
||||
// TITLE: GPIO Toggle for F2837xD CPU1.
|
||||
//
|
||||
//! \addtogroup dual_example_list
|
||||
//! <h1> IPC GPIO toggle </h1>
|
||||
//!
|
||||
//! This example shows GPIO input on the local CPU triggering an output on the
|
||||
//! remote CPU. A GPIO input change on CPU01 causes an output change on CPU02
|
||||
//! and vice versa. \n
|
||||
//! CPU1 has control of GPIO31 , GPIO15 and GPIO14.\n
|
||||
//! CPU2 has control of GPIO34 , GPIO10 and GPIO11.\n
|
||||
//!
|
||||
//! The IPC is used to signal a change on the CPU's input pin.\n
|
||||
//!
|
||||
//! \b Hardware \b Connections
|
||||
//! - connect GPIO15 to GPIO11
|
||||
//! - connect GPIO14 to GPIO10
|
||||
//!
|
||||
//! \b Watch \b Pins
|
||||
//! - GPIO34 - output on CPU2
|
||||
//! - GPIO11 - input on CPU2
|
||||
//! - GPIO31 - output on CPU1
|
||||
//! - GPIO14 - input on CPU1
|
||||
//! - GPIO10 - square wave output on CPU02
|
||||
//! - GPIO15 - square wave output on CPU01
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "inc/hw_ipc.h"
|
||||
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint16_t state;
|
||||
uint32_t count;
|
||||
uint16_t ipcFlag17 = 17U;
|
||||
uint16_t ipcFlag10 = 10U;
|
||||
uint16_t ipcFlag11 = 11U;
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
#ifdef _STANDALONE
|
||||
#ifdef _FLASH
|
||||
//
|
||||
// Send boot command to allow the CPU2 application to begin execution
|
||||
//
|
||||
Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH);
|
||||
#else
|
||||
//
|
||||
// Send boot command to allow the CPU2 application to begin execution
|
||||
//
|
||||
Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_RAM);
|
||||
|
||||
#endif // _FLASH
|
||||
#endif // _STANDALONE
|
||||
|
||||
//
|
||||
// Initialize GPIO and configure the GPIO pin as a push-pull output
|
||||
//
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// GPIO34 (LED2) is assigned to CPU2 and is an output pin.
|
||||
//
|
||||
GPIO_setPadConfig(DEVICE_GPIO_PIN_LED2, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED2, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setMasterCore(DEVICE_GPIO_PIN_LED2, GPIO_CORE_CPU2);
|
||||
|
||||
//
|
||||
// GPIO10 is assigned to CPU2 and is an output pin.
|
||||
//
|
||||
GPIO_setPadConfig(10UL, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setDirectionMode(10UL, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setMasterCore(10UL, GPIO_CORE_CPU2);
|
||||
|
||||
//
|
||||
// GPIO11 is assigned to CPU2 and is an input pin.
|
||||
//
|
||||
GPIO_setPadConfig(11UL, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setDirectionMode(11UL, GPIO_DIR_MODE_IN);
|
||||
GPIO_setMasterCore(11UL, GPIO_CORE_CPU2);
|
||||
|
||||
//
|
||||
// GPIO31 (LED2) is assigned to CPU1 and is an output pin.
|
||||
//
|
||||
GPIO_setPadConfig(DEVICE_GPIO_PIN_LED1, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED1, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setMasterCore(DEVICE_GPIO_PIN_LED1, GPIO_CORE_CPU1);
|
||||
|
||||
|
||||
//
|
||||
// GPIO15 is assigned to CPU1 and is an output pin.
|
||||
//
|
||||
GPIO_setPadConfig(15UL, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setDirectionMode(15UL, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setMasterCore(15UL, GPIO_CORE_CPU1);
|
||||
|
||||
//
|
||||
// GPIO14 is assigned to CPU1 and is an input pin.
|
||||
//
|
||||
GPIO_setPadConfig(14UL, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setDirectionMode(14UL, GPIO_DIR_MODE_IN);
|
||||
GPIO_setMasterCore(14UL, GPIO_CORE_CPU1);
|
||||
|
||||
//
|
||||
// Clear all interrupts and initialize PIE vector table:
|
||||
// Disable CPU interrupts
|
||||
//
|
||||
DINT;
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Wait until CPU02 is ready and IPC flag 17 is set
|
||||
//
|
||||
while(!(HWREG(IPC_BASE + IPC_O_STS) & (1UL << ipcFlag17)))
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// ACK IPC flag 17 for CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_ACK) = 1UL << ipcFlag17;
|
||||
|
||||
//
|
||||
// Set the state to the DAT value of GPIO14
|
||||
//
|
||||
state = GPIO_readPin(14UL);
|
||||
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Generate a Square Wave on GPIO15. This signal will be used to drive
|
||||
// GPIO11 input on CPU2
|
||||
//
|
||||
if(count++ > 1000000)
|
||||
{
|
||||
count = 0;
|
||||
|
||||
//
|
||||
// Toggle GPIO15
|
||||
//
|
||||
GPIO_togglePin(15UL);
|
||||
}
|
||||
|
||||
//
|
||||
// Set Flag 10 when GPIO14 input changes
|
||||
//
|
||||
if(GPIO_readPin(14UL) != state)
|
||||
{
|
||||
state = GPIO_readPin(14UL);
|
||||
|
||||
if(!(HWREG(IPC_BASE + IPC_O_STS) & (1UL << ipcFlag10)))
|
||||
{
|
||||
//
|
||||
// Send IPC flag 10 to CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_SET) = 1UL << ipcFlag10;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Toggle GPIO31 output if Flag 11 is set by CPU2
|
||||
//
|
||||
if((HWREG(IPC_BASE + IPC_O_STS) & (1UL << ipcFlag11)))
|
||||
{
|
||||
//
|
||||
// Toggle GPIO31 (LED1)
|
||||
//
|
||||
GPIO_togglePin(DEVICE_GPIO_PIN_LED1);
|
||||
|
||||
//
|
||||
// ACK IPC flag 11 for CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_ACK) = 1UL << ipcFlag11;
|
||||
|
||||
//
|
||||
// Clear IPC flag 11 for CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_CLR) = 1UL << ipcFlag11;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of file
|
||||
//
|
||||
@@ -0,0 +1,180 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: ipc_gpio_toggle_cpu02.c
|
||||
//
|
||||
// TITLE: IPC GPIO Toggle for F2837xD CPU2.
|
||||
//
|
||||
// This example shows GPIO input on the local CPU triggering an output on the
|
||||
// remote CPU. A GPIO input change on CPU01 causes an output change on CPU02
|
||||
// and vice versa.
|
||||
// CPU1 has control of GPIO31 , GPIO15 and GPIO14.
|
||||
// CPU2 has control of GPIO34 , GPIO10 and GPIO11.
|
||||
//
|
||||
// The IPC is used to signal a change on the CPU's input pin.
|
||||
//
|
||||
// \b Hardware \b Connections
|
||||
// - connect GPIO15 to GPIO11
|
||||
// - connect GPIO14 to GPIO10
|
||||
//
|
||||
// \b Watch \b Pins
|
||||
// - GPIO34 - output on CPU2
|
||||
// - GPIO11 - input on CPU2
|
||||
// - GPIO31 - output on CPU1
|
||||
// - GPIO14 - input on CPU1
|
||||
// - GPIO10 - square wave output on CPU02
|
||||
// - GPIO15 - square wave output on CPU01
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "inc/hw_ipc.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint32_t count;
|
||||
uint16_t state;
|
||||
uint16_t ipcFlag17 = 17U;
|
||||
uint16_t ipcFlag10 = 10U;
|
||||
uint16_t ipcFlag11 = 11U;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize GPIO and configure the GPIO pin as a push-pull output
|
||||
//
|
||||
// This is configured by CPU1
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Send IPC flag 5 to CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_SET) = 1UL << ipcFlag17;
|
||||
|
||||
//
|
||||
// Set the state to the DAT value of GPIO11
|
||||
//
|
||||
state = GPIO_readPin(11UL);
|
||||
|
||||
//
|
||||
// Toggle GPIO10
|
||||
//
|
||||
GPIO_togglePin(10UL);
|
||||
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Produce a Square Wave on GPIO10. This signal will be used to drive
|
||||
// GPIO14 input on CPU1
|
||||
//
|
||||
if(count++ > 2000000)
|
||||
{
|
||||
count = 0;
|
||||
|
||||
//
|
||||
// Toggle GPIO10
|
||||
//
|
||||
GPIO_togglePin(10UL);
|
||||
}
|
||||
|
||||
//
|
||||
// Set Flag 11 when GPIO11 input changes
|
||||
//
|
||||
if(GPIO_readPin(11UL) != state)
|
||||
{
|
||||
state = GPIO_readPin(11UL);
|
||||
|
||||
if(!(HWREG(IPC_BASE + IPC_O_STS) & (1UL << ipcFlag11)))
|
||||
{
|
||||
//
|
||||
// Send IPC flag 11 to CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_SET) = 1UL << ipcFlag11;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Toggle GPIO34 output if Flag 10 is set by CPU1
|
||||
//
|
||||
if((HWREG(IPC_BASE + IPC_O_STS) & (1UL << ipcFlag10)))
|
||||
{
|
||||
//
|
||||
// Toggle GPIO34 (LED2)
|
||||
//
|
||||
GPIO_togglePin(DEVICE_GPIO_PIN_LED2);
|
||||
|
||||
//
|
||||
// ACK IPC flag 11 for CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_ACK) = 1UL << ipcFlag10;
|
||||
|
||||
//
|
||||
// Clear IPC flag 11 for CPU2
|
||||
//
|
||||
HWREG(IPC_BASE + IPC_O_CLR) = 1UL << ipcFlag10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of file
|
||||
//
|
||||
@@ -0,0 +1,180 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: ipc_ex2_sysconfig_cpu1.c
|
||||
//
|
||||
// TITLE: SysConfig GPIO Toggle for F2837xD CPU1.
|
||||
//
|
||||
//! \addtogroup dual_example_list
|
||||
//! <h1> IPC GPIO toggle </h1>
|
||||
//!
|
||||
//! This example shows GPIO input on the local CPU triggering an output on the
|
||||
//! remote CPU. A GPIO input change on CPU01 causes an output change on CPU02
|
||||
//! and vice versa. \n
|
||||
//! CPU1 has control of GPIO31 , GPIO15 and GPIO14.\n
|
||||
//! CPU2 has control of GPIO34 , GPIO10 and GPIO11.\n
|
||||
//!
|
||||
//! The IPC is used to signal a change on the CPU's input pin.\n
|
||||
//!
|
||||
//! \b Hardware \b Connections
|
||||
//! - connect GPIO15 to GPIO11
|
||||
//! - connect GPIO14 to GPIO10
|
||||
//!
|
||||
//! \b Watch \b Pins
|
||||
//! - GPIO34 - output on CPU2
|
||||
//! - GPIO11 - input on CPU2
|
||||
//! - GPIO31 - output on CPU1
|
||||
//! - GPIO14 - input on CPU1
|
||||
//! - GPIO10 - square wave output on CPU02
|
||||
//! - GPIO15 - square wave output on CPU01
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint16_t state;
|
||||
uint32_t count;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
|
||||
//
|
||||
// Initialize GPIO and configure the GPIO pin as a push-pull output
|
||||
//
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// Initialize settings from SysConfig
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Clear all interrupts and initialize PIE vector table:
|
||||
// Disable CPU interrupts
|
||||
//
|
||||
DINT;
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Sync the CPUs
|
||||
//
|
||||
IPC_sync(IPC_CPU1_L_CPU2_R, IPC_FLAG31);
|
||||
|
||||
//
|
||||
// Set the state to the DAT value of GPIO14
|
||||
//
|
||||
state = GPIO_readPin(myGPIO14);
|
||||
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Generate a Square Wave on GPIO15. This signal will be used to drive
|
||||
// GPIO11 input on CPU2
|
||||
//
|
||||
if(count++ > 1000000)
|
||||
{
|
||||
count = 0;
|
||||
|
||||
//
|
||||
// Toggle GPIO15
|
||||
//
|
||||
GPIO_togglePin(myGPIO15);
|
||||
}
|
||||
|
||||
//
|
||||
// Set Flag 10 when GPIO14 input changes
|
||||
//
|
||||
if(GPIO_readPin(myGPIO14) != state)
|
||||
{
|
||||
state = GPIO_readPin(myGPIO14);
|
||||
//
|
||||
// This checks to see if flag 10 for CPU1_to_CPU2 is already set, then sets the Flag if it wasn't busy
|
||||
//
|
||||
IPC_sendCommand(IPC_CPU1_L_CPU2_R, IPC_FLAG10, IPC_ADDR_CORRECTION_ENABLE,
|
||||
0, 0, 0);
|
||||
}
|
||||
|
||||
//
|
||||
// Toggle GPIO31 output if Flag 11 is set by CPU2
|
||||
//
|
||||
if (IPC_isFlagBusyRtoL(IPC_CPU1_L_CPU2_R, IPC_FLAG11))
|
||||
{
|
||||
//
|
||||
// Toggle GPIO31 (LED1)
|
||||
//
|
||||
GPIO_togglePin(CPU1_LED);
|
||||
|
||||
//
|
||||
// Acknowledge and clear the flag
|
||||
//
|
||||
IPC_ackFlagRtoL(IPC_CPU1_L_CPU2_R, IPC_FLAG11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of file
|
||||
//
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "F2837xD" --package "F2837xD_337ZWT" --part "F2837xD_337ZWT" --context "CPU1" --product "C2000WARE@4.03.00.00"
|
||||
* @versions {"tool":"1.15.999+71"}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const gpio = scripting.addModule("/driverlib/gpio.js", {}, false);
|
||||
const gpio1 = gpio.addInstance();
|
||||
const gpio2 = gpio.addInstance();
|
||||
const gpio3 = gpio.addInstance();
|
||||
const gpio4 = gpio.addInstance();
|
||||
const gpio5 = gpio.addInstance();
|
||||
const gpio6 = gpio.addInstance();
|
||||
const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
|
||||
const CMD1 = CMD.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
gpio1.$name = "CPU1_LED";
|
||||
gpio1.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio1.gpioPin.$assign = "GPIO31";
|
||||
|
||||
gpio2.$name = "CPU2_LED";
|
||||
gpio2.controllerCore = "GPIO_CORE_CPU2";
|
||||
gpio2.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio2.gpioPin.$assign = "GPIO34";
|
||||
|
||||
gpio3.$name = "myGPIO10";
|
||||
gpio3.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio3.controllerCore = "GPIO_CORE_CPU2";
|
||||
gpio3.gpioPin.$assign = "GPIO10";
|
||||
|
||||
gpio4.$name = "myGPIO11";
|
||||
gpio4.controllerCore = "GPIO_CORE_CPU2";
|
||||
gpio4.gpioPin.$assign = "GPIO11";
|
||||
|
||||
gpio5.$name = "myGPIO14";
|
||||
gpio5.gpioPin.$assign = "GPIO14";
|
||||
|
||||
gpio6.$name = "myGPIO15";
|
||||
gpio6.direction = "GPIO_DIR_MODE_OUT";
|
||||
gpio6.gpioPin.$assign = "GPIO15";
|
||||
|
||||
CMD.activateCMD = true;
|
||||
|
||||
CMD1.$name = "CMD0";
|
||||
CMD1.sectionMemory_text = ["FLASHB","FLASHC","FLASHD","FLASHE"];
|
||||
CMD1.sectionAlignEnable_text = true;
|
||||
CMD1.sectionMemory_ramfunc = ["FLASHD"];
|
||||
CMD1.sectionRunFromDifferentAddr_ramfunc = true;
|
||||
CMD1.sectionRun_ramfunc = ["RAMLS0"];
|
||||
CMD1.sectionAlignEnable_ramfunc = true;
|
||||
CMD1.sectionMemory_ovly = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_ovly = true;
|
||||
CMD1.sectionMemory_cinit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_cinit = true;
|
||||
CMD1.sectionMemory_stack = ["RAMM1"];
|
||||
CMD1.sectionMemory_init_array = ["FLASHB"];
|
||||
CMD1.sectionAlignEnable_init_array = true;
|
||||
CMD1.sectionMemory_bss = ["RAMLS5"];
|
||||
CMD1.sectionMemory_const = ["FLASHF"];
|
||||
CMD1.sectionAlignEnable_const = true;
|
||||
CMD1.sectionMemory_data = ["RAMLS5"];
|
||||
CMD1.sectionMemory_switch = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_switch = true;
|
||||
CMD1.sectionMemory_sysmem = ["RAMLS5"];
|
||||
CMD1.sectionAlignEnable_binit = true;
|
||||
CMD1.sectionMemory_binit = ["FLASHA"];
|
||||
@@ -0,0 +1,170 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: ipc_ex2_sysconfig_cpu2.c
|
||||
//
|
||||
// TITLE: SysConfig IPC GPIO Toggle for F2837xD CPU2.
|
||||
//
|
||||
// This example shows GPIO input on the local CPU triggering an output on the
|
||||
// remote CPU. A GPIO input change on CPU01 causes an output change on CPU02
|
||||
// and vice versa.
|
||||
// CPU1 has control of GPIO31 , GPIO15 and GPIO14.
|
||||
// CPU2 has control of GPIO34 , GPIO10 and GPIO11.
|
||||
//
|
||||
// The IPC is used to signal a change on the CPU's input pin.
|
||||
//
|
||||
// \b Hardware \b Connections
|
||||
// - connect GPIO15 to GPIO11
|
||||
// - connect GPIO14 to GPIO10
|
||||
//
|
||||
// \b Watch \b Pins
|
||||
// - GPIO34 - output on CPU2
|
||||
// - GPIO11 - input on CPU2
|
||||
// - GPIO31 - output on CPU1
|
||||
// - GPIO14 - input on CPU1
|
||||
// - GPIO10 - square wave output on CPU02
|
||||
// - GPIO15 - square wave output on CPU01
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
uint32_t count;
|
||||
uint16_t state;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize SysConfig Settings
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Sync the CPUs
|
||||
//
|
||||
IPC_sync(IPC_CPU2_L_CPU1_R, IPC_FLAG31);
|
||||
|
||||
//
|
||||
// Set the state to the DAT value of GPIO11
|
||||
//
|
||||
state = GPIO_readPin(myGPIO11);
|
||||
|
||||
//
|
||||
// Toggle GPIO10
|
||||
//
|
||||
GPIO_togglePin(myGPIO10);
|
||||
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Produce a Square Wave on GPIO10. This signal will be used to drive
|
||||
// GPIO14 input on CPU1
|
||||
//
|
||||
if(count++ > 2000000)
|
||||
{
|
||||
count = 0;
|
||||
|
||||
//
|
||||
// Toggle GPIO10
|
||||
//
|
||||
GPIO_togglePin(myGPIO10);
|
||||
}
|
||||
|
||||
//
|
||||
// Set Flag 11 for CPU2_to_CPU1 flags when GPIO11 input changes
|
||||
//
|
||||
if(GPIO_readPin(myGPIO11) != state)
|
||||
{
|
||||
state = GPIO_readPin(myGPIO11);
|
||||
|
||||
//
|
||||
// This checks to see if flag 11 for CPU2_to_CPU1 is already set, then sets the Flag if it wasn't busy
|
||||
//
|
||||
IPC_sendCommand(IPC_CPU2_L_CPU1_R, IPC_FLAG11, IPC_ADDR_CORRECTION_ENABLE,
|
||||
0, 0, 0);
|
||||
}
|
||||
|
||||
//
|
||||
// Toggle GPIO34 output if Flag 10 is set by CPU1
|
||||
//
|
||||
if (IPC_isFlagBusyRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG10))
|
||||
{
|
||||
//
|
||||
// Toggle GPIO34 (LED2)
|
||||
//
|
||||
GPIO_togglePin(CPU2_LED);
|
||||
|
||||
//
|
||||
// Acknowledge and clear the flag
|
||||
//
|
||||
IPC_ackFlagRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of file
|
||||
//
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "F2837xD" --package "F2837xD_337ZWT" --part "F2837xD_337ZWT" --context "CPU2" --product "C2000WARE@4.03.00.00"
|
||||
* @versions {"tool":"1.15.999+71"}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
|
||||
const CMD1 = CMD.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
CMD.activateCMD = true;
|
||||
|
||||
CMD1.$name = "CMD0";
|
||||
CMD1.sectionMemory_text = ["FLASHB","FLASHC","FLASHD","FLASHE"];
|
||||
CMD1.sectionAlignEnable_text = true;
|
||||
CMD1.sectionMemory_ramfunc = ["FLASHD"];
|
||||
CMD1.sectionRunFromDifferentAddr_ramfunc = true;
|
||||
CMD1.sectionRun_ramfunc = ["RAMLS0"];
|
||||
CMD1.sectionAlignEnable_ramfunc = true;
|
||||
CMD1.sectionMemory_ovly = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_ovly = true;
|
||||
CMD1.sectionMemory_cinit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_cinit = true;
|
||||
CMD1.sectionMemory_stack = ["RAMM1"];
|
||||
CMD1.sectionMemory_init_array = ["FLASHB"];
|
||||
CMD1.sectionAlignEnable_init_array = true;
|
||||
CMD1.sectionMemory_bss = ["RAMLS5"];
|
||||
CMD1.sectionMemory_const = ["FLASHF"];
|
||||
CMD1.sectionAlignEnable_const = true;
|
||||
CMD1.sectionMemory_data = ["RAMLS5"];
|
||||
CMD1.sectionMemory_switch = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_switch = true;
|
||||
CMD1.sectionMemory_sysmem = ["RAMLS5"];
|
||||
CMD1.sectionAlignEnable_binit = true;
|
||||
CMD1.sectionMemory_binit = ["FLASHA"];
|
||||
@@ -0,0 +1,163 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: ipc_ex3_basic_sysconfig_c28x1.c
|
||||
//
|
||||
// TITLE: SysConfig IPC example with interrupt
|
||||
//
|
||||
//! \addtogroup driver_dual_example_list
|
||||
//! <h1> IPC basic message passing example with interrupt </h1>
|
||||
//!
|
||||
//! This example demonstrates how to configure IPC and pass information from
|
||||
//! C28x1 to C28x2 core without message queues.
|
||||
//! It is recommended to run the C28x1 core first, followed by the C28x2 core.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None.
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - pass
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define IPC_CMD_READ_MEM 0x1001
|
||||
#define IPC_CMD_RESP 0x2001
|
||||
|
||||
#define TEST_PASS 0x5555
|
||||
#define TEST_FAIL 0xAAAA
|
||||
|
||||
|
||||
#pragma DATA_SECTION(readData, "MSGRAM_CPU1_TO_CPU2")
|
||||
uint32_t readData[10];
|
||||
|
||||
uint32_t pass;
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Initialize SysConfig Settings
|
||||
//
|
||||
Board_init();
|
||||
|
||||
// Clear any IPC flags if set already
|
||||
//
|
||||
IPC_clearFlagLtoR(IPC_CPU1_L_CPU2_R, IPC_FLAG_ALL);
|
||||
|
||||
//
|
||||
// Synchronize both the cores.
|
||||
//
|
||||
IPC_sync(IPC_CPU1_L_CPU2_R, SYNC_FLAG);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Fill in the data to be sent
|
||||
//
|
||||
for(i=0; i<10; i++)
|
||||
{
|
||||
readData[i] = i;
|
||||
}
|
||||
|
||||
//
|
||||
// Send a message without message queue
|
||||
// Length of the data to be read is passed as data.
|
||||
//
|
||||
IPC_sendCommand(IPC_CPU1_L_CPU2_R, IPC_FLAG0, IPC_ADDR_CORRECTION_ENABLE,
|
||||
IPC_CMD_READ_MEM, (uint32_t)readData, 10);
|
||||
|
||||
//
|
||||
// Wait for acknowledgment
|
||||
//
|
||||
IPC_waitForAck(IPC_CPU1_L_CPU2_R, IPC_FLAG0);
|
||||
|
||||
//
|
||||
// Read response
|
||||
//
|
||||
if(IPC_getResponse(IPC_CPU1_L_CPU2_R) == TEST_PASS)
|
||||
{
|
||||
pass = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pass = 0;
|
||||
}
|
||||
|
||||
//
|
||||
// End of example. Loop forever
|
||||
//
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "F2837xD" --package "F2837xD_337ZWT" --part "F2837xD_337ZWT" --context "CPU1" --product "C2000WARE@4.03.00.00"
|
||||
* @versions {"tool":"1.15.999+71"}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const ipc = scripting.addModule("/driverlib/ipc.js");
|
||||
const memcfg = scripting.addModule("/driverlib/memcfg.js");
|
||||
const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
|
||||
const CMD1 = CMD.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
ipc.flagHandler31 = "SYNC_FLAG";
|
||||
ipc.ipcRegisterFlag = ["IPC_FLAG0","IPC_FLAG31"];
|
||||
ipc.enableInterrupt0 = true;
|
||||
|
||||
memcfg.init_MEMCFG_SECT_MSGCPUTOCPU = true;
|
||||
|
||||
CMD.activateCMD = true;
|
||||
|
||||
CMD1.$name = "CMD0";
|
||||
CMD1.sectionMemory_text = ["FLASHB","FLASHC","FLASHD","FLASHE"];
|
||||
CMD1.sectionAlignEnable_text = true;
|
||||
CMD1.sectionMemory_ramfunc = ["FLASHD"];
|
||||
CMD1.sectionRunFromDifferentAddr_ramfunc = true;
|
||||
CMD1.sectionRun_ramfunc = ["RAMLS0"];
|
||||
CMD1.sectionAlignEnable_ramfunc = true;
|
||||
CMD1.sectionMemory_ovly = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_ovly = true;
|
||||
CMD1.sectionMemory_cinit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_cinit = true;
|
||||
CMD1.sectionMemory_stack = ["RAMM1"];
|
||||
CMD1.sectionMemory_init_array = ["FLASHB"];
|
||||
CMD1.sectionAlignEnable_init_array = true;
|
||||
CMD1.sectionMemory_bss = ["RAMLS5"];
|
||||
CMD1.sectionMemory_const = ["FLASHF"];
|
||||
CMD1.sectionAlignEnable_const = true;
|
||||
CMD1.sectionMemory_data = ["RAMLS5"];
|
||||
CMD1.sectionMemory_switch = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_switch = true;
|
||||
CMD1.sectionMemory_sysmem = ["RAMLS5"];
|
||||
CMD1.sectionMemory_binit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_binit = true;
|
||||
CMD1.sectionBinit_ramfunc = false;
|
||||
@@ -0,0 +1,176 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: ipc_ex3_basic_sysconfig_c28x2.c
|
||||
//
|
||||
// TITLE: SysConfig IPC example with interrupt
|
||||
//
|
||||
//! \addtogroup driver_dual_example_list
|
||||
//! <h1> IPC basic message passing example with interrupt </h1>
|
||||
//!
|
||||
//! This example demonstrates how to configure IPC and pass information from
|
||||
//! C28x1 to C28x2 core without message queues.
|
||||
//! It is recommended to run the C28x1 core first, followed by the C28x2 core.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None.
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - None.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define IPC_CMD_READ_MEM 0x1001
|
||||
#define IPC_CMD_RESP 0x2001
|
||||
|
||||
#define TEST_PASS 0x5555
|
||||
#define TEST_FAIL 0xAAAA
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Initialize SysConfig Settings
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Clear any IPC flags if set already
|
||||
//
|
||||
IPC_clearFlagLtoR(IPC_CPU2_L_CPU1_R, IPC_FLAG_ALL);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Synchronize both the cores.
|
||||
//
|
||||
IPC_sync(IPC_CPU2_L_CPU1_R, SYNC_FLAG);
|
||||
|
||||
//
|
||||
// Loop forever. Wait for IPC interrupt
|
||||
//
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// IPC ISR for Flag 0.
|
||||
// C28x core sends data without message queue using Flag 0
|
||||
//
|
||||
__interrupt void IPC_ISR0()
|
||||
{
|
||||
int i;
|
||||
uint32_t command, addr, data;
|
||||
bool status = false;
|
||||
|
||||
//
|
||||
// Read the command
|
||||
//
|
||||
IPC_readCommand(IPC_CPU2_L_CPU1_R, IPC_FLAG0, IPC_ADDR_CORRECTION_ENABLE,
|
||||
&command, &addr, &data);
|
||||
|
||||
if(command == IPC_CMD_READ_MEM)
|
||||
{
|
||||
status = true;
|
||||
|
||||
//
|
||||
// Read and compare data
|
||||
//
|
||||
for(i=0; i<data; i++)
|
||||
{
|
||||
if( *((uint32_t *)addr + i) != i)
|
||||
status = false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Send response to C28x core
|
||||
//
|
||||
if(status)
|
||||
{
|
||||
IPC_sendResponse(IPC_CPU2_L_CPU1_R, TEST_PASS);
|
||||
}
|
||||
else
|
||||
{
|
||||
IPC_sendResponse(IPC_CPU2_L_CPU1_R, TEST_FAIL);
|
||||
}
|
||||
|
||||
//
|
||||
// Acknowledge the flag
|
||||
//
|
||||
IPC_ackFlagRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG0);
|
||||
|
||||
//
|
||||
// Acknowledge the PIE interrupt.
|
||||
//
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
|
||||
}
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "F2837xD" --package "F2837xD_337ZWT" --part "F2837xD_337ZWT" --context "CPU2" --product "C2000WARE@4.03.00.00"
|
||||
* @versions {"tool":"1.15.999+71"}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const ipc = scripting.addModule("/driverlib/ipc.js");
|
||||
const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
|
||||
const CMD1 = CMD.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
ipc.registerInterrupts = ["0"];
|
||||
ipc.ipcRegisterFlag = ["IPC_FLAG31"];
|
||||
ipc.flagHandler31 = "SYNC_FLAG";
|
||||
ipc.ipcInt0.enableInterrupt = true;
|
||||
ipc.ipcInt0.interruptHandler = "IPC_ISR0";
|
||||
|
||||
CMD.activateCMD = true;
|
||||
|
||||
CMD1.$name = "CMD0";
|
||||
CMD1.sectionMemory_text = ["FLASHB","FLASHC","FLASHD","FLASHE"];
|
||||
CMD1.sectionAlignEnable_text = true;
|
||||
CMD1.sectionMemory_ramfunc = ["FLASHD"];
|
||||
CMD1.sectionRunFromDifferentAddr_ramfunc = true;
|
||||
CMD1.sectionRun_ramfunc = ["RAMLS0"];
|
||||
CMD1.sectionAlignEnable_ramfunc = true;
|
||||
CMD1.sectionMemory_ovly = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_ovly = true;
|
||||
CMD1.sectionMemory_cinit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_cinit = true;
|
||||
CMD1.sectionMemory_stack = ["RAMM1"];
|
||||
CMD1.sectionMemory_init_array = ["FLASHB"];
|
||||
CMD1.sectionAlignEnable_init_array = true;
|
||||
CMD1.sectionMemory_bss = ["RAMLS5"];
|
||||
CMD1.sectionMemory_const = ["FLASHF"];
|
||||
CMD1.sectionAlignEnable_const = true;
|
||||
CMD1.sectionMemory_data = ["RAMLS5"];
|
||||
CMD1.sectionMemory_switch = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_switch = true;
|
||||
CMD1.sectionMemory_sysmem = ["RAMLS5"];
|
||||
CMD1.sectionMemory_binit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_binit = true;
|
||||
@@ -0,0 +1,173 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: ipc_ex4_msgqueue_sysconfig_c28x1.c
|
||||
//
|
||||
// TITLE: SysConfig IPC example with interrupt and message queue
|
||||
//
|
||||
//! \addtogroup driver_dual_example_list
|
||||
//! <h1> IPC message passing example with interrupt and message queue </h1>
|
||||
//!
|
||||
//! This example demonstrates how to configure IPC and pass information from
|
||||
//! C28x1 to C28x2 core with message queues.
|
||||
//! It is recommended to run the C28x1 core first, followed by the C28x2 core.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None.
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - pass
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define IPC_CMD_READ_MEM 0x1001
|
||||
#define IPC_CMD_RESP 0x2001
|
||||
|
||||
#define TEST_PASS 0x5555
|
||||
#define TEST_FAIL 0xAAAA
|
||||
|
||||
|
||||
#pragma DATA_SECTION(readData, "MSGRAM_CPU1_TO_CPU2")
|
||||
uint32_t readData[10];
|
||||
|
||||
uint32_t pass;
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
int i;
|
||||
IPC_MessageQueue_t messageQueue;
|
||||
IPC_Message_t TxMsg, RxMsg;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Initialize settings from SysConfig
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Clear any IPC flags if set already
|
||||
//
|
||||
IPC_clearFlagLtoR(IPC_CPU1_L_CPU2_R, IPC_FLAG_ALL);
|
||||
|
||||
//
|
||||
// Initialize message queue
|
||||
//
|
||||
IPC_initMessageQueue(IPC_CPU1_L_CPU2_R, &messageQueue, IPC_INT1, IPC_INT1);
|
||||
|
||||
//
|
||||
// Synchronize both the cores
|
||||
//
|
||||
IPC_sync(IPC_CPU1_L_CPU2_R, SYNC_FLAG);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Fill in the data to be sent
|
||||
//
|
||||
for(i=0; i<10; i++)
|
||||
{
|
||||
readData[i] = i;
|
||||
}
|
||||
|
||||
//
|
||||
// Update the message
|
||||
//
|
||||
TxMsg.command = IPC_CMD_READ_MEM;
|
||||
TxMsg.address = (uint32_t)readData;
|
||||
TxMsg.dataw1 = 10; // Using dataw1 as data length
|
||||
TxMsg.dataw2 = 1; // Message identifier
|
||||
|
||||
//
|
||||
// Send message to the queue
|
||||
//
|
||||
IPC_sendMessageToQueue(IPC_CPU1_L_CPU2_R, &messageQueue, IPC_ADDR_CORRECTION_ENABLE,
|
||||
&TxMsg, IPC_BLOCKING_CALL);
|
||||
|
||||
//
|
||||
// Read message from the queue
|
||||
//
|
||||
IPC_readMessageFromQueue(IPC_CPU1_L_CPU2_R, &messageQueue, IPC_ADDR_CORRECTION_DISABLE,
|
||||
&RxMsg, IPC_BLOCKING_CALL);
|
||||
|
||||
if((RxMsg.command == IPC_CMD_RESP) && (RxMsg.dataw1 == TEST_PASS) && (RxMsg.dataw2 == 1))
|
||||
pass = 1;
|
||||
else
|
||||
pass = 0;
|
||||
|
||||
|
||||
//
|
||||
// End of example. Loop forever
|
||||
//
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "F2837xD" --package "F2837xD_337ZWT" --part "F2837xD_337ZWT" --context "CPU1" --product "C2000WARE@4.03.00.00"
|
||||
* @versions {"tool":"1.15.999+71"}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const ipc = scripting.addModule("/driverlib/ipc.js");
|
||||
const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
|
||||
const CMD1 = CMD.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
ipc.flagHandler31 = "SYNC_FLAG";
|
||||
ipc.ipcRegisterFlag = ["IPC_FLAG1","IPC_FLAG31"];
|
||||
ipc.enableInterrupt1 = true;
|
||||
|
||||
CMD.activateCMD = true;
|
||||
|
||||
CMD1.$name = "CMD0";
|
||||
CMD1.sectionMemory_text = ["FLASHB","FLASHC","FLASHD","FLASHE"];
|
||||
CMD1.sectionAlignEnable_text = true;
|
||||
CMD1.sectionMemory_ramfunc = ["FLASHD"];
|
||||
CMD1.sectionRunFromDifferentAddr_ramfunc = true;
|
||||
CMD1.sectionRun_ramfunc = ["RAMLS0"];
|
||||
CMD1.sectionAlignEnable_ramfunc = true;
|
||||
CMD1.sectionMemory_ovly = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_ovly = true;
|
||||
CMD1.sectionMemory_cinit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_cinit = true;
|
||||
CMD1.sectionMemory_stack = ["RAMM1"];
|
||||
CMD1.sectionMemory_init_array = ["FLASHB"];
|
||||
CMD1.sectionAlignEnable_init_array = true;
|
||||
CMD1.sectionMemory_bss = ["RAMLS5"];
|
||||
CMD1.sectionMemory_const = ["FLASHF"];
|
||||
CMD1.sectionAlignEnable_const = true;
|
||||
CMD1.sectionMemory_data = ["RAMLS5"];
|
||||
CMD1.sectionMemory_switch = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_switch = true;
|
||||
CMD1.sectionMemory_sysmem = ["RAMLS5"];
|
||||
CMD1.sectionAlignEnable_binit = true;
|
||||
CMD1.sectionMemory_binit = ["FLASHA"];
|
||||
@@ -0,0 +1,184 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: ipc_ex4_msgqueue_sysconfig_c28x2.c
|
||||
//
|
||||
// TITLE: SysConfig IPC example with interrupt and message queue
|
||||
//
|
||||
//! \addtogroup driver_dual_example_list
|
||||
//! <h1> IPC message passing example with interrupt and message queue </h1>
|
||||
//!
|
||||
//! This example demonstrates how to configure IPC and pass information from
|
||||
//! C28x1 to C28x2 core with message queues.
|
||||
//! It is recommended to run the C28x1 core first, followed by the C28x2 core.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None.
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - None.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
// $Copyright:
|
||||
// Copyright (C) 2013-2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define IPC_CMD_READ_MEM 0x1001
|
||||
#define IPC_CMD_RESP 0x2001
|
||||
|
||||
#define TEST_PASS 0x5555
|
||||
#define TEST_FAIL 0xAAAA
|
||||
|
||||
IPC_MessageQueue_t messageQueue;
|
||||
|
||||
//
|
||||
// Function prototypes
|
||||
//
|
||||
//__interrupt void IPC_ISR1();
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Clear any IPC flags if set already
|
||||
//
|
||||
IPC_clearFlagLtoR(IPC_CPU2_L_CPU1_R, IPC_FLAG_ALL);
|
||||
|
||||
//
|
||||
// Initialize message queue
|
||||
//
|
||||
IPC_initMessageQueue(IPC_CPU2_L_CPU1_R, &messageQueue, IPC_INT1, IPC_INT1);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Synchronize both the cores.
|
||||
//
|
||||
IPC_sync(IPC_CPU2_L_CPU1_R, SYNC_FLAG);
|
||||
|
||||
//
|
||||
// Loop forever. Wait for IPC interrupt
|
||||
//
|
||||
while(1);
|
||||
}
|
||||
|
||||
//
|
||||
// IPC ISR for Flag 1
|
||||
// C28x core sends data with message queue using Flag 0
|
||||
//
|
||||
__interrupt void IPC_ISR1()
|
||||
{
|
||||
int i;
|
||||
IPC_Message_t TxMsg, RxMsg;
|
||||
bool status = false;
|
||||
|
||||
//
|
||||
// Read the message from the message queue
|
||||
//
|
||||
IPC_readMessageFromQueue(IPC_CPU2_L_CPU1_R, &messageQueue, IPC_ADDR_CORRECTION_ENABLE,
|
||||
&RxMsg, IPC_NONBLOCKING_CALL);
|
||||
|
||||
if(RxMsg.command == IPC_CMD_READ_MEM)
|
||||
{
|
||||
status = true;
|
||||
|
||||
//
|
||||
// Read and compare data
|
||||
//
|
||||
for(i=0; i<RxMsg.dataw1; i++)
|
||||
{
|
||||
if(*((uint32_t *)RxMsg.address + i) != i)
|
||||
status = false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Send response message
|
||||
//
|
||||
TxMsg.command = IPC_CMD_RESP;
|
||||
TxMsg.address = 0; // Not used
|
||||
TxMsg.dataw1 = status ? TEST_PASS : TEST_FAIL;
|
||||
TxMsg.dataw2 = RxMsg.dataw2; // Use the message identifier from the received message
|
||||
|
||||
IPC_sendMessageToQueue(IPC_CPU2_L_CPU1_R, &messageQueue, IPC_ADDR_CORRECTION_DISABLE,
|
||||
&TxMsg, IPC_NONBLOCKING_CALL);
|
||||
|
||||
//
|
||||
// Acknowledge the flag
|
||||
//
|
||||
IPC_ackFlagRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG1);
|
||||
|
||||
//
|
||||
// Acknowledge the PIE interrupt.
|
||||
//
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "F2837xD" --package "F2837xD_337ZWT" --part "F2837xD_337ZWT" --context "CPU2" --product "C2000WARE@4.03.00.00"
|
||||
* @versions {"tool":"1.15.999+71"}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const ipc = scripting.addModule("/driverlib/ipc.js");
|
||||
const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
|
||||
const CMD1 = CMD.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
ipc.ipcRegisterFlag = ["IPC_FLAG31"];
|
||||
ipc.flagHandler31 = "SYNC_FLAG";
|
||||
ipc.registerInterrupts = ["1"];
|
||||
ipc.ipcInt1.enableInterrupt = true;
|
||||
ipc.ipcInt1.interruptHandler = "IPC_ISR1";
|
||||
|
||||
CMD.activateCMD = true;
|
||||
|
||||
CMD1.$name = "CMD0";
|
||||
CMD1.sectionMemory_text = ["FLASHB","FLASHC","FLASHD","FLASHE"];
|
||||
CMD1.sectionAlignEnable_text = true;
|
||||
CMD1.sectionMemory_ramfunc = ["FLASHD"];
|
||||
CMD1.sectionRunFromDifferentAddr_ramfunc = true;
|
||||
CMD1.sectionRun_ramfunc = ["RAMLS0"];
|
||||
CMD1.sectionAlignEnable_ramfunc = true;
|
||||
CMD1.sectionMemory_ovly = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_ovly = true;
|
||||
CMD1.sectionMemory_cinit = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_cinit = true;
|
||||
CMD1.sectionMemory_stack = ["RAMM1"];
|
||||
CMD1.sectionMemory_init_array = ["FLASHB"];
|
||||
CMD1.sectionAlignEnable_init_array = true;
|
||||
CMD1.sectionMemory_bss = ["RAMLS5"];
|
||||
CMD1.sectionMemory_const = ["FLASHF"];
|
||||
CMD1.sectionAlignEnable_const = true;
|
||||
CMD1.sectionMemory_data = ["RAMLS5"];
|
||||
CMD1.sectionMemory_switch = ["FLASHA"];
|
||||
CMD1.sectionAlignEnable_switch = true;
|
||||
CMD1.sectionMemory_sysmem = ["RAMLS5"];
|
||||
CMD1.sectionAlignEnable_binit = true;
|
||||
CMD1.sectionMemory_binit = ["FLASHA"];
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<system>
|
||||
<project configuration="@match" id="project_0" name="ipc_ex2_gpio_sysconfig_cpu1">
|
||||
</project>
|
||||
<core id="C28xx_CPU1" project="project_0"/>
|
||||
<project configuration="@match" id="project_1" name="ipc_ex2_gpio_sysconfig_cpu2">
|
||||
</project>
|
||||
<core id="C28xx_CPU2" project="project_1"/>
|
||||
<preBuildSteps>
|
||||
</preBuildSteps>
|
||||
<postBuildSteps>
|
||||
</postBuildSteps>
|
||||
|
||||
</system>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<system>
|
||||
<project configuration="@match" id="project_0" name="ipc_ex3_basic_sysconfig_c28x1">
|
||||
</project>
|
||||
<core id="C28xx_CPU1" project="project_0"/>
|
||||
<project configuration="@match" id="project_1" name="ipc_ex3_basic_sysconfig_c28x2">
|
||||
</project>
|
||||
<core id="C28xx_CPU2" project="project_1"/>
|
||||
<preBuildSteps>
|
||||
</preBuildSteps>
|
||||
<postBuildSteps>
|
||||
</postBuildSteps>
|
||||
|
||||
</system>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<system>
|
||||
<project configuration="@match" id="project_0" name="ipc_ex4_msgqueue_sysconfig_c28x1">
|
||||
</project>
|
||||
<core id="C28xx_CPU1" project="project_0"/>
|
||||
<project configuration="@match" id="project_1" name="ipc_ex4_msgqueue_sysconfig_c28x2">
|
||||
</project>
|
||||
<core id="C28xx_CPU2" project="project_1"/>
|
||||
<preBuildSteps>
|
||||
</preBuildSteps>
|
||||
<postBuildSteps>
|
||||
</postBuildSteps>
|
||||
|
||||
</system>
|
||||
Reference in new issue
Block a user