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,143 @@
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* BEGIN is used for the "boot to Flash" bootloader mode */
|
||||
BEGIN : origin = 0x080000, length = 0x000002
|
||||
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
|
||||
RAMM0 : origin = 0x0001B1, length = 0x00024F
|
||||
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
|
||||
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
|
||||
RAMD0 : origin = 0x00C000, length = 0x000800
|
||||
RAMD1 : origin = 0x00C800, length = 0x000800
|
||||
RAMLS0 : origin = 0x008000, length = 0x000800
|
||||
RAMLS1 : origin = 0x008800, length = 0x000800
|
||||
RAMLS2 : origin = 0x009000, length = 0x000800
|
||||
RAMLS3 : origin = 0x009800, length = 0x000800
|
||||
RAMLS4 : origin = 0x00A000, length = 0x000800
|
||||
RAMLS5 : origin = 0x00A800, length = 0x000800
|
||||
RAMLS6 : origin = 0x00B000, length = 0x000800
|
||||
RAMLS7 : origin = 0x00B800, length = 0x000800
|
||||
RAMGS0 : origin = 0x00D000, length = 0x001000
|
||||
RAMGS1 : origin = 0x00E000, length = 0x001000
|
||||
RAMGS2 : origin = 0x00F000, length = 0x001000
|
||||
RAMGS3 : origin = 0x010000, length = 0x001000
|
||||
RAMGS4 : origin = 0x011000, length = 0x001000
|
||||
RAMGS5 : origin = 0x012000, length = 0x001000
|
||||
RAMGS6 : origin = 0x013000, length = 0x001000
|
||||
RAMGS7 : origin = 0x014000, length = 0x001000
|
||||
RAMGS8 : origin = 0x015000, length = 0x001000
|
||||
RAMGS9 : origin = 0x016000, length = 0x001000
|
||||
RAMGS10 : origin = 0x017000, length = 0x001000
|
||||
RAMGS11 : origin = 0x018000, length = 0x001000
|
||||
RAMGS12 : origin = 0x019000, length = 0x001000
|
||||
RAMGS13 : origin = 0x01A000, length = 0x001000
|
||||
RAMGS14 : origin = 0x01B000, length = 0x001000
|
||||
RAMGS15 : origin = 0x01C000, length = 0x000FF8
|
||||
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
|
||||
|
||||
/* Flash sectors */
|
||||
FLASH0 : origin = 0x080002, length = 0x001FFE /* on-chip Flash */
|
||||
FLASH1 : origin = 0x082000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH2 : origin = 0x084000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH3 : origin = 0x086000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH4 : origin = 0x088000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH5 : origin = 0x090000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH6 : origin = 0x098000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH7 : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH8 : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH9 : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH10 : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH11 : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH12 : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH13 : origin = 0x0BE000, length = 0x001FF0 /* on-chip Flash */
|
||||
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
|
||||
|
||||
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
|
||||
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
|
||||
CPUTOCMRAM : origin = 0x039000, length = 0x000800
|
||||
CMTOCPURAM : origin = 0x038000, length = 0x000800
|
||||
|
||||
CANA_MSG_RAM : origin = 0x049000, length = 0x000800
|
||||
CANB_MSG_RAM : origin = 0x04B000, length = 0x000800
|
||||
|
||||
RESET : origin = 0x3FFFC0, length = 0x000002
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
codestart : > BEGIN, ALIGN(8)
|
||||
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
|
||||
.cinit : > FLASH4, ALIGN(8)
|
||||
.switch : > FLASH1, ALIGN(8)
|
||||
.reset : > RESET, TYPE = DSECT /* not used, */
|
||||
.stack : > RAMM1
|
||||
|
||||
#if defined(__TI_EABI__)
|
||||
.init_array : > FLASH1, ALIGN(8)
|
||||
.bss : > RAMLS5
|
||||
.bss:output : > RAMLS3
|
||||
.bss:cio : > RAMLS5
|
||||
.data : > RAMLS5
|
||||
.sysmem : > RAMLS5
|
||||
/* Initalized sections go in Flash */
|
||||
.const : > FLASH5, ALIGN(8)
|
||||
#else
|
||||
.pinit : > FLASH1, ALIGN(8)
|
||||
.ebss : > RAMLS5
|
||||
.esysmem : > RAMLS5
|
||||
.cio : > RAMLS5
|
||||
/* Initalized sections go in Flash */
|
||||
.econst : >> FLASH4 | FLASH5, ALIGN(8)
|
||||
#endif
|
||||
|
||||
ramgs0 : > RAMGS0, type=NOINIT
|
||||
ramgs1 : > RAMGS1, type=NOINIT
|
||||
|
||||
MSGRAM_CPU1_TO_CPU2 : > CPU1TOCPU2RAM, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CPU1 : > CPU2TOCPU1RAM, type=NOINIT
|
||||
MSGRAM_CPU_TO_CM : > CPUTOCMRAM, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU : > CMTOCPURAM, type=NOINIT
|
||||
|
||||
/* The following section definition are for SDFM examples */
|
||||
Filter_RegsFile : > RAMGS0
|
||||
Filter1_RegsFile : > RAMGS1, fill=0x1111
|
||||
Filter2_RegsFile : > RAMGS2, fill=0x2222
|
||||
Filter3_RegsFile : > RAMGS3, fill=0x3333
|
||||
Filter4_RegsFile : > RAMGS4, fill=0x4444
|
||||
Difference_RegsFile : >RAMGS5, fill=0x3333
|
||||
|
||||
#if defined(__TI_EABI__)
|
||||
.TI.ramfunc : {} LOAD = FLASH3,
|
||||
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
|
||||
LOAD_START(RamfuncsLoadStart),
|
||||
LOAD_SIZE(RamfuncsLoadSize),
|
||||
LOAD_END(RamfuncsLoadEnd),
|
||||
RUN_START(RamfuncsRunStart),
|
||||
RUN_SIZE(RamfuncsRunSize),
|
||||
RUN_END(RamfuncsRunEnd),
|
||||
ALIGN(8)
|
||||
#else
|
||||
.TI.ramfunc : {} LOAD = FLASH3,
|
||||
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
|
||||
LOAD_START(_RamfuncsLoadStart),
|
||||
LOAD_SIZE(_RamfuncsLoadSize),
|
||||
LOAD_END(_RamfuncsLoadEnd),
|
||||
RUN_START(_RamfuncsRunStart),
|
||||
RUN_SIZE(_RamfuncsRunSize),
|
||||
RUN_END(_RamfuncsRunEnd),
|
||||
ALIGN(8)
|
||||
#endif
|
||||
|
||||
.TI.ramfunc:Flash_disableCache : LOAD = FLASH3,
|
||||
RUN = RAMLS0,
|
||||
TABLE(BINIT),
|
||||
ALIGN(8)
|
||||
.binit : > FLASH1, ALIGN(8)
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcsm_ex1_secure_memory_partition"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x"
|
||||
>
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --define=_FLASH --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x100 --heap_size=0x200 " />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_lnk_DCSM_cpu1.cmd" targetDirectory="" />
|
||||
<file action="copy" path="../2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../dcsm_ex1_secure_memory_partition.c" targetDirectory="" />
|
||||
<file action="copy" path="../dcsm_ex1_f2838x_dcsm_z1otp.asm" targetDirectory="" />
|
||||
<file action="copy" path="../dcsm_ex1_f2838x_dcsm_z2otp.asm" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,38 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcsm_security_tool"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x100 --heap_size=0x200 --define RAM" />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --define=_FLASH --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x100 --heap_size=0x200 " />
|
||||
|
||||
<configuration name="CPU1_CLB" postBuildStep="${NODE_TOOL} "${CLB_SYSCFG_ROOT}/dot_file_libraries/clbDotUtility.js" "${CLB_SYSCFG_ROOT}" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot""
|
||||
compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x100 --heap_size=0x200 --define RAM" />
|
||||
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM,CPU1_CLB" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../dcsm_security_tool.c" targetDirectory="" />
|
||||
<file action="copy" path="../dcsm_security_tool.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,154 @@
|
||||
;;#############################################################################
|
||||
;;
|
||||
;; FILE: dcsm_ex1_f2838x_dcsm_z1otp.asm
|
||||
;;
|
||||
;; TITLE: Dual Code Security Module Zone 1 OTP for Secure memory partition
|
||||
;;
|
||||
;; DESCRIPTION:
|
||||
;;
|
||||
;; This file is used by the example dcsm_ex1_secure_memory_partition
|
||||
;; to specify Z1 DCSM OTP and zone select block values to program.
|
||||
;;
|
||||
;; It configures the 1st Zone Select Block(ZSB) in the OTP to change the
|
||||
;; zone passwords and allocates LS0-LS3 to zone 1.
|
||||
;;
|
||||
;; !!IMPORTANT!! The below memory sections are mapped to OTP (one-time
|
||||
;; programmable) memory with the *lnk_DCSM_cpu1.cmd linker command file. In order
|
||||
;; to program the below memory sections, user should uncomment the .long words
|
||||
;; of each section and change the value to what is desired. Additionally, the
|
||||
;; corresponding section of *lnk_DCSM_cpu1.cmd should no longer be labeled as a
|
||||
;; dummy section. Remove ", type = DSECT" in SECTIONS from the memory section
|
||||
;; that is being programmed.
|
||||
;;
|
||||
;;
|
||||
;; !!IMPORTANT!! The "dcsm_z1otp_link_pointer" section contains the
|
||||
;; Z1 LINKPOINTER which determines the location of the Z1 Zone Select block.
|
||||
;; If the LINKPOINTER is changed, then the "dcsm_zsel_z1" section
|
||||
;; in the *lnk_DCSM_cpu1.cmd command linker file must also change to an
|
||||
;; address decoded from the value specified in the Z1-LINKPOINTER location.
|
||||
;; In this example, the "dcsm_zsel_z1" section maps to ZSB1.
|
||||
;;
|
||||
;; The "dcsm_zsel_z1" section contains the actual Z1 Zone Select Block
|
||||
;; values that will be linked and programmed into to the DCSM Z1 OTP Zone
|
||||
;; Select block in OTP. In this example, the values seen for the CSMPSWD*
|
||||
;; & GRABRAM* are of the ZSB1 CSMPSWD (these values must be known in order to
|
||||
;; unlock the CSM module) & for the memory allocations resp.
|
||||
;;
|
||||
;; It is recommended that all values be left as default expected by TRM during code
|
||||
;; development. These default values do not activate code security and dummy
|
||||
;; reads of the Z1 DCSM PWL registers is all that is required to unlock the
|
||||
;; CSM. When code development is complete, modify values to activate the
|
||||
;; code security module.
|
||||
;;
|
||||
;; ******************************WARNING***************************************
|
||||
;; It is recommended not to program 0xFFFFFFFF to user OTP locations, if users
|
||||
;; intend to comeback and re-program any of the bits to '0' in future. If user
|
||||
;; programs 0xFFFFFFFF to any of the OTP locations then the ECC locations would
|
||||
;; get programmed to a non erased state and users won't be able to comeback
|
||||
;; and re-program the OTP location to another value. Please refer to DCSM
|
||||
;; chapter of device TRM for more details on ECC for the locations in DCSM.
|
||||
;;
|
||||
;; Hence TI ships this example commenting out the initialization of all the
|
||||
;; below locations.
|
||||
;;#############################################################################
|
||||
;;
|
||||
;// C2000Ware v5.04.00.00
|
||||
;//Copyright (C) 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.
|
||||
;// $
|
||||
;;#############################################################################
|
||||
|
||||
.sect "dcsm_z1otp_link_pointer"
|
||||
.retain
|
||||
;; .long 0x00003FFF ;Z1OTP_LINKPOINTER1
|
||||
;; .long 0x00003FFF ;Z1OTP_LINKPOINTER2
|
||||
;; .long 0x00003FFF ;Z1OTP_LINKPOINTER3
|
||||
|
||||
.sect "dcsm_z1otp_jlm_enable"
|
||||
.retain
|
||||
;; .long 0xFFFF000F ;Z1OTP_JLM_ENABLE
|
||||
|
||||
.sect "dcsm_z1otp_gpreg"
|
||||
.retain
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_GPREG1
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_GPREG2
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_GPREG3
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_GPREG4
|
||||
|
||||
.sect "dcsm_z1otp_pswd_lock"
|
||||
.retain
|
||||
;; .long 0xfb7fffff ;Z1OTP_PSWDLOCK
|
||||
|
||||
.sect "dcsm_z1otp_crc_lock"
|
||||
.retain
|
||||
;; .long 0x7fffffff ;Z1OTP_CRCLOCK
|
||||
|
||||
.sect "dcsm_z1otp_jtag_pswdh"
|
||||
.retain
|
||||
;; .long 0x4bffffff ;Z1OTP_JTAGPSWDH0
|
||||
;; .long 0x3fffffff ;Z1OTP_JTAGPSWDH1
|
||||
|
||||
.sect "dcsm_z1otp_cmac_key"
|
||||
.retain
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY0
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY1
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY2
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY3
|
||||
|
||||
.sect "dcsm_zsel_z1"
|
||||
.retain
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CSMPSWD0 (LSW of 128-bit password)
|
||||
;; .long 0x4D7FFFFF ;Z1OTP_CSMPSWD1
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CSMPSWD2
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_CSMPSWD3 (MSW of 128-bit password)
|
||||
|
||||
;; .long 0x0AAAAAAA ;Z1OTP_GRABSECT1
|
||||
;; .long 0x0AAAAAAA ;Z1OTP_GRABSECT2
|
||||
;; .long 0x0AAAAAAA ;Z1OTP_GRABSECT3
|
||||
;; .long 0x000AAA55 ;Z1OTP_GRABRAM1
|
||||
;; .long 0x0AAAAA0A ;Z1OTP_GRABRAM2
|
||||
;; .long 0x000AAAAA ;Z1OTP_GRABRAM3
|
||||
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_EXEONLYSECT1
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_EXEONLYSECT2
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_EXEONLYRAM1
|
||||
;; .long 0xFFFFFFFF ;Reserved
|
||||
;; .long 0xFFFFFFFF ;Z1OTP_JTAGPSWDL0
|
||||
;; .long 0x2bffffff ;Z1OTP_JTAGPSWDL1
|
||||
|
||||
;;----------------------------------------------------------------------
|
||||
|
||||
;; For code security operation,after development has completed, prior to
|
||||
;; production, all other zone select block locations should be programmed
|
||||
;; to 0x0000 for maximum security.
|
||||
|
||||
;;#############################################################################
|
||||
;; End of file
|
||||
;;#############################################################################
|
||||
@@ -0,0 +1,151 @@
|
||||
;;#############################################################################
|
||||
;;
|
||||
;; FILE: dcsm_ex1_f2838x_dcsm_z2otp.asm
|
||||
;;
|
||||
;; TITLE: Dual Code Security Module Zone 2 OTP for Secure memory partition
|
||||
;;
|
||||
;; DESCRIPTION:
|
||||
;;
|
||||
;; This file is used by the example dcsm_ex1_secure_memory_partition
|
||||
;; to specify Z2 DCSM OTP and zone select block values to program.
|
||||
;;
|
||||
;; It configures the 1st Zone Select Block(ZSB) in the OTP to change the
|
||||
;; zone passwords and allocates LS4-LS7 to zone 2.
|
||||
;;
|
||||
;; !!IMPORTANT!! The below memory sections are mapped to OTP (one-time
|
||||
;; programmable) memory with the *lnk_DCSM_cpu1.cmd linker command file. In order
|
||||
;; to program the below memory sections, user should uncomment the .long words
|
||||
;; of each section and change the value to what is desired. Additionally, the
|
||||
;; corresponding section of *lnk_DCSM_cpu1.cmd should no longer be labeled as a
|
||||
;; dummy section. Remove ", type = DSECT" in SECTIONS from the memory section
|
||||
;; that is being programmed.
|
||||
;;
|
||||
;;
|
||||
;; !!IMPORTANT!! The "dcsm_z2otp_link_pointer" section contains the
|
||||
;; Z2 LINKPOINTER which determines the location of the Z2 Zone Select block.
|
||||
;; If the LINKPOINTER is changed, then the "dcsm_zsel_z2" section
|
||||
;; in the *lnk_DCSM_cpu1.cmd command linker file must also change to an
|
||||
;; address decoded from the value specified in the Z2-LINKPOINTER location.
|
||||
;; In this example, the "dcsm_zsel_z2" section maps to ZSB1.
|
||||
;;
|
||||
;; The "dcsm_zsel_z2" section contains the actual Z2 Zone Select Block
|
||||
;; values that will be linked and programmed into to the DCSM Z2 OTP Zone
|
||||
;; Select block in OTP. In this example, the values seen for the CSMPSWD*
|
||||
;; & GRABRAM* are of the ZSB1 CSMPSWD (these values must be known in order to
|
||||
;; unlock the CSM module) & for the memory allocations resp.
|
||||
;;
|
||||
;; It is recommended that all values be left as default expected by TRM during code
|
||||
;; development. These default values do not activate code security and dummy
|
||||
;; reads of the Z2 DCSM PWL registers is all that is required to unlock the
|
||||
;; CSM. When code development is complete, modify values to activate the
|
||||
;; code security module.
|
||||
;;
|
||||
;; ******************************WARNING***************************************
|
||||
;; It is recommended not to program 0xFFFFFFFF to user OTP locations, if users
|
||||
;; intend to comeback and re-program any of the bits to '0' in future. If user
|
||||
;; programs 0xFFFFFFFF to any of the OTP locations then the ECC locations would
|
||||
;; get programmed to a non erased state and users won't be able to comeback
|
||||
;; and re-program the OTP location to another value. Please refer to DCSM
|
||||
;; chapter of device TRM for more details on ECC for the locations in DCSM.
|
||||
;;
|
||||
;; Hence TI ships this example commenting out the initialization of all the
|
||||
;; below locations.
|
||||
;;#############################################################################
|
||||
;;
|
||||
;// C2000Ware v5.04.00.00
|
||||
;//Copyright (C) 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.
|
||||
;// $
|
||||
;;#############################################################################
|
||||
|
||||
.sect "dcsm_z2otp_link_pointer"
|
||||
.retain
|
||||
;; .long 0x00003FFF ;Z2OTP_LINKPOINTER1
|
||||
;; .long 0x00003FFF ;Z2OTP_LINKPOINTER2
|
||||
;; .long 0x00003FFF ;Z2OTP_LINKPOINTER3
|
||||
|
||||
;; Uncomment these lines to allow programming of Zone2 Link pointer which has to
|
||||
;; be done in either multiples of 64-bits or 128-bits.
|
||||
.sect "dcsm_rsvd_z2"
|
||||
.retain
|
||||
;; .long 0xFFFFFFFF ;Reserved
|
||||
|
||||
.sect "dcsm_z2otp_gpreg"
|
||||
.retain
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_GPREG1
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_GPREG2
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_GPREG3
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_GPREG4
|
||||
|
||||
.sect "dcsm_z2otp_pswd_lock"
|
||||
.retain
|
||||
;; .long 0x1f7fffff ;Z2OTP_PSWDLOCK
|
||||
|
||||
.sect "dcsm_z2otp_crc_lock"
|
||||
.retain
|
||||
;; .long 0x3fffffff ;Z2OTP_CRCLOCK
|
||||
|
||||
;; Uncomment these lines to allow programming of Zone2 PSWDLOCK & CRCLOCK
|
||||
;; which has to be done in either multiples of 64-bits or 128-bits.
|
||||
.sect "dcsm_rsvd1_z2"
|
||||
.retain
|
||||
; .long 0xFFFFFFFF ;Reserved
|
||||
; .long 0xFFFFFFFF ;Reserved
|
||||
|
||||
.sect "dcsm_zsel_z2"
|
||||
.retain
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_CSMPSWD0 (LSW of 128-bit password)
|
||||
;; .long 0x1f7fffff ;Z2OTP_CSMPSWD1
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_CSMPSWD2
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_CSMPSWD3 (MSW of 128-bit password)
|
||||
|
||||
;; .long 0x0AAAAAAA ;Z2OTP_GRABSECT1
|
||||
;; .long 0x0AAAAAAA ;Z2OTP_GRABSECT2
|
||||
;; .long 0x0AAAAAAA ;Z2OTP_GRABSECT3
|
||||
;; .long 0x000A55AA ;Z2OTP_GRABRAM1
|
||||
;; .long 0x0AAAAA0A ;Z2OTP_GRABRAM2
|
||||
;; .long 0x000AAAAA ;Z2OTP_GRABRAM3
|
||||
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_EXEONLYSECT1
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_EXEONLYSECT2
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_EXEONLYRAM1
|
||||
;; .long 0xFFFFFFFF ;Reserved
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_JTAGPSWDL0
|
||||
;; .long 0xFFFFFFFF ;Z2OTP_JTAGPSWDL1
|
||||
|
||||
;;----------------------------------------------------------------------
|
||||
|
||||
;; For code security operation,after development has completed, prior to
|
||||
;; production, all other zone select block locations should be programmed
|
||||
;; to 0x0000 for maximum security.
|
||||
|
||||
;;#############################################################################
|
||||
;; End of file
|
||||
;;#############################################################################
|
||||
@@ -0,0 +1,286 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: dcsm_ex1_secure_memory_partition.c
|
||||
//
|
||||
// TITLE: DCSM Memory partitioning Example
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1> DCSM Memory partitioning Example </h1>
|
||||
//!
|
||||
//! This example demonstrates how to configure and use DCSM.
|
||||
//! It configures the 1st Zone Select Block in the OTP to change the zone
|
||||
//! passwords and allocates LS0-LS3 to zone 1 & LS4-LS7 to zone 2.
|
||||
//!
|
||||
//! Zone1 | Zone2
|
||||
//! |
|
||||
//! LS0-LS3 | LS4-LS7
|
||||
//! |
|
||||
//!
|
||||
//! In this example, zoning of memories is done by the OTP programming whose
|
||||
//! values are configured in dcsm_ex1_f2838x_dcsm_zxotp.asm while the securing
|
||||
//! functionalities are done through this file.
|
||||
//! It writes some data in the zones and checks before locking and after
|
||||
//! locking and matches with the data set . Ideally after locking zone1, the
|
||||
//! data set stored in zone1 should not be readable( or reads a 0 value) and
|
||||
//! zone2 that is not secured matches the written data set.
|
||||
//! It demonstrates how to lock and and unlock zones by showing where to put
|
||||
//! the password and how to check if it is secured or unsecured.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None.
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - \b result - Status of Secure memory partitioning done through OTP
|
||||
//! programming.
|
||||
//! - \b set_error, error_not_locked ,error_not_unlocked ,error1 - Count of
|
||||
//! errors occurring during the execution of the example.
|
||||
//! - \b Zone1_Locked_Array - Array demonstrating secured memory
|
||||
//! - \b Unsecure_mem_Array - Array demonstrating Unsecured memory
|
||||
//!
|
||||
//! \note Before running the example, the below configuration is expected to
|
||||
//! be done through the dcsm_ex1_f2838x_dcsm_zxotp.asm :
|
||||
//!
|
||||
//! - Allocate LS0-LS3 to zone 1 , LS4-LS7 to zone 2
|
||||
//! ZSBx_Z1_GRABRAM1R 0x000AAA55
|
||||
//! ZSBx_Z2_GRABRAM1R 0x000A55AA
|
||||
//! - Password of zone 1 is 0xFFFFFFFF4D7FFFFFFFFFFFFFFFFFFFFF
|
||||
//! - Password of zone 2 is 0xFFFFFFFF1F7FFFFFFFFFFFFFFFFFFFFF
|
||||
//!
|
||||
//! \note DCSM_unlockZone*CSM function should not be called in an actual
|
||||
//! application, should only be used for once to program the OTP memory.
|
||||
//! Ensure flash data cache is disabled before calling this function.
|
||||
//
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 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"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define PASS 0
|
||||
#define FAIL 1
|
||||
|
||||
uint32_t result = FAIL;
|
||||
|
||||
uint16_t Zone1_Locked_Array[256]; // Mapped to LS2 RAM
|
||||
uint16_t Unsecure_mem_Array[256]; // Mapped to LS4 RAM
|
||||
DCSM_CSMPasswordKey csmK_z1; //Zone1 key
|
||||
DCSM_CSMPasswordKey csmK_z2; //Zone2 key
|
||||
|
||||
#pragma DATA_SECTION(Zone1_Locked_Array,"ZONE1_RAM");
|
||||
#pragma DATA_SECTION(Unsecure_mem_Array,"UNSECURE_RAM");
|
||||
#pragma DATA_SECTION(csmK_z1,"CSMKEY_RAM");
|
||||
#pragma DATA_SECTION(csmK_z2,"CSMKEY_RAM");
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
//Variables showing the error occurred while testing DCSM
|
||||
//
|
||||
uint16_t i=0,error_not_locked=0,error_not_unlocked=0,error1=0,set_error=0;
|
||||
uint32_t cacheEnable;
|
||||
|
||||
DCSM_SecurityStatus status1;
|
||||
|
||||
//
|
||||
//Variable to check the status of the Ram module allocated to zone
|
||||
//
|
||||
DCSM_MemoryStatus mem_status;
|
||||
|
||||
//
|
||||
//Updating the Zone1 key value
|
||||
//
|
||||
csmK_z1.csmKey0 = 0xFFFFFFFF;
|
||||
csmK_z1.csmKey1 = 0x4D7FFFFF;
|
||||
csmK_z1.csmKey2 = 0xFFFFFFFF;
|
||||
csmK_z1.csmKey3 = 0xFFFFFFFF;
|
||||
|
||||
//
|
||||
//Updating the Zone2 key value
|
||||
//
|
||||
csmK_z2.csmKey0 = 0xFFFFFFFF;
|
||||
csmK_z2.csmKey1 = 0x1F7FFFFF;
|
||||
csmK_z2.csmKey2 = 0xFFFFFFFF;
|
||||
csmK_z2.csmKey3 = 0xFFFFFFFF;
|
||||
|
||||
//
|
||||
// Save the state of the cache enable bit
|
||||
//
|
||||
cacheEnable = HWREG(FLASH0CTRL_BASE + FLASH_O_FRD_INTF_CTRL) &
|
||||
FLASH_FRD_INTF_CTRL_DATA_CACHE_EN;
|
||||
|
||||
//
|
||||
// Disable cache before unlocking the zone
|
||||
//
|
||||
Flash_disableCache(FLASH0CTRL_BASE);
|
||||
|
||||
//
|
||||
//Unlocking the zone1 using the key since the password maybe
|
||||
//different from the default
|
||||
//
|
||||
DCSM_unlockZone1CSM(&csmK_z1);
|
||||
|
||||
//
|
||||
//Unlocking the zone2 using the key since the password maybe
|
||||
//different from the default
|
||||
//
|
||||
DCSM_unlockZone2CSM(&csmK_z2);
|
||||
|
||||
//
|
||||
// Restore the state of the cache enable bit.
|
||||
//
|
||||
HWREG(FLASH0CTRL_BASE + FLASH_O_FRD_INTF_CTRL) |= cacheEnable;
|
||||
|
||||
//
|
||||
//Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
//Getting the default status of the zone 1
|
||||
//
|
||||
status1 = DCSM_getZone1CSMSecurityStatus();
|
||||
if(status1!=DCSM_STATUS_UNSECURE) set_error++;
|
||||
|
||||
//
|
||||
//Getting the default status of the RAMLS2 allocation
|
||||
//
|
||||
mem_status = DCSM_getRAMZone(DCSM_RAMLS2,DCSM_CPUSEL_CPU1);
|
||||
if(mem_status!=DCSM_MEMORY_ZONE1) set_error++;
|
||||
|
||||
//
|
||||
//Getting the default status of the RAMLS4 allocation
|
||||
//
|
||||
mem_status = DCSM_getRAMZone(DCSM_RAMLS4,DCSM_CPUSEL_CPU1);
|
||||
if(mem_status!=DCSM_MEMORY_ZONE2) set_error++;
|
||||
|
||||
//
|
||||
//Updating the arrays one which belong to zone1 and other which belongs to z2
|
||||
//
|
||||
for(i=1;i<256;i++)
|
||||
{
|
||||
Unsecure_mem_Array[i] = i;
|
||||
Zone1_Locked_Array[i] = i;
|
||||
}
|
||||
|
||||
//
|
||||
//Locking the zone1
|
||||
//
|
||||
DCSM_secureZone1();
|
||||
|
||||
//
|
||||
//Getting the status of zone1 after locking it
|
||||
//
|
||||
status1 = DCSM_getZone1CSMSecurityStatus();
|
||||
if(status1!=DCSM_STATUS_SECURE) set_error++;
|
||||
|
||||
//
|
||||
//Read both the arrays. One which is not secured would be
|
||||
//readable unlike the other secured one that wouldn't be.
|
||||
//
|
||||
for(i=1;i<256;i++)
|
||||
{
|
||||
if(Unsecure_mem_Array[i] != i) error1++;
|
||||
if(Zone1_Locked_Array[i] == i) error_not_locked++ ;
|
||||
}
|
||||
|
||||
//
|
||||
// Save the state of the cache enable bit
|
||||
//
|
||||
cacheEnable = HWREG(FLASH0CTRL_BASE + FLASH_O_FRD_INTF_CTRL) &
|
||||
FLASH_FRD_INTF_CTRL_DATA_CACHE_EN;
|
||||
|
||||
//
|
||||
// Disable cache before unlocking the zone
|
||||
//
|
||||
Flash_disableCache(FLASH0CTRL_BASE);
|
||||
|
||||
//
|
||||
//Unlocking the zone1 using the key after locking it
|
||||
//
|
||||
DCSM_unlockZone1CSM(&csmK_z1);
|
||||
|
||||
//
|
||||
// Restore the state of the cache enable bit.
|
||||
//
|
||||
HWREG(FLASH0CTRL_BASE + FLASH_O_FRD_INTF_CTRL) |= cacheEnable;
|
||||
|
||||
//
|
||||
//Getting the status of zone 1 after unlocking it .
|
||||
//
|
||||
status1 = DCSM_getZone1CSMSecurityStatus();
|
||||
if(status1!=DCSM_STATUS_UNSECURE) set_error++;
|
||||
|
||||
//
|
||||
//Since the zone1 has been unlocked both should be readable
|
||||
//
|
||||
for(i=1;i<256;i++)
|
||||
{
|
||||
if(Unsecure_mem_Array[i] != i) error1++;
|
||||
if(Zone1_Locked_Array[i] != i) error_not_unlocked++ ;
|
||||
}
|
||||
|
||||
//
|
||||
//Status of Secure memory partitioning
|
||||
//
|
||||
if (error1 | error_not_unlocked | set_error | error_not_locked)
|
||||
{
|
||||
result = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = PASS;
|
||||
|
||||
}
|
||||
|
||||
while(1);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,94 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: dcsm_security_tool.c
|
||||
//
|
||||
// TITLE: DCSM Tool Example
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1> Empty DCSM Tool Example </h1>
|
||||
//! This example is an empty project setup for DCSM Tool and Driverlib
|
||||
//! development.
|
||||
//! For guidance refer to:
|
||||
//! [C2000 DCSM Security Tool](http://www.ti.com/lit/pdf/spracp8)
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 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"
|
||||
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Disable pin locks and enable internal pull-ups.
|
||||
//
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// 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 real time interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// IDLE loop. Just sit and loop forever (optional):
|
||||
//
|
||||
for(;;)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
var DCSM = scripting.addModule("/utilities/dcsm_tool/dcsm_syscfg/source/DCSM", {}, false);
|
||||
var DCSM1 = DCSM.addInstance();
|
||||
// Name
|
||||
DCSM1.$name = "DCSM0";
|
||||
// Name
|
||||
DCSM1.ZONE1_OTP.$name = "ZONE_OTP0";
|
||||
// Name
|
||||
DCSM1.ZONE1.$name = "ZONE0";
|
||||
// Name
|
||||
DCSM1.ZONE2_OTP.$name = "ZONE_OTP1";
|
||||
// Name
|
||||
DCSM1.ZONE2.$name = "ZONE1";
|
||||
Reference in new issue
Block a user