diff --git a/.ccsproject b/.ccsproject index 405b88a..fbbfbcf 100644 --- a/.ccsproject +++ b/.ccsproject @@ -7,13 +7,11 @@ - - - - + + + + - - diff --git a/.clangd b/.clangd deleted file mode 100644 index 8c4daa2..0000000 --- a/.clangd +++ /dev/null @@ -1,11 +0,0 @@ -# This is an auto-generated file - do not add it to source-control - -CompileFlags: - CompilationDatabase: Debug/.clangd - -Diagnostics: - Suppress: '*' - -InlayHints: - Enabled: No - diff --git a/.config/.productview.dat b/.config/.productview.dat new file mode 100644 index 0000000..85a42e4 Binary files /dev/null and b/.config/.productview.dat differ diff --git a/.config/xconfig_rtos/.buildtime b/.config/xconfig_rtos/.buildtime new file mode 100644 index 0000000..21bbe8a --- /dev/null +++ b/.config/xconfig_rtos/.buildtime @@ -0,0 +1 @@ +C:\Users\gene\OneDrive - Worcester Polytechnic Institute (wpi.edu)\ECE3849\workspace_v9\ece3849_lab2_starter\.config\xconfig_rtos\.buildtime \ No newline at end of file diff --git a/.config/xconfig_rtos/.interfaces b/.config/xconfig_rtos/.interfaces new file mode 100644 index 0000000..e69de29 diff --git a/.config/xconfig_rtos/.xdcenv.mak b/.config/xconfig_rtos/.xdcenv.mak new file mode 100644 index 0000000..a136486 --- /dev/null +++ b/.config/xconfig_rtos/.xdcenv.mak @@ -0,0 +1,16 @@ +# +_XDCBUILDCOUNT = 0 +ifneq (,$(findstring path,$(_USEXDCENV_))) +override XDCPATH = C:/ti/tirtos_tivac_2_16_01_14/packages;C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages;C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ndk_2_25_00_09/packages;C:/ti/tirtos_tivac_2_16_01_14/products/uia_2_00_05_50/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ns_1_11_00_10/packages;C:/ti/ccs930/ccs/ccs_base;C:/Users/gene/ONEDRI~1.EDU/ECE3849/workspace_v9/ece3849_lab2_starter/.config +override XDCROOT = C:/ti/xdctools_3_32_00_06_core +override XDCBUILDCFG = ./config.bld +endif +ifneq (,$(findstring args,$(_USEXDCENV_))) +override XDCARGS = +override XDCTARGETS = +endif +# +ifeq (0,1) +PKGPATH = C:/ti/tirtos_tivac_2_16_01_14/packages;C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages;C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ndk_2_25_00_09/packages;C:/ti/tirtos_tivac_2_16_01_14/products/uia_2_00_05_50/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ns_1_11_00_10/packages;C:/ti/ccs930/ccs/ccs_base;C:/Users/gene/ONEDRI~1.EDU/ECE3849/workspace_v9/ece3849_lab2_starter/.config;C:/ti/xdctools_3_32_00_06_core/packages;.. +HOSTOS = Windows +endif diff --git a/.config/xconfig_rtos/compiler.opt b/.config/xconfig_rtos/compiler.opt new file mode 100644 index 0000000..34acf0b --- /dev/null +++ b/.config/xconfig_rtos/compiler.opt @@ -0,0 +1 @@ +--endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -I"C:/ti/tirtos_tivac_2_16_01_14/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/ndk_2_25_00_09/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/uia_2_00_05_50/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/ns_1_11_00_10/packages" -I"C:/ti/ccs930/ccs/ccs_base" -I"C:/Users/gene/ONEDRI~1.EDU/ECE3849/workspace_v9/ece3849_lab2_starter/.config" -I"C:/ti/xdctools_3_32_00_06_core/packages" -I"C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/.config/xconfig_rtos/.." -IC:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include/rts -IC:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include -Dxdc_target_types__="ti/targets/arm/elf/std.h" -Dxdc_target_name__=M4F -Dxdc_cfg__xheader__="\"C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/.config/xconfig_rtos/package/cfg/rtos_pem4f.h\"" diff --git a/.config/xconfig_rtos/compiler.opt.defs b/.config/xconfig_rtos/compiler.opt.defs new file mode 100644 index 0000000..a9aa2e3 --- /dev/null +++ b/.config/xconfig_rtos/compiler.opt.defs @@ -0,0 +1 @@ +-I"C:/ti/tirtos_tivac_2_16_01_14/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/ndk_2_25_00_09/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/uia_2_00_05_50/packages" -I"C:/ti/tirtos_tivac_2_16_01_14/products/ns_1_11_00_10/packages" -I"C:/ti/ccs930/ccs/ccs_base" -I"C:/Users/gene/ONEDRI~1.EDU/ECE3849/workspace_v9/ece3849_lab2_starter/.config" -I"C:/ti/xdctools_3_32_00_06_core/packages" -I"C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/.config/xconfig_rtos/.." -IC:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include/rts -IC:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include -Dxdc_target_types__="ti/targets/arm/elf/std.h" -Dxdc_target_name__=M4F -Dxdc_cfg__xheader__="\"C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/.config/xconfig_rtos/package/cfg/rtos_pem4f.h\"" diff --git a/.config/xconfig_rtos/config.bld b/.config/xconfig_rtos/config.bld new file mode 100644 index 0000000..d8e65ab --- /dev/null +++ b/.config/xconfig_rtos/config.bld @@ -0,0 +1,24 @@ +/* THIS IS A GENERATED FILE -- DO NOT EDIT */ + +var target; /* the target used for this build */ + +/* configuro was passed the target's name explicitly */ +try { + target = xdc.module('ti.targets.arm.elf.M4F'); +} +catch (e) { + throw new Error("Can't find the target named '" + 'ti.targets.arm.elf.M4F' + + "' along the path '" + environment["xdc.path"] + + "': please check the spelling of the target's name and that it exists along this path."); +} +if (!(target instanceof xdc.module("xdc.bld.ITarget").Module)) { + throw new Error("The module named 'ti.targets.arm.elf.M4F' exists but it's not a target: please check the spelling of the target's name"); +} + +/* configuro was passed compiler options explicitly */ +target.ccOpts.prefix = unescape("-mv7M4%20--code_state%3D16%20--float_support%3DFPv4SPD16%20-me%20-O1%20--opt_for_speed%3D2%20--include_path%3D%22C%3A/Users/gene/OneDrive%20-%20Worcester%20Polytechnic%20Institute%20%28wpi.edu%29/ECE3849/workspace_v9/ece3849_lab2_starter%22%20--include_path%3D%22C%3A/Users/gene/OneDrive%20-%20Worcester%20Polytechnic%20Institute%20%28wpi.edu%29/ECE3849/workspace_v9/ece3849_lab2_starter%22%20--include_path%3D%22C%3A/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b%22%20--include_path%3D%22C%3A/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_01_29/packages/ti/sysbios/posix%22%20--include_path%3D%22C%3A/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include%22%20--define%3Dccs%3D%22ccs%22%20--define%3DPART_TM4C1294NCPDT%20--define%3Dccs%20--define%3DTIVAWARE%20-g%20--gcc%20--diag_warning%3D225%20--diag_warning%3D255%20--diag_wrap%3Doff%20--display_error_number%20--gen_func_subsections%3Don%20--abi%3Deabi%20%20%20") + target.ccOpts.prefix; + +/* configuro was passed the target's rootDir explicitly */ +target.rootDir = 'C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS'; + +Build.targets = [target]; diff --git a/.config/xconfig_rtos/custom.mak b/.config/xconfig_rtos/custom.mak new file mode 100644 index 0000000..352abc9 --- /dev/null +++ b/.config/xconfig_rtos/custom.mak @@ -0,0 +1,11 @@ +## THIS IS A GENERATED FILE -- DO NOT EDIT +.configuro: .libraries,em4f linker.cmd package/cfg/rtos_pem4f.oem4f + +# To simplify configuro usage in makefiles: +# o create a generic linker command file name +# o set modification times of compiler.opt* files to be greater than +# or equal to the generated config header +# +linker.cmd: package/cfg/rtos_pem4f.xdl + $(SED) 's"^\"\(package/cfg/rtos_pem4fcfg.cmd\)\"$""\"C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/.config/xconfig_rtos/\1\""' package/cfg/rtos_pem4f.xdl > $@ + -$(SETDATE) -r:max package/cfg/rtos_pem4f.h compiler.opt compiler.opt.defs diff --git a/.config/xconfig_rtos/package.bld b/.config/xconfig_rtos/package.bld new file mode 100644 index 0000000..ab09c2a --- /dev/null +++ b/.config/xconfig_rtos/package.bld @@ -0,0 +1,78 @@ +/* THIS IS A GENERATED FILE -- DO NOT EDIT */ + +var targ = xdc.module('ti.targets.arm.elf.M4F'); +/* configuro was told the platform explicitly */ +var platform = 'ti.platforms.tiva:TM4C1294NCPDT'; + +/* decide whether to make an assembly or an executable */ +var makeAssembly = false; + + +var Executable = xdc.module('xdc.bld.Executable'); + +var exeOpts = new Executable.Attrs({ + cfgScript: 'C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/rtos.cfg', + profile: 'release', + cfgHome: 'xconfig_rtos', +}); + +exeOpts.cfgArgs = 'null'; +exeOpts.cfgArgsEncoded = true; + +var exe = Pkg[makeAssembly ? 'addAssembly': 'addExecutable']( + 'rtos', + targ, + platform, + exeOpts +); + +/* + * Generate the compiler.opt file + * Do this here instead of during the initial creation of the configuro + * package, because the contents of any config.bld script are unknown + * at that time. Config.bld can't be executed until the XDC build phase. + */ +if (makeAssembly) { + var suffix = targ.dllExt || '.p' + targ.suffix; +} +else { + var suffix = '.p' + targ.suffix; +} + +var thisObj = { + cfg: 'C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/rtos.cfg', + outputPath: 'C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/.config/xconfig_rtos', + exeName: 'rtos' + suffix, + exeIntName: 'rtos' + suffix.replace('.', '_'), + targ: targ, + linkerCommandFile: 'linker.cmd', + compilerOptFile: 'compiler.opt', + compilerDefsFile: 'compiler.opt' + ".defs", + makeAssembly: makeAssembly +}; +var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/compiler.opt.xdt'); +tmpl.genFile('compiler.opt', thisObj, [], false); + +/* + * Generate the custom makefile. + */ +var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/' + + (makeAssembly? 'custom.mak.asm.xdt' : 'custom.mak.exe.xdt')); +tmpl.genFile('custom.mak', thisObj, [], false); +Pkg.makeEpilogue = "include custom.mak"; + +/* + * Generate the package script. + */ +var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/package.xs.xdt'); +tmpl.genFile('package.xs', thisObj, [], false); + +if (makeAssembly) { +/* + * Generate the linker options into a staging file, so that the presence or + * age of the advertised linker command file can be the makefile trigger to + * rebuild the package from the user's config script. + */ + var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/linker.cmd.asm.xdt'); + tmpl.genFile('linker.cmd.cp', thisObj, [], false); +} diff --git a/.config/xconfig_rtos/package.mak b/.config/xconfig_rtos/package.mak new file mode 100644 index 0000000..81191a3 --- /dev/null +++ b/.config/xconfig_rtos/package.mak @@ -0,0 +1,256 @@ +# +# Do not edit this file. This file is generated from +# package.bld. Any modifications to this file will be +# overwritten whenever makefiles are re-generated. +# + +unexport MAKEFILE_LIST +MK_NOGENDEPS := $(filter clean,$(MAKECMDGOALS)) +override PKGDIR = xconfig_rtos +XDCINCS = -I. -I$(strip $(subst ;, -I,$(subst $(space),\$(space),$(XPKGPATH)))) +XDCCFGDIR = package/cfg/ + +# +# The following dependencies ensure package.mak is rebuilt +# in the event that some included BOM script changes. +# +ifneq (clean,$(MAKECMDGOALS)) +C:/ti/xdctools_3_32_00_06_core/packages/xdc/utils.js: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/utils.js +C:/ti/xdctools_3_32_00_06_core/packages/xdc/xdc.tci: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/xdc.tci +C:/ti/xdctools_3_32_00_06_core/packages/xdc/template.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/template.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/om2.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/om2.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/xmlgen.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/xmlgen.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/xmlgen2.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/xmlgen2.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/Warnings.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/Warnings.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/IPackage.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/IPackage.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/package.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/package.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/global/Clock.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/global/Clock.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/global/Trace.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/global/Trace.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/bld.js: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/bld.js +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/BuildEnvironment.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/BuildEnvironment.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/PackageContents.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/PackageContents.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/_gen.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/_gen.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Library.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Library.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Executable.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Executable.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Repository.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Repository.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Configuration.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Configuration.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Script.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Script.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Manifest.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Manifest.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Utils.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/Utils.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITarget.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITarget.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITarget2.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITarget2.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITarget3.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITarget3.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITargetFilter.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/ITargetFilter.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/package.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/package.xs +package.mak: config.bld +C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/ITarget.xs: +package.mak: C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/ITarget.xs +C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/C28_large.xs: +package.mak: C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/C28_large.xs +C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/C28_float.xs: +package.mak: C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/C28_float.xs +C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/package.xs: +package.mak: C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/package.xs +C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/arm/elf/IArm.xs: +package.mak: C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/arm/elf/IArm.xs +C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/arm/elf/package.xs: +package.mak: C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/arm/elf/package.xs +package.mak: package.bld +C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/compiler.opt.xdt: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/compiler.opt.xdt +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/io/File.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/io/File.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/io/package.xs: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/io/package.xs +C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/compiler.defs.xdt: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/compiler.defs.xdt +C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/custom.mak.exe.xdt: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/custom.mak.exe.xdt +C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/package.xs.xdt: +package.mak: C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/configuro/template/package.xs.xdt +endif + +ti.targets.arm.elf.M4F.rootDir ?= C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS +ti.targets.arm.elf.packageBase ?= C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages/ti/targets/arm/elf/ +.PRECIOUS: $(XDCCFGDIR)/%.oem4f +.PHONY: all,em4f .dlls,em4f .executables,em4f test,em4f +all,em4f: .executables,em4f +.executables,em4f: .libraries,em4f +.executables,em4f: .dlls,em4f +.dlls,em4f: .libraries,em4f +.libraries,em4f: .interfaces + @$(RM) $@ + @$(TOUCH) "$@" + +.help:: + @$(ECHO) xdc test,em4f + @$(ECHO) xdc .executables,em4f + @$(ECHO) xdc .libraries,em4f + @$(ECHO) xdc .dlls,em4f + + +all: .executables +.executables: .libraries .dlls +.libraries: .interfaces + +PKGCFGS := $(wildcard package.xs) package/build.cfg +.interfaces: package/package.xdc.inc package/package.defs.h package.xdc $(PKGCFGS) + +-include package/package.xdc.dep +package/%.xdc.inc package/%_xconfig_rtos.c package/%.defs.h: %.xdc $(PKGCFGS) + @$(MSG) generating interfaces for package xconfig_rtos" (because $@ is older than $(firstword $?))" ... + $(XSRUN) -f xdc/services/intern/cmd/build.xs $(MK_IDLOPTS) -m package/package.xdc.dep -i package/package.xdc.inc package.xdc + +.dlls,em4f .dlls: rtos.pem4f + +-include package/cfg/rtos_pem4f.mak +-include package/cfg/rtos_pem4f.cfg.mak +ifeq (,$(MK_NOGENDEPS)) +-include package/cfg/rtos_pem4f.dep +endif +rtos.pem4f: package/cfg/rtos_pem4f.xdl + @ + + +ifeq (,$(wildcard .libraries,em4f)) +rtos.pem4f package/cfg/rtos_pem4f.c: .libraries,em4f +endif + +package/cfg/rtos_pem4f.c package/cfg/rtos_pem4f.h package/cfg/rtos_pem4f.xdl: override _PROG_NAME := rtos.xem4f +package/cfg/rtos_pem4f.c: package/cfg/rtos_pem4f.cfg +package/cfg/rtos_pem4f.xdc.inc: package/cfg/rtos_pem4f.xdl +package/cfg/rtos_pem4f.xdl package/cfg/rtos_pem4f.c: .interfaces + +clean:: clean,em4f + -$(RM) package/cfg/rtos_pem4f.cfg + -$(RM) package/cfg/rtos_pem4f.dep + -$(RM) package/cfg/rtos_pem4f.c + -$(RM) package/cfg/rtos_pem4f.xdc.inc + +clean,em4f:: + -$(RM) rtos.pem4f +.executables,em4f .executables: rtos.xem4f + +rtos.xem4f: |rtos.pem4f + +-include package/cfg/rtos.xem4f.mak +rtos.xem4f: package/cfg/rtos_pem4f.oem4f + $(RM) $@ + @$(MSG) lnkem4f $@ ... + $(RM) $(XDCCFGDIR)/$@.map + $(ti.targets.arm.elf.M4F.rootDir)/bin/armcl -fs $(XDCCFGDIR)$(dir $@). -q -u _c_int00 --silicon_version=7M4 -z --strict_compatibility=on -o $@ package/cfg/rtos_pem4f.oem4f package/cfg/rtos_pem4f.xdl -w -c -m $(XDCCFGDIR)/$@.map -l $(ti.targets.arm.elf.M4F.rootDir)/lib/libc.a + +rtos.xem4f: export C_DIR= +rtos.xem4f: PATH:=$(ti.targets.arm.elf.M4F.rootDir)/bin/;$(PATH) +rtos.xem4f: Path:=$(ti.targets.arm.elf.M4F.rootDir)/bin/;$(PATH) + +rtos.test test,em4f test: rtos.xem4f.test + +rtos.xem4f.test:: rtos.xem4f +ifeq (,$(_TESTLEVEL)) + @$(MAKE) -R -r --no-print-directory -f $(XDCROOT)/packages/xdc/bld/xdc.mak _TESTLEVEL=1 rtos.xem4f.test +else + @$(MSG) running $< ... + $(call EXEC.rtos.xem4f, ) +endif + +clean,em4f:: + -$(RM) $(wildcard .tmp,rtos.xem4f,*) + + +clean:: clean,em4f + +clean,em4f:: + -$(RM) rtos.xem4f +%,copy: + @$(if $<,,$(MSG) don\'t know how to build $*; exit 1) + @$(MSG) cp $< $@ + $(RM) $@ + $(CP) $< $@ +rtos_pem4f.oem4f,copy : package/cfg/rtos_pem4f.oem4f +rtos_pem4f.sem4f,copy : package/cfg/rtos_pem4f.sem4f + +$(XDCCFGDIR)%.c $(XDCCFGDIR)%.h $(XDCCFGDIR)%.xdl: $(XDCCFGDIR)%.cfg $(XDCROOT)/packages/xdc/cfg/Main.xs | .interfaces + @$(MSG) "configuring $(_PROG_NAME) from $< ..." + $(CONFIG) $(_PROG_XSOPTS) xdc.cfg $(_PROG_NAME) $(XDCCFGDIR)$*.cfg $(XDCCFGDIR)$* + +.PHONY: release,xconfig_rtos +ifeq (,$(MK_NOGENDEPS)) +-include package/rel/xconfig_rtos.tar.dep +endif +package/rel/xconfig_rtos/xconfig_rtos/package/package.rel.xml: package/package.bld.xml +package/rel/xconfig_rtos/xconfig_rtos/package/package.rel.xml: package/build.cfg +package/rel/xconfig_rtos/xconfig_rtos/package/package.rel.xml: package/package.xdc.inc +package/rel/xconfig_rtos/xconfig_rtos/package/package.rel.xml: .force + @$(MSG) generating external release references $@ ... + $(XS) $(JSENV) -f $(XDCROOT)/packages/xdc/bld/rel.js $(MK_RELOPTS) . $@ + +xconfig_rtos.tar: package/rel/xconfig_rtos.xdc.inc package/rel/xconfig_rtos/xconfig_rtos/package/package.rel.xml + @$(MSG) making release file $@ "(because of $(firstword $?))" ... + -$(RM) $@ + $(call MKRELTAR,package/rel/xconfig_rtos.xdc.inc,package/rel/xconfig_rtos.tar.dep) + + +release release,xconfig_rtos: all xconfig_rtos.tar +clean:: .clean + -$(RM) xconfig_rtos.tar + -$(RM) package/rel/xconfig_rtos.xdc.inc + -$(RM) package/rel/xconfig_rtos.tar.dep + +clean:: .clean + -$(RM) .libraries $(wildcard .libraries,*) +clean:: + -$(RM) .dlls $(wildcard .dlls,*) +# +# The following clean rule removes user specified +# generated files or directories. +# + +ifneq (clean,$(MAKECMDGOALS)) +ifeq (,$(wildcard package)) + $(shell $(MKDIR) package) +endif +ifeq (,$(wildcard package/cfg)) + $(shell $(MKDIR) package/cfg) +endif +ifeq (,$(wildcard package/lib)) + $(shell $(MKDIR) package/lib) +endif +ifeq (,$(wildcard package/rel)) + $(shell $(MKDIR) package/rel) +endif +ifeq (,$(wildcard package/internal)) + $(shell $(MKDIR) package/internal) +endif +endif +clean:: + -$(RMDIR) package + +include custom.mak diff --git a/.config/xconfig_rtos/package.xdc b/.config/xconfig_rtos/package.xdc new file mode 100644 index 0000000..b718517 --- /dev/null +++ b/.config/xconfig_rtos/package.xdc @@ -0,0 +1,7 @@ +/*! + * Package generated by xdc.tools.configuro + * + * @_nodoc + */ +package xconfig_rtos { +} diff --git a/.config/xconfig_rtos/package.xs b/.config/xconfig_rtos/package.xs new file mode 100644 index 0000000..373d44f --- /dev/null +++ b/.config/xconfig_rtos/package.xs @@ -0,0 +1,20 @@ +/* THIS IS A GENERATED FILE -- DO NOT EDIT */ + +/* return the names of the generated config objects */ +function getLibs(prog) { + /* for programs, push the generated config object file into the + * generated linker command file. + */ + /* replace the last period in the name by an underscore */ + var name = "package/cfg/" + prog.name.replace(/\.([^.]*)$/, "_$1"); + /* base is a hack until we add cfgName to Program */ + var base = "package/cfg/" + prog.name.replace(/\.([^.]*)$/, ""); + var suffix = prog.build.target.suffix; + + var libs = [ +// name + '.o' + suffix, + base + '_p' + suffix + '.o' + suffix + ]; + + return libs.join(';'); +} diff --git a/.config/xconfig_rtos/package/.vers_b160 b/.config/xconfig_rtos/package/.vers_b160 new file mode 100644 index 0000000..e69de29 diff --git a/.config/xconfig_rtos/package/.vers_g180 b/.config/xconfig_rtos/package/.vers_g180 new file mode 100644 index 0000000..e69de29 diff --git a/.config/xconfig_rtos/package/.vers_r170 b/.config/xconfig_rtos/package/.vers_r170 new file mode 100644 index 0000000..e69de29 diff --git a/.config/xconfig_rtos/package/.xdc-B06 b/.config/xconfig_rtos/package/.xdc-B06 new file mode 100644 index 0000000..e69de29 diff --git a/.config/xconfig_rtos/package/build.cfg b/.config/xconfig_rtos/package/build.cfg new file mode 100644 index 0000000..5ec1eb1 --- /dev/null +++ b/.config/xconfig_rtos/package/build.cfg @@ -0,0 +1,9 @@ +if (pkg.$vers.length >= 3) { + pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..')); +} + +pkg.build.libraries = [ +]; + +pkg.build.libDesc = [ +]; diff --git a/.config/xconfig_rtos/package/cfg/rtos.xem4f.mak b/.config/xconfig_rtos/package/cfg/rtos.xem4f.mak new file mode 100644 index 0000000..88cc070 --- /dev/null +++ b/.config/xconfig_rtos/package/cfg/rtos.xem4f.mak @@ -0,0 +1,11 @@ +# +# Do not edit this file. This file is generated from +# package.bld. Any modifications to this file will be +# overwritten whenever makefiles are re-generated. +# +# target compatibility key = ti.targets.arm.elf.M4F{1,0,18.12,5 +# +rtos.xem4f: package/cfg/rtos.xem4f.mak + +clean:: + -$(RM) package/cfg/rtos.xem4f.mak diff --git a/.config/xconfig_rtos/package/cfg/rtos_pem4f.cfg b/.config/xconfig_rtos/package/cfg/rtos_pem4f.cfg new file mode 100644 index 0000000..ed201c0 --- /dev/null +++ b/.config/xconfig_rtos/package/cfg/rtos_pem4f.cfg @@ -0,0 +1,268 @@ +/* + * ======== package/cfg/rtos_pem4f.cfg ======== + * This generated configuration script runs the user's configuration script + * the context of a specific target and platform in order to generate + * all the files necessary to create an executable; e.g., linker command + * files, static C/C++ data structures, etc. + */ + +/* + * ======== _applyChanges ======== + * Changes that bring the build target to the state at the end of the build + * model + */ +function _applyChanges(obj, chgObj) { + var wasSealed = false; + if (obj.$sealed) { + wasSealed = true; + obj.$unseal(); + } + for (var prop in chgObj) { + if (typeof obj[prop] == 'object' && obj[prop] != undefined) { + if ("$category" in obj[prop] && obj[prop].$category == "Vector") { + obj[prop].length = chgObj[prop].length; + for (var i = 0; i < chgObj[prop].length; i++) { + if (obj[prop].length < i + 1) { + obj[prop].length++; + } + obj[prop][i] = chgObj[prop][i]; + } + } + else { + _applyChanges(obj[prop], chgObj[prop]); + } + } + else { + obj[prop] = chgObj[prop]; + } + } + if (wasSealed) { + obj.$seal(); + } +} + +/* + * ======== _runescape ======== + * Recursive unescape to decode serialized strings + */ +function _runescape(obj) { + for (var i in obj) { + if (obj[i] != null) { + if (typeof obj[i] == 'string') { + obj[i] = unescape(obj[i]); + } + else if (typeof obj[i] == 'object') { + _runescape(obj[i]); + } + } + } +} + +/* + * ======== _getPlatCfg ======== + */ +function _getPlatCfg() { + var tmp = {}; + _runescape(tmp); + return (tmp); +} +/* + * ======== _cfginit ======== + */ +function _cfginit() { + xdc.loadPackage('xdc.services.intern.cmd'); + var prog = xdc.om['xdc.cfg.Program']; + + /* initialize prog attrs from build model */ + var build = { + profile: "release", + cfgScript: "C%3A/Users/gene/OneDrive%20-%20Worcester%20Polytechnic%20Institute%20%28wpi.edu%29/ECE3849/workspace_v9/ece3849_lab2_starter/rtos.cfg", + cfgHome: "xconfig_rtos", + cfgArgs: "null", + cfgArgsEncoded: true, + releases: { + 0: { + name: "xconfig_rtos", + attrs: { + prefix: "", + label: "default" + }, + otherFiles: {}, + excludeDirs: {} + } + }, + prelink: false + }; + _runescape(build); + build.cfgArgs = null; + build.target = xdc.module("ti.targets.arm.elf.M4F"); + var targChange = { + platforms: [ + "ti.platforms.tiva%3ATM4C1294NCPDT%3A1" + ], + version: "ti.targets.arm.elf.M4F%7B1%2C0%2C18.12%2C5", + extensions: { + ".sem4fe": { + suf: ".sem4fe", + typ: "asm" + }, + ".sem4f": { + suf: ".sem4f", + typ: "asm" + }, + ".sv7M4": { + suf: ".sv7M4", + typ: "asm" + }, + ".sv7M": { + suf: ".sv7M", + typ: "asm" + } + }, + rootDir: "C%3A/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS", + ccOpts: { + prefix: "-mv7M4%20--code_state%3D16%20--float_support%3DFPv4SPD16%20-me%20-O1%20--opt_for_speed%3D2%20--include_path%3D%22C%3A/Users/gene/OneDrive%20-%20Worcester%20Polytechnic%20Institute%20%28wpi.edu%29/ECE3849/workspace_v9/ece3849_lab2_starter%22%20--include_path%3D%22C%3A/Users/gene/OneDrive%20-%20Worcester%20Polytechnic%20Institute%20%28wpi.edu%29/ECE3849/workspace_v9/ece3849_lab2_starter%22%20--include_path%3D%22C%3A/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b%22%20--include_path%3D%22C%3A/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_01_29/packages/ti/sysbios/posix%22%20--include_path%3D%22C%3A/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include%22%20--define%3Dccs%3D%22ccs%22%20--define%3DPART_TM4C1294NCPDT%20--define%3Dccs%20--define%3DTIVAWARE%20-g%20--gcc%20--diag_warning%3D225%20--diag_warning%3D255%20--diag_wrap%3Doff%20--display_error_number%20--gen_func_subsections%3Don%20--abi%3Deabi%20%20%20-qq%20-pdsw225" + }, + rawVersion: "18.12.5" + }; + _runescape(targChange); + _applyChanges(build.target, targChange); + + prog.build = build; + + prog.name = "rtos.xem4f"; + prog.cfgBase = "package/cfg/rtos_pem4f"; + + prog.endian = prog.build.target.model.endian; + prog.codeModel = prog.build.target.model.codeModel; + + /* use the platform package's Platform module */ + var Platform = xdc.useModule("ti.platforms.tiva.Platform"); + var platParams = _getPlatCfg(); + var invalidParams = []; + for (var prop in platParams) { + if (!(prop in Platform.PARAMS)) { + delete platParams[prop]; + invalidParams.push(prop); + } + } + prog.platformName = "ti.platforms.tiva:TM4C1294NCPDT"; + prog.platform = Platform.create("TM4C1294NCPDT", platParams); + for (var i = 0; i < invalidParams.length; i++) { + Platform.$logWarning("The parameter '" + invalidParams[i] + "' is " + + "passed to this platform instance through Build.platformTable, " + + "but the instance does not have a configuration parameter with " + + "that name.", prog.platform, "TM4C1294NCPDT"); + } + + /* record the executable's package name */ + prog.buildPackage = "xconfig_rtos"; + + /* record build-model information required during config generation */ + prog.$$bind("$$isasm", 0); + prog.$$bind("$$isrom", 0); + prog.$$bind("$$gentab", [ + ]); + + /* bind prog to an appropriate execution context */ + prog.cpu = prog.platform.getExeContext(prog); + + /* import the target's run-time support pkg */ + xdc.loadPackage("ti.targets.arm.rtsarm"); +} + +/* function to import the cfg script's package */ +function _userscript(script) { + var home; + var spath; + home = xdc.loadPackage("xconfig_rtos"); + + xdc.om.$$bind('$homepkg', home); + + var cfgScript = "C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter/rtos.cfg"; + if (!script) { + utils.loadCapsule(cfgScript, false, spath); + } + else { + /* set up the same environment that loadCapsule would */ + var $saveCsd = utils.csd; + var $cfgFile = utils.findFile(cfgScript, spath); + var cname = cfgScript; + if ($cfgFile) { + $cfgFile = java.io.File($cfgFile); + utils.csd = $cfgFile.getParentFile().getCanonicalPath(); + cname = "" + $cfgFile.getCanonicalPath(); + } + + /* create the capsule object */ + var cap = { + prototype: utils.global, + $path: cname, + $private: {path: cname}, + $capsule: undefined, /* set to cap below */ + }; + + /* 'this.$capsule' is always cap object */ + cap.$capsule = cap; + + /* save the capsule object */ + utils.$$capmap[cname] = cap; + + try { + var cx = + Packages.org.mozilla.javascript.Context.getCurrentContext(); + var rdr = new + java.io.BufferedReader(new java.io.StringReader(script)); + Packages.config.Shell.evaluateLoad(cx, cap, rdr, cname, 1); + } + finally { + rdr.close(); + utils.csd = $saveCsd; + } + } +} + +function _postinit() { + var cout = null; + + var Program = xdc.om['xdc.cfg.Program']; + /* get the exec command for this executable */ + if (Program.execCmd == null) { + Program.execCmd = Program.platform.getExecCmd(Program, + xdc.om["ti.platforms.tiva"].packageBase); + } + cout = "define EXEC." + Program.name + '\n\n'; + cout += Program.execCmd; + cout += "\nendef\n\n"; + + /* if SourceDir generates a makefile, we need to run it */ + _genSourceDirMak("package/cfg/rtos_pem4f", "rtos.pem4f"); + + utils.genDep("package/cfg/rtos_pem4f", "xconfig_rtos", utils.loadedFiles, cout, null); +} + +function _genSourceDirMak(cfgBase, cfgName) +{ + var SourceDir = xdc.om['xdc.cfg.SourceDir']; + + if (SourceDir && SourceDir.$instances.length > 0) { + /* construct rule to run SourceDir generated makefile */ + var make = "\t$(MAKE) -f " + + SourceDir.outputDir + "/" + SourceDir.makefileName; + + /* this file is included by package.mak (if it exists) */ + var file = new java.io.File(cfgBase + ".cfg.mak"); + file["delete"](); + var out = new java.io.BufferedWriter(new java.io.FileWriter(file)); + + /* add rules to run SourceDir generated makefile */ + out.write("# invoke SourceDir generated makefile for " + cfgName + + "\n" + cfgName + ": .libraries," + cfgName + + "\n.libraries," + cfgName + ": " + cfgBase + ".xdl\n" + + make + "\n\n" + + "clean::\n" + make + " clean\n\n" + ); + out.close(); + out = null; + } +} diff --git a/.config/xconfig_rtos/package/cfg/rtos_pem4f.mak b/.config/xconfig_rtos/package/cfg/rtos_pem4f.mak new file mode 100644 index 0000000..a43d4d7 --- /dev/null +++ b/.config/xconfig_rtos/package/cfg/rtos_pem4f.mak @@ -0,0 +1,46 @@ +# +# Do not edit this file. This file is generated from +# package.bld. Any modifications to this file will be +# overwritten whenever makefiles are re-generated. +# +# target compatibility key = ti.targets.arm.elf.M4F{1,0,18.12,5 +# +ifeq (,$(MK_NOGENDEPS)) +-include package/cfg/rtos_pem4f.oem4f.dep +package/cfg/rtos_pem4f.oem4f.dep: ; +endif + +package/cfg/rtos_pem4f.oem4f: | .interfaces +package/cfg/rtos_pem4f.oem4f: package/cfg/rtos_pem4f.c package/cfg/rtos_pem4f.mak + @$(RM) $@.dep + $(RM) $@ + @$(MSG) clem4f $< ... + $(ti.targets.arm.elf.M4F.rootDir)/bin/armcl -c -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O1 --opt_for_speed=2 --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 -ms --fp_mode=strict --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -eo.oem4f -ea.sem4f -Dxdc_cfg__xheader__='"xconfig_rtos/package/cfg/rtos_pem4f.h"' -Dxdc_target_name__=M4F -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_12_5 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M4F.rootDir)/include/rts -I$(ti.targets.arm.elf.M4F.rootDir)/include -fs=./package/cfg -fr=./package/cfg -fc $< + $(MKDEP) -a $@.dep -p package/cfg -s oem4f $< -C -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O1 --opt_for_speed=2 --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 -ms --fp_mode=strict --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -eo.oem4f -ea.sem4f -Dxdc_cfg__xheader__='"xconfig_rtos/package/cfg/rtos_pem4f.h"' -Dxdc_target_name__=M4F -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_12_5 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M4F.rootDir)/include/rts -I$(ti.targets.arm.elf.M4F.rootDir)/include -fs=./package/cfg -fr=./package/cfg + -@$(FIXDEP) $@.dep $@.dep + +package/cfg/rtos_pem4f.oem4f: export C_DIR= +package/cfg/rtos_pem4f.oem4f: PATH:=$(ti.targets.arm.elf.M4F.rootDir)/bin/;$(PATH) +package/cfg/rtos_pem4f.oem4f: Path:=$(ti.targets.arm.elf.M4F.rootDir)/bin/;$(PATH) + +package/cfg/rtos_pem4f.sem4f: | .interfaces +package/cfg/rtos_pem4f.sem4f: package/cfg/rtos_pem4f.c package/cfg/rtos_pem4f.mak + @$(RM) $@.dep + $(RM) $@ + @$(MSG) clem4f -n $< ... + $(ti.targets.arm.elf.M4F.rootDir)/bin/armcl -c -n -s --symdebug:none -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O1 --opt_for_speed=2 --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -eo.oem4f -ea.sem4f -Dxdc_cfg__xheader__='"xconfig_rtos/package/cfg/rtos_pem4f.h"' -Dxdc_target_name__=M4F -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_12_5 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M4F.rootDir)/include/rts -I$(ti.targets.arm.elf.M4F.rootDir)/include -fs=./package/cfg -fr=./package/cfg -fc $< + $(MKDEP) -a $@.dep -p package/cfg -s oem4f $< -C -n -s --symdebug:none -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O1 --opt_for_speed=2 --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/Users/gene/OneDrive - Worcester Polytechnic Institute (wpi.edu)/ECE3849/workspace_v9/ece3849_lab2_starter" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -eo.oem4f -ea.sem4f -Dxdc_cfg__xheader__='"xconfig_rtos/package/cfg/rtos_pem4f.h"' -Dxdc_target_name__=M4F -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_12_5 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M4F.rootDir)/include/rts -I$(ti.targets.arm.elf.M4F.rootDir)/include -fs=./package/cfg -fr=./package/cfg + -@$(FIXDEP) $@.dep $@.dep + +package/cfg/rtos_pem4f.sem4f: export C_DIR= +package/cfg/rtos_pem4f.sem4f: PATH:=$(ti.targets.arm.elf.M4F.rootDir)/bin/;$(PATH) +package/cfg/rtos_pem4f.sem4f: Path:=$(ti.targets.arm.elf.M4F.rootDir)/bin/;$(PATH) + +clean,em4f :: + -$(RM) package/cfg/rtos_pem4f.oem4f + -$(RM) package/cfg/rtos_pem4f.sem4f + +rtos.pem4f: package/cfg/rtos_pem4f.oem4f package/cfg/rtos_pem4f.mak + +clean:: + -$(RM) package/cfg/rtos_pem4f.mak diff --git a/.config/xconfig_rtos/package/package.bld.xml b/.config/xconfig_rtos/package/package.bld.xml new file mode 100644 index 0000000..914fdb8 --- /dev/null +++ b/.config/xconfig_rtos/package/package.bld.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/xconfig_rtos/package/package.defs.h b/.config/xconfig_rtos/package/package.defs.h new file mode 100644 index 0000000..b0b1cea --- /dev/null +++ b/.config/xconfig_rtos/package/package.defs.h @@ -0,0 +1,13 @@ +/* + * Do not modify this file; it is automatically + * generated and any modifications will be overwritten. + * + * @(#) xdc-B06 + */ + +#ifndef xconfig_rtos__ +#define xconfig_rtos__ + + + +#endif /* xconfig_rtos__ */ diff --git a/.config/xconfig_rtos/package/package.xdc.dep b/.config/xconfig_rtos/package/package.xdc.dep new file mode 100644 index 0000000..6788ac9 --- /dev/null +++ b/.config/xconfig_rtos/package/package.xdc.dep @@ -0,0 +1,53 @@ +clean:: + $(RM) package/xconfig_rtos.sch + $(RM) package/.vers_g180 + $(RM) package/.vers_r170 + $(RM) package/.vers_b160 + $(RM) package/.xdc-B06 + $(RM) package/xconfig_rtos.java + $(RM) package/xconfig_rtos.class + $(RM) package/package_xconfig_rtos.c + $(RM) package/package.defs.h + $(RM) package/xconfig_rtos.ccs + +.interfaces: package/xconfig_rtos.sch package/.vers_g180 package/.vers_r170 package/.vers_b160 package/.xdc-B06 package/xconfig_rtos.java package/package_xconfig_rtos.c package/package.defs.h package/xconfig_rtos.ccs +package/package.xdc.inc: package/.vers_g180 +package/.vers_g180: +package/package.xdc.inc: package/.vers_r170 +package/.vers_r170: +package/package.xdc.inc: package/.vers_b160 +package/.vers_b160: + +.interfaces: + +# schema include file dependencies +package.xs: +package/package.xdc.inc: package.xs + +# schema update dependencies +package/package.xdc.inc: xdc/IPackage.xdc +xdc/IPackage.xdc: +vpath xdc/IPackage.xdc $(XPKGVPATH) + +ifneq (clean,$(MAKECMDGOALS)) +C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/ecj.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/ecj.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/intern/gen/java/package.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/intern/gen/java/package.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/intern/cmd/java/package.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/intern/cmd/java/package.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/js.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/js.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/global/java/package.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/global/java/package.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/antlr.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/antlr.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/intern/xsr/java/package.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/intern/xsr/java/package.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/tar.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/shelf/java/tar.jar +C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/spec/java/package.jar: +package/package.xdc.inc: C:/ti/xdctools_3_32_00_06_core/packages/xdc/services/spec/java/package.jar +endif +# goals for files generated during schema generation but unspecified by schema's pattern rule + diff --git a/.config/xconfig_rtos/package/package.xdc.inc b/.config/xconfig_rtos/package/package.xdc.inc new file mode 100644 index 0000000..4099cce --- /dev/null +++ b/.config/xconfig_rtos/package/package.xdc.inc @@ -0,0 +1,12 @@ +package.xdc +package.xs +package/xconfig_rtos.sch +package/.vers_g180 +package/.vers_r170 +package/.vers_b160 +package/.xdc-B06 +package/xconfig_rtos.java +package/xconfig_rtos.class +package/package_xconfig_rtos.c +package/package.defs.h +package/xconfig_rtos.ccs diff --git a/.config/xconfig_rtos/package/package_xconfig_rtos.c b/.config/xconfig_rtos/package/package_xconfig_rtos.c new file mode 100644 index 0000000..d866343 --- /dev/null +++ b/.config/xconfig_rtos/package/package_xconfig_rtos.c @@ -0,0 +1,21 @@ +/* + * Do not modify this file; it is automatically + * generated and any modifications will be overwritten. + * + * @(#) xdc-B06 + */ + +#include + +__FAR__ char xconfig_rtos__dummy__; + +#define __xdc_PKGVERS null +#define __xdc_PKGNAME xconfig_rtos +#define __xdc_PKGPREFIX xconfig_rtos_ + +#ifdef __xdc_bld_pkg_c__ +#define __stringify(a) #a +#define __local_include(a) __stringify(a) +#include __local_include(__xdc_bld_pkg_c__) +#endif + diff --git a/.config/xconfig_rtos/package/rel/xconfig_rtos.xdc.inc b/.config/xconfig_rtos/package/rel/xconfig_rtos.xdc.inc new file mode 100644 index 0000000..0f839ef --- /dev/null +++ b/.config/xconfig_rtos/package/rel/xconfig_rtos.xdc.inc @@ -0,0 +1,3 @@ +package/package.bld.xml +package/build.cfg +package/package.xdc.inc diff --git a/.config/xconfig_rtos/package/rel/xconfig_rtos.xdc.ninc b/.config/xconfig_rtos/package/rel/xconfig_rtos.xdc.ninc new file mode 100644 index 0000000..e69de29 diff --git a/.config/xconfig_rtos/package/xconfig_rtos.ccs b/.config/xconfig_rtos/package/xconfig_rtos.ccs new file mode 100644 index 0000000..bb61e60 Binary files /dev/null and b/.config/xconfig_rtos/package/xconfig_rtos.ccs differ diff --git a/.config/xconfig_rtos/package/xconfig_rtos.class b/.config/xconfig_rtos/package/xconfig_rtos.class new file mode 100644 index 0000000..eea37c8 Binary files /dev/null and b/.config/xconfig_rtos/package/xconfig_rtos.class differ diff --git a/.config/xconfig_rtos/package/xconfig_rtos.java b/.config/xconfig_rtos/package/xconfig_rtos.java new file mode 100644 index 0000000..a1730fc --- /dev/null +++ b/.config/xconfig_rtos/package/xconfig_rtos.java @@ -0,0 +1,143 @@ +/* + * Do not modify this file; it is automatically + * generated and any modifications will be overwritten. + * + * @(#) xdc-B06 + */ +import java.util.*; +import org.mozilla.javascript.*; +import xdc.services.intern.xsr.*; +import xdc.services.spec.Session; + +public class xconfig_rtos +{ + static final String VERS = "@(#) xdc-B06\n"; + + static final Proto.Elm $$T_Bool = Proto.Elm.newBool(); + static final Proto.Elm $$T_Num = Proto.Elm.newNum(); + static final Proto.Elm $$T_Str = Proto.Elm.newStr(); + static final Proto.Elm $$T_Obj = Proto.Elm.newObj(); + + static final Proto.Fxn $$T_Met = new Proto.Fxn(null, null, 0, -1, false); + static final Proto.Map $$T_Map = new Proto.Map($$T_Obj); + static final Proto.Arr $$T_Vec = new Proto.Arr($$T_Obj); + + static final XScriptO $$DEFAULT = Value.DEFAULT; + static final Object $$UNDEF = Undefined.instance; + + static final Proto.Obj $$Package = (Proto.Obj)Global.get("$$Package"); + static final Proto.Obj $$Module = (Proto.Obj)Global.get("$$Module"); + static final Proto.Obj $$Instance = (Proto.Obj)Global.get("$$Instance"); + static final Proto.Obj $$Params = (Proto.Obj)Global.get("$$Params"); + + static final Object $$objFldGet = Global.get("$$objFldGet"); + static final Object $$objFldSet = Global.get("$$objFldSet"); + static final Object $$proxyGet = Global.get("$$proxyGet"); + static final Object $$proxySet = Global.get("$$proxySet"); + static final Object $$delegGet = Global.get("$$delegGet"); + static final Object $$delegSet = Global.get("$$delegSet"); + + Scriptable xdcO; + Session ses; + Value.Obj om; + + boolean isROV; + boolean isCFG; + + Proto.Obj pkgP; + Value.Obj pkgV; + + ArrayList imports = new ArrayList(); + ArrayList loggables = new ArrayList(); + ArrayList mcfgs = new ArrayList(); + ArrayList icfgs = new ArrayList(); + ArrayList inherits = new ArrayList(); + ArrayList proxies = new ArrayList(); + ArrayList sizes = new ArrayList(); + ArrayList tdefs = new ArrayList(); + + void $$IMPORTS() + { + Global.callFxn("loadPackage", xdcO, "xdc"); + Global.callFxn("loadPackage", xdcO, "xdc.corevers"); + } + + void $$OBJECTS() + { + pkgP = (Proto.Obj)om.bind("xconfig_rtos.Package", new Proto.Obj()); + pkgV = (Value.Obj)om.bind("xconfig_rtos", new Value.Obj("xconfig_rtos", pkgP)); + } + + void $$SINGLETONS() + { + pkgP.init("xconfig_rtos.Package", (Proto.Obj)om.findStrict("xdc.IPackage.Module", "xconfig_rtos")); + Scriptable cap = (Scriptable)Global.callFxn("loadCapsule", xdcO, "xconfig_rtos/package.xs"); + om.bind("xdc.IPackage$$capsule", cap); + Object fxn; + fxn = Global.get(cap, "init"); + if (fxn != null) pkgP.addFxn("init", (Proto.Fxn)om.findStrict("xdc.IPackage$$init", "xconfig_rtos"), fxn); + fxn = Global.get(cap, "close"); + if (fxn != null) pkgP.addFxn("close", (Proto.Fxn)om.findStrict("xdc.IPackage$$close", "xconfig_rtos"), fxn); + fxn = Global.get(cap, "validate"); + if (fxn != null) pkgP.addFxn("validate", (Proto.Fxn)om.findStrict("xdc.IPackage$$validate", "xconfig_rtos"), fxn); + fxn = Global.get(cap, "exit"); + if (fxn != null) pkgP.addFxn("exit", (Proto.Fxn)om.findStrict("xdc.IPackage$$exit", "xconfig_rtos"), fxn); + fxn = Global.get(cap, "getLibs"); + if (fxn != null) pkgP.addFxn("getLibs", (Proto.Fxn)om.findStrict("xdc.IPackage$$getLibs", "xconfig_rtos"), fxn); + fxn = Global.get(cap, "getSects"); + if (fxn != null) pkgP.addFxn("getSects", (Proto.Fxn)om.findStrict("xdc.IPackage$$getSects", "xconfig_rtos"), fxn); + pkgP.bind("$capsule", cap); + pkgV.init2(pkgP, "xconfig_rtos", Value.DEFAULT, false); + pkgV.bind("$name", "xconfig_rtos"); + pkgV.bind("$category", "Package"); + pkgV.bind("$$qn", "xconfig_rtos."); + pkgV.bind("$vers", Global.newArray()); + Value.Map atmap = (Value.Map)pkgV.getv("$attr"); + atmap.seal("length"); + imports.clear(); + pkgV.bind("$imports", imports); + StringBuilder sb = new StringBuilder(); + sb.append("var pkg = xdc.om['xconfig_rtos'];\n"); + sb.append("if (pkg.$vers.length >= 3) {\n"); + sb.append("pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));\n"); + sb.append("}\n"); + sb.append("if ('xconfig_rtos$$stat$base' in xdc.om) {\n"); + sb.append("pkg.packageBase = xdc.om['xconfig_rtos$$stat$base'];\n"); + sb.append("pkg.packageRepository = xdc.om['xconfig_rtos$$stat$root'];\n"); + sb.append("}\n"); + sb.append("pkg.build.libraries = [\n"); + sb.append("];\n"); + sb.append("pkg.build.libDesc = [\n"); + sb.append("];\n"); + Global.eval(sb.toString()); + } + + void $$INITIALIZATION() + { + Value.Obj vo; + + if (isCFG) { + }//isCFG + Global.callFxn("init", pkgV); + ((Value.Arr)om.findStrict("$packages", "xconfig_rtos")).add(pkgV); + } + + public void exec( Scriptable xdcO, Session ses ) + { + this.xdcO = xdcO; + this.ses = ses; + om = (Value.Obj)xdcO.get("om", null); + + Object o = om.geto("$name"); + String s = o instanceof String ? (String)o : null; + isCFG = s != null && s.equals("cfg"); + isROV = s != null && s.equals("rov"); + + $$IMPORTS(); + $$OBJECTS(); + if (isROV) { + }//isROV + $$SINGLETONS(); + $$INITIALIZATION(); + } +} diff --git a/.config/xconfig_rtos/package/xconfig_rtos.sch b/.config/xconfig_rtos/package/xconfig_rtos.sch new file mode 100644 index 0000000..e69de29 diff --git a/.cproject b/.cproject index a3499af..441af30 100644 --- a/.cproject +++ b/.cproject @@ -1,205 +1,249 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.launches/ece3849_lab0_starter.launch b/.launches/ece3849_lab0_starter.launch deleted file mode 100644 index f08e02d..0000000 --- a/.launches/ece3849_lab0_starter.launch +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/.project b/.project index 545c344..d4367e3 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - ece3849_lab0_starter + ece3849_lab3_starter @@ -18,16 +18,11 @@ + org.eclipse.rtsc.xdctools.buildDefinitions.XDC.xdcNature com.ti.ccstudio.core.ccsNature org.eclipse.cdt.core.cnature org.eclipse.cdt.managedbuilder.core.managedBuildNature org.eclipse.cdt.core.ccnature org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - SW_ROOT - $%7BCOM_TI_RTSC_TIRTOSTIVAC__TIVAWARE_C_SERIES%7D - - diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7c051cc..0000000 --- a/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,6 +0,0 @@ -eclipse.preferences.version=1 -encoding//Debug/makefile=UTF-8 -encoding//Debug/objects.mk=UTF-8 -encoding//Debug/sources.mk=UTF-8 -encoding//Debug/subdir_rules.mk=UTF-8 -encoding//Debug/subdir_vars.mk=UTF-8 diff --git a/.xdchelp b/.xdchelp new file mode 100644 index 0000000..e69de29 diff --git a/EK_TM4C1294XL.cmd b/EK_TM4C1294XL.cmd new file mode 100644 index 0000000..d63c067 --- /dev/null +++ b/EK_TM4C1294XL.cmd @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2016, Texas Instruments Incorporated + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * ======== EK_TM4C1294XL.cmd ======== + * Define the memory block start/length for the EK_TM4C1294XL M4 + */ + +MEMORY +{ + FLASH (RX) : origin = 0x00000000, length = 0x00100000 + SRAM (RWX) : origin = 0x20000000, length = 0x00040000 +} + +/* Section allocation in memory */ + +SECTIONS +{ + .text : > FLASH + .const : > FLASH + .cinit : > FLASH + .pinit : > FLASH + .init_array : > FLASH + + .data : > SRAM + .bss : > SRAM + .sysmem : > SRAM + .stack : > SRAM +} diff --git a/main.c b/main.c index 6e2eb27..9360803 100644 --- a/main.c +++ b/main.c @@ -1,319 +1,217 @@ -/** - * main.c - * - * ECE 3849 Lab 0 Starter Project - * Gene Bogdanov 10/18/2017 - * - * This version is using the new hardware for B2017: the EK-TM4C1294XL LaunchPad with BOOSTXL-EDUMKII BoosterPack. - * - */ - -#include -#include -#include "driverlib/fpu.h" -#include "driverlib/sysctl.h" -#include "driverlib/interrupt.h" -#include "driverlib/timer.h" -#include "Crystalfontz128x128_ST7735.h" -#include -#include "grlib/grlib.h" -#include -#include -#include "inc/hw_memmap.h" -#include "driverlib/gpio.h" -#include "driverlib/pwm.h" -#include "driverlib/pin_map.h" -#include "sampling.h" -#include "buttons.h" -#define PWM_FREQUENCY 20000 // PWM frequency = 20 kHz - -uint32_t gSystemClock; // [Hz] system clock frequency -volatile uint32_t gTime = 0; // time in hundredths of a second -volatile uint8_t refresh = 1; - -// assumming square lcd -#define HEIGHT LCD_VERTICAL_MAX -#define WIDTH LCD_HORIZONTAL_MAX -#define PIXELS_PER_DIV 20 - -#define VIN_RANGE 3.3 // volts -#define ADC_BITS 12 -#define ADC_OFFSET 30 - -#define VOLTAGE_SCALES 5 -const char * const gVoltageScaleStr[VOLTAGE_SCALES] = { -"100 mV", "200 mV", "500 mV", " 1 V", " 2 V" -}; - -const float gVoltageScale[VOLTAGE_SCALES] = { - 0.1, 0.2, 0.5, 1., 2. -}; - -#define TIME_SCALES 6 -const char * const gTimeScaleStr[TIME_SCALES] = { -"100 ms", "50 ms", "20 ms", " 10 ms", "50 us", "20 us" -}; - -const uint64_t gTImeScale[TIME_SCALES] = { - 100 * 1000 / PIXELS_PER_DIV, - 50 * 1000 / PIXELS_PER_DIV, - 20 * 1000 / PIXELS_PER_DIV, - 10 * 1000 / PIXELS_PER_DIV, - 50 / PIXELS_PER_DIV, - 20 / PIXELS_PER_DIV, -}; - -uint32_t cputime_unloaded; - -int Trigger(bool rising); - -// start a pwm test signal -void start_signal() { - // configure M0PWM2, at GPIO PF2, BoosterPack 1 header C1 pin 2 - SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); - GPIOPinTypePWM(GPIO_PORTF_BASE, GPIO_PIN_2); - GPIOPinConfigure(GPIO_PF2_M0PWM2); - GPIOPadConfigSet(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_STRENGTH_2MA, - GPIO_PIN_TYPE_STD); - // configure the PWM0 peripheral, gen 1, outputs 2 and 3 - SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0); - // use system clock without division - PWMClockSet(PWM0_BASE, PWM_SYSCLK_DIV_1); - PWMGenConfigure(PWM0_BASE, PWM_GEN_1, - PWM_GEN_MODE_DOWN | PWM_GEN_MODE_NO_SYNC); - PWMGenPeriodSet(PWM0_BASE, PWM_GEN_1, - roundf((float)gSystemClock / PWM_FREQUENCY)); - PWMPulseWidthSet(PWM0_BASE, PWM_OUT_2, - roundf((float)gSystemClock / PWM_FREQUENCY * 0.4f)); - PWMOutputState(PWM0_BASE, PWM_OUT_2_BIT, true); - PWMGenEnable(PWM0_BASE, PWM_GEN_1); -} - -uint32_t cpu_load_count(void) -{ - uint32_t i = 0; - TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT); - TimerEnable(TIMER1_BASE, TIMER_A); // start one-shot timer - while (!(TimerIntStatus(TIMER1_BASE, false) & TIMER_TIMA_TIMEOUT)) - i++; - return i; -} - -void start_cputimer() { - // initialize timer 1 in one-shot mode for polled timing - SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1); - TimerDisable(TIMER1_BASE, TIMER_BOTH); - TimerConfigure(TIMER1_BASE, TIMER_CFG_ONE_SHOT); - TimerLoadSet(TIMER1_BASE, TIMER_A, gSystemClock/100); // 10ms interval - // baseline load - cputime_unloaded = cpu_load_count(); -} - -int main(void) { - IntMasterDisable(); - - // Enable the Floating Point Unit, and permit ISRs to use it - FPUEnable(); - FPULazyStackingEnable(); - - // Initialize the system clock to 120 MHz - gSystemClock = SysCtlClockFreqSet(SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480, 120000000); - start_signal(); - start_sampler(); - - Crystalfontz128x128_Init(); // Initialize the LCD display driver - Crystalfontz128x128_SetOrientation(LCD_ORIENTATION_UP); // set screen orientation - - tContext sContext; - GrContextInit(&sContext, &g_sCrystalfontz128x128); // Initialize the grlib graphics context - GrContextFontSet(&sContext, &g_sFontFixed6x8); // select font - -#ifdef DISPLAY_TIME - uint32_t time; // local copy of gTime -#endif // DISPLAY_TIME - char str[50]; // string buffer - - // full-screen rectangle - tRectangle rectFullScreen = {0, 0, GrContextDpyWidthGet(&sContext)-1, GrContextDpyHeightGet(&sContext)-1}; - - ButtonInit(); - - start_cputimer(); - - IntMasterEnable(); - - uint8_t voltage_scale = 4; // 2v - uint8_t time_scale = 5; // 20us - uint8_t trigger_mode = 1; // rising - - while (true) { - // calculate cpu usage - uint32_t cputime_loaded; - cputime_loaded = cpu_load_count(); - float usage_percent; - usage_percent = (1.0 - (float) cputime_loaded / (float) cputime_unloaded) * (float) 100.; - - // handle buttons - Button button = (Button) 0; - while (fifo_get(&button)) { - switch (button) { - case S1: // toggle edge - trigger_mode++; - trigger_mode %= 3; - break; - case S2: // draw - refresh = !refresh; - break; - case Up: // next scale - voltage_scale = (voltage_scale + 1) % VOLTAGE_SCALES; - break; - case Down: // previous scale - voltage_scale = (voltage_scale + VOLTAGE_SCALES - 1) % VOLTAGE_SCALES; - break; - case Right: // next scale - time_scale = (time_scale + 1) % TIME_SCALES; - set_frequency(gTImeScale[time_scale]); - break; - case Left: // previous scale - time_scale = (time_scale + TIME_SCALES - 1) % TIME_SCALES; - set_frequency(gTImeScale[time_scale]); - break; - } - } - - GrContextForegroundSet(&sContext, ClrBlack); - GrRectFill(&sContext, &rectFullScreen); // fill screen with black - - GrContextForegroundSet(&sContext, ClrBlue); - - // draw gridlines from the center out - uint8_t xy_pos; - for (xy_pos = HEIGHT/2; xy_pos < HEIGHT; xy_pos += PIXELS_PER_DIV) { - GrLineDrawV(&sContext, xy_pos, 0, 128); // right - GrLineDrawV(&sContext, HEIGHT - xy_pos, 0, 128); // left - - GrLineDrawH(&sContext, 0, 128, xy_pos); // down - GrLineDrawH(&sContext, 0, 128, HEIGHT - xy_pos); // up - } - - - // info - GrContextForegroundSet(&sContext, ClrWheat); - GrStringDraw(&sContext, gVoltageScaleStr[voltage_scale], /*length*/ -1, /*x*/ 0, /*y*/ 0, /*opaque*/ false); - GrStringDraw(&sContext, gTimeScaleStr[time_scale], /*length*/ -1, /*x*/ 60, /*y*/ 0, /*opaque*/ false); - snprintf(str, sizeof(str), "CPU Load %.1f%%", usage_percent); - GrStringDraw(&sContext, str, /*length*/ -1, /*x*/ 0, /*y*/ HEIGHT - 10, /*opaque*/ false); - - switch (trigger_mode) { - case 1: - GrStringDraw(&sContext, "^", /*length*/ -1, /*x*/ WIDTH - 10, /*y*/ 0, /*opaque*/ false); - break; - case 0: - GrStringDraw(&sContext, "v", /*length*/ -1, /*x*/ WIDTH - 10, /*y*/ 0, /*opaque*/ false); - break; - case 2: - GrStringDraw(&sContext, "-", /*length*/ -1, /*x*/ WIDTH - 10, /*y*/ 0, /*opaque*/ false); - break; - } - - // display graph - #define LOCAL_BUF_LEN 128 - uint16_t local_adc_buffer[LOCAL_BUF_LEN]; // copy of adc buffer - int32_t adc_current_index; - int32_t j; - if (refresh) { - int trigger; - if (trigger_mode == 2) { - trigger = gADCBufferIndex - (WIDTH / 2); // show latest if trigger disabled - } else { - trigger = Trigger(trigger_mode); - } - - adc_current_index = trigger - (WIDTH / 2); - for (j=0; j(b))?(a):(b)) - #define CONSTRAIN(x) MAX(MIN(HEIGHT - 1, x), 0) - #define TRANSPOSE(x) CONSTRAIN((HEIGHT/2) - (int)roundf(fScale * ((int)x - ADC_OFFSET))) - uint32_t upper,lower, current, last; - - if (j==0) { - upper = TRANSPOSE(local_adc_buffer[j]); - lower = upper; - last = upper; - } else { - current = TRANSPOSE(local_adc_buffer[j]); - - upper = MAX(current, last); - lower = MIN(current, last); - - last = current; - } - - GrLineDrawV(&sContext, j, lower, upper); - } - -#ifdef DISPLAY_TIME - // display time - time = gTime; // read shared global only once - - uint32_t hundredths = time % 100; - uint32_t seconds = (time / 100) % 60; - uint32_t minutes = (time / (100 * 60)); - - snprintf(str, sizeof(str), "Time = %02u:%02u:%02u", minutes, seconds, hundredths); // convert time to string - GrContextForegroundSet(&sContext, ClrYellow); // yellow text - GrStringDraw(&sContext, str, /*length*/ -1, /*x*/ 0, /*y*/ 0, /*opaque*/ false); - - // display button statuses - char labels[9][7] = {"sw1", "sw2", "s1", "s2", "sel", "right", "left", "up", "down"}; - char statuses[2][15] = {"not pressed", "pressed"}; - int offset = 20; - uint32_t buttons = gButtons; - - uint8_t i; - for (i = 0; i < 9; i++) { - snprintf(str, sizeof(str), "%s: %s", - labels[i], - statuses[buttons & 1] - ); - GrStringDraw(&sContext, str, /*length*/ -1, /*x*/ 0, /*y*/ offset, /*opaque*/ false); - offset += 10; - buttons >>= 1; - } -#endif // DISPLAY_TIME - - GrFlush(&sContext); // flush the frame buffer to the LCD - } -} - -int Trigger(bool rising) // search for edge trigger -{ - int x = gADCBufferIndex - (WIDTH / 2); // half screen width - int x_stop = x - ADC_BUFFER_SIZE/2; - for (; x > x_stop; x--) { - if (rising) { - if ( gADCBuffer[ADC_BUFFER_WRAP(x)] >= ADC_OFFSET && - gADCBuffer[ADC_BUFFER_WRAP(x-1)] < ADC_OFFSET) { - break; - } - } else { // falling edge trigger - if ( gADCBuffer[ADC_BUFFER_WRAP(x)] <= ADC_OFFSET && - gADCBuffer[ADC_BUFFER_WRAP(x-1)] > ADC_OFFSET) { - break; - } - } - } - if (x == x_stop) // for loop ran to the end - x = gADCBufferIndex - (WIDTH / 2); // reset x back to how it was initialized - return x; -} +/* + * ECE 3849 Lab2 starter project + * + * Gene Bogdanov 9/13/2017 + */ +/* XDCtools Header files */ +#include +#include +#include + +/* BIOS Header files */ +#include +#include + +#include +#include +#include "driverlib/interrupt.h" + +uint32_t gSystemClock = 120000000; // [Hz] system clock frequency + + +#define PWM_FREQUENCY 20000 // PWM frequency = 20 kHz + +uint32_t gSystemClock; // [Hz] system clock frequency +volatile uint32_t gTime = 0; // time in hundredths of a second +volatile uint8_t refresh = 1; + +// assumming square lcd +#define HEIGHT LCD_VERTICAL_MAX +#define WIDTH LCD_HORIZONTAL_MAX +#define PIXELS_PER_DIV 20 + +#define VIN_RANGE 3.3 // volts +#define ADC_BITS 12 +#define ADC_OFFSET 30 + +#define VOLTAGE_SCALES 5 +const char * const gVoltageScaleStr[VOLTAGE_SCALES] = { +"100 mV", "200 mV", "500 mV", " 1 V", " 2 V" +}; + +const float gVoltageScale[VOLTAGE_SCALES] = { + 0.1, 0.2, 0.5, 1., 2. +}; + +#define TIME_SCALES 6 +const char * const gTimeScaleStr[TIME_SCALES] = { +"100 ms", "50 ms", "20 ms", " 10 ms", "50 us", "20 us" +}; + +const uint64_t gTImeScale[TIME_SCALES] = { + 100 * 1000 / PIXELS_PER_DIV, + 50 * 1000 / PIXELS_PER_DIV, + 20 * 1000 / PIXELS_PER_DIV, + 10 * 1000 / PIXELS_PER_DIV, + 50 / PIXELS_PER_DIV, + 20 / PIXELS_PER_DIV, +}; + +int Trigger(bool rising) // search for edge trigger +{ + int x = gADCBufferIndex - (WIDTH / 2); // half screen width + int x_stop = x - ADC_BUFFER_SIZE/2; + for (; x > x_stop; x--) { + if (rising) { + if ( gADCBuffer[ADC_BUFFER_WRAP(x)] >= ADC_OFFSET && + gADCBuffer[ADC_BUFFER_WRAP(x-1)] < ADC_OFFSET) { + break; + } + } else { // falling edge trigger + if ( gADCBuffer[ADC_BUFFER_WRAP(x)] <= ADC_OFFSET && + gADCBuffer[ADC_BUFFER_WRAP(x-1)] > ADC_OFFSET) { + break; + } + } + } + if (x == x_stop) // for loop ran to the end + x = gADCBufferIndex - (WIDTH / 2); // reset x back to how it was initialized + return x; +} + + + +/* + * ======== main ======== + */ +int main(void) +{ + IntMasterDisable(); + + // hardware initialization goes here + + /* Start BIOS */ + BIOS_start(); + + return (0); +} + +void task0_func(UArg arg1, UArg arg2) +{ + IntMasterEnable(); + + while (true) { + // do nothing + } +} + +void draw(tContext &sContext) { + // handle buttons + Button button = (Button) 0; + while (fifo_get(&button)) { + switch (button) { + case S1: // toggle edge + trigger_mode++; + trigger_mode %= 3; + break; + case S2: // draw + refresh = !refresh; + break; + case Up: // next scale + voltage_scale = (voltage_scale + 1) % VOLTAGE_SCALES; + break; + case Down: // previous scale + voltage_scale = (voltage_scale + VOLTAGE_SCALES - 1) % VOLTAGE_SCALES; + break; + case Right: // next scale + time_scale = (time_scale + 1) % TIME_SCALES; + set_frequency(gTImeScale[time_scale]); + break; + case Left: // previous scale + time_scale = (time_scale + TIME_SCALES - 1) % TIME_SCALES; + set_frequency(gTImeScale[time_scale]); + break; + } + } + + GrContextForegroundSet(&sContext, ClrBlack); + GrRectFill(&sContext, &rectFullScreen); // fill screen with black + + GrContextForegroundSet(&sContext, ClrBlue); + + // draw gridlines from the center out + uint8_t xy_pos; + for (xy_pos = HEIGHT/2; xy_pos < HEIGHT; xy_pos += PIXELS_PER_DIV) { + GrLineDrawV(&sContext, xy_pos, 0, 128); // right + GrLineDrawV(&sContext, HEIGHT - xy_pos, 0, 128); // left + + GrLineDrawH(&sContext, 0, 128, xy_pos); // down + GrLineDrawH(&sContext, 0, 128, HEIGHT - xy_pos); // up + } + + + // info + GrContextForegroundSet(&sContext, ClrWheat); + GrStringDraw(&sContext, gVoltageScaleStr[voltage_scale], /*length*/ -1, /*x*/ 0, /*y*/ 0, /*opaque*/ false); + GrStringDraw(&sContext, gTimeScaleStr[time_scale], /*length*/ -1, /*x*/ 60, /*y*/ 0, /*opaque*/ false); + snprintf(str, sizeof(str), "CPU Load %.1f%%", usage_percent); + GrStringDraw(&sContext, str, /*length*/ -1, /*x*/ 0, /*y*/ HEIGHT - 10, /*opaque*/ false); + + switch (trigger_mode) { + case 1: + GrStringDraw(&sContext, "^", /*length*/ -1, /*x*/ WIDTH - 10, /*y*/ 0, /*opaque*/ false); + break; + case 0: + GrStringDraw(&sContext, "v", /*length*/ -1, /*x*/ WIDTH - 10, /*y*/ 0, /*opaque*/ false); + break; + case 2: + GrStringDraw(&sContext, "-", /*length*/ -1, /*x*/ WIDTH - 10, /*y*/ 0, /*opaque*/ false); + break; + } + + // display graph + #define LOCAL_BUF_LEN 128 + uint16_t local_adc_buffer[LOCAL_BUF_LEN]; // copy of adc buffer + int32_t adc_current_index; + int32_t j; + if (refresh) { + int trigger; + if (trigger_mode == 2) { + trigger = gADCBufferIndex - (WIDTH / 2); // show latest if trigger disabled + } else { + trigger = Trigger(trigger_mode); + } + + adc_current_index = trigger - (WIDTH / 2); + for (j=0; j(b))?(a):(b)) + #define CONSTRAIN(x) MAX(MIN(HEIGHT - 1, x), 0) + #define TRANSPOSE(x) CONSTRAIN((HEIGHT/2) - (int)roundf(fScale * ((int)x - ADC_OFFSET))) + uint32_t upper,lower, current, last; + + if (j==0) { + upper = TRANSPOSE(local_adc_buffer[j]); + lower = upper; + last = upper; + } else { + current = TRANSPOSE(local_adc_buffer[j]); + + upper = MAX(current, last); + lower = MIN(current, last); + + last = current; + } + + GrLineDrawV(&sContext, j, lower, upper); + } +} diff --git a/makefile.defs b/makefile.defs new file mode 100644 index 0000000..5a0353c --- /dev/null +++ b/makefile.defs @@ -0,0 +1,24 @@ +#File used to help "Clean Project" in CCS completely clean the kernel files +CFG_SRCDIR = ../src + +ifneq (,$(findstring :,$(WINDIR)$(windir)$(COMSPEC)$(comspec))) + # if Windows, use copy to touch file dates + TOUCH = copy /b $(subst /,\,$@)+,, $(subst /,\,$@) +else + TOUCH = touch $@ +endif + +# include Config generated top-level makefile +-include $(CFG_SRCDIR)/makefile.libs + +ifneq (clean,$(MAKECMDGOALS)) +# ensure this file is reloaded when .cfg files change but after config runs +$(CFG_SRCDIR)/makefile.libs: $(GEN_OPTS) $(CFG_SRCS) + -@$(if $(wildcard $@),$(TOUCH),:) +endif + +#add generated makefile to list of files to delete during a clean +GEN_MISC_FILES__QUOTED += "$(CFG_SRCDIR)/makefile.libs" + +#add generated source dir to list of directories to delete during a clean +#GEN_MISC_DIRS__QTD += "$(CFG_SRCDIR)" diff --git a/rtos.cfg b/rtos.cfg new file mode 100644 index 0000000..93ede6e --- /dev/null +++ b/rtos.cfg @@ -0,0 +1,542 @@ +/* + * Copyright (c) 2015-2016, Texas Instruments Incorporated + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + + +/* ================ Clock configuration ================ */ +var Clock = xdc.useModule('ti.sysbios.knl.Clock'); +var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox'); +var TimestampProvider = xdc.useModule('ti.sysbios.family.arm.lm4.TimestampProvider'); +/* + * Default value is family dependent. For example, Linux systems often only + * support a minimum period of 10000 us and multiples of 10000 us. + * TI platforms have a default of 1000 us. + */ +Clock.tickPeriod = 1000; + + + +/* ================ Defaults (module) configuration ================ */ +var Defaults = xdc.useModule('xdc.runtime.Defaults'); +/* + * A flag to allow module names to be loaded on the target. Module name + * strings are placed in the .const section for debugging purposes. + * + * Pick one: + * - true (default) + * Setting this parameter to true will include name strings in the .const + * section so that Errors and Asserts are easier to debug. + * - false + * Setting this parameter to false will reduce footprint in the .const + * section. As a result, Error and Assert messages will contain an + * "unknown module" prefix instead of the actual module name. + */ +Defaults.common$.namedModule = true; +//Defaults.common$.namedModule = false; + + + +/* ================ Error configuration ================ */ +var Error = xdc.useModule('xdc.runtime.Error'); +/* + * This function is called to handle all raised errors, but unlike + * Error.raiseHook, this function is responsible for completely handling the + * error with an appropriately initialized Error_Block. + * + * Pick one: + * - Error.policyDefault (default) + * Calls Error.raiseHook with an initialized Error_Block structure and logs + * the error using the module's logger. + * - Error.policySpin + * Simple alternative that traps on a while(1) loop for minimized target + * footprint. + * Using Error.policySpin, the Error.raiseHook will NOT called. + */ +Error.policyFxn = Error.policyDefault; +//Error.policyFxn = Error.policySpin; + +/* + * If Error.policyFxn is set to Error.policyDefault, this function is called + * whenever an error is raised by the Error module. + * + * Pick one: + * - Error.print (default) + * Errors are formatted and output via System_printf() for easier + * debugging. + * - null + * Errors are not formatted or logged. This option reduces code footprint. + * - non-null function + * Errors invoke custom user function. See the Error module documentation + * for more details. + */ +Error.raiseHook = Error.print; +//Error.raiseHook = null; +//Error.raiseHook = "&myErrorFxn"; + +/* + * If Error.policyFxn is set to Error.policyDefault, this option applies to the + * maximum number of times the Error.raiseHook function can be recursively + * invoked. This option limits the possibility of an infinite recursion that + * could lead to a stack overflow. + * The default value is 16. + */ +Error.maxDepth = 2; + + + +/* ================ Hwi configuration ================ */ +var halHwi = xdc.useModule('ti.sysbios.hal.Hwi'); +var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi'); +/* + * Checks for Hwi (system) stack overruns while in the Idle loop. + * + * Pick one: + * - true (default) + * Checks the top word for system stack overflows during the idle loop and + * raises an Error if one is detected. + * - false + * Disabling the runtime check improves runtime performance and yields a + * reduced flash footprint. + */ +halHwi.checkStackFlag = true; +//halHwi.checkStackFlag = false; + +/* + * The following options alter the system's behavior when a hardware exception + * is detected. + * + * Pick one: + * - Hwi.enableException = true + * This option causes the default m3Hwi.excHandlerFunc function to fully + * decode an exception and dump the registers to the system console. + * This option raises errors in the Error module and displays the + * exception in ROV. + * - Hwi.enableException = false + * This option reduces code footprint by not decoding or printing the + * exception to the system console. + * It however still raises errors in the Error module and displays the + * exception in ROV. + * - Hwi.excHandlerFunc = null + * This is the most aggressive option for code footprint savings; but it + * can difficult to debug exceptions. It reduces flash footprint by + * plugging in a default while(1) trap when exception occur. This option + * does not raise an error with the Error module. + */ +m3Hwi.enableException = true; +//m3Hwi.enableException = false; +//m3Hwi.excHandlerFunc = null; + +/* + * Enable hardware exception generation when dividing by zero. + * + * Pick one: + * - 0 (default) + * Disables hardware exceptions when dividing by zero + * - 1 + * Enables hardware exceptions when dividing by zero + */ +m3Hwi.nvicCCR.DIV_0_TRP = 0; +//m3Hwi.nvicCCR.DIV_0_TRP = 1; + +/* + * Enable hardware exception generation for invalid data alignment. + * + * Pick one: + * - 0 (default) + * Disables hardware exceptions for data alignment + * - 1 + * Enables hardware exceptions for data alignment + */ +m3Hwi.nvicCCR.UNALIGN_TRP = 0; +//m3Hwi.nvicCCR.UNALIGN_TRP = 1; + + + +/* ================ Idle configuration ================ */ +var Idle = xdc.useModule('ti.sysbios.knl.Idle'); +/* + * The Idle module is used to specify a list of functions to be called when no + * other tasks are running in the system. + * + * Functions added here will be run continuously within the idle task. + * + * Function signature: + * Void func(Void); + */ +//Idle.addFunc("&myIdleFunc"); + + + +/* ================ Kernel (SYS/BIOS) configuration ================ */ +var BIOS = xdc.useModule('ti.sysbios.BIOS'); +/* + * Enable asserts in the BIOS library. + * + * Pick one: + * - true (default) + * Enables asserts for debugging purposes. + * - false + * Disables asserts for a reduced code footprint and better performance. + */ +BIOS.assertsEnabled = true; +//BIOS.assertsEnabled = false; + +/* + * Specify default heap size for BIOS. + */ +BIOS.heapSize = 1024; + +/* + * A flag to determine if xdc.runtime sources are to be included in a custom + * built BIOS library. + * + * Pick one: + * - false (default) + * The pre-built xdc.runtime library is provided by the respective target + * used to build the application. + * - true + * xdc.runtime library sources are to be included in the custom BIOS + * library. This option yields the most efficient library in both code + * footprint and runtime performance. + */ +BIOS.includeXdcRuntime = false; +//BIOS.includeXdcRuntime = true; + +/* + * The SYS/BIOS runtime is provided in the form of a library that is linked + * with the application. Several forms of this library are provided with the + * SYS/BIOS product. + * + * Pick one: + * - BIOS.LibType_Custom + * Custom built library that is highly optimized for code footprint and + * runtime performance. + * - BIOS.LibType_Debug + * Custom built library that is non-optimized that can be used to + * single-step through APIs with a debugger. + * + */ +BIOS.libType = BIOS.LibType_Custom; +//BIOS.libType = BIOS.LibType_Debug; + +/* + * Runtime instance creation enable flag. + * + * Pick one: + * - true (default) + * Allows Mod_create() and Mod_delete() to be called at runtime which + * requires a default heap for dynamic memory allocation. + * - false + * Reduces code footprint by disallowing Mod_create() and Mod_delete() to + * be called at runtime. Object instances are constructed via + * Mod_construct() and destructed via Mod_destruct(). + */ +BIOS.runtimeCreatesEnabled = true; +//BIOS.runtimeCreatesEnabled = false; + +/* + * Enable logs in the BIOS library. + * + * Pick one: + * - true (default) + * Enables logs for debugging purposes. + * - false + * Disables logging for reduced code footprint and improved runtime + * performance. + */ +//BIOS.logsEnabled = true; +BIOS.logsEnabled = false; + + + +/* ================ Memory configuration ================ */ +var Memory = xdc.useModule('xdc.runtime.Memory'); +/* + * The Memory module itself simply provides a common interface for any + * variety of system and application specific memory management policies + * implemented by the IHeap modules(Ex. HeapMem, HeapBuf). + */ + + + +/* ================ Program configuration ================ */ +/* + * Program.stack is ignored with IAR. Use the project options in + * IAR Embedded Workbench to alter the system stack size. + */ +if (!Program.build.target.$name.match(/iar/)) { + /* + * Reducing the system stack size (used by ISRs and Swis) to reduce + * RAM usage. + */ + Program.stack = 768; +} + + + +/* + * Enable Semihosting for GNU targets to print to CCS console + */ +if (Program.build.target.$name.match(/gnu/)) { + var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport'); +} +/* ================ Semaphore configuration ================ */ +var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); +/* + * Enables global support for Task priority pend queuing. + * + * Pick one: + * - true (default) + * This allows pending tasks to be serviced based on their task priority. + * - false + * Pending tasks are services based on first in, first out basis. + * + * When using BIOS in ROM: + * This option must be set to false. + */ +//Semaphore.supportsPriority = true; +Semaphore.supportsPriority = false; + +/* + * Allows for the implicit posting of events through the semaphore, + * disable for additional code saving. + * + * Pick one: + * - true + * This allows the Semaphore module to post semaphores and events + * simultaneously. + * - false (default) + * Events must be explicitly posted to unblock tasks. + * + */ +//Semaphore.supportsEvents = true; +Semaphore.supportsEvents = false; + + + +/* ================ Swi configuration ================ */ +var Swi = xdc.useModule('ti.sysbios.knl.Swi'); +/* + * A software interrupt is an object that encapsulates a function to be + * executed and a priority. Software interrupts are prioritized, preempt tasks + * and are preempted by hardware interrupt service routines. + * + * This module is included to allow Swi's in a users' application. + */ + + + +/* ================ System configuration ================ */ +var System = xdc.useModule('xdc.runtime.System'); +/* + * The Abort handler is called when the system exits abnormally. + * + * Pick one: + * - System.abortStd (default) + * Call the ANSI C Standard 'abort()' to terminate the application. + * - System.abortSpin + * A lightweight abort function that loops indefinitely in a while(1) trap + * function. + * - A custom abort handler + * A user-defined function. See the System module documentation for + * details. + */ +System.abortFxn = System.abortStd; +//System.abortFxn = System.abortSpin; +//System.abortFxn = "&myAbortSystem"; + +/* + * The Exit handler is called when the system exits normally. + * + * Pick one: + * - System.exitStd (default) + * Call the ANSI C Standard 'exit()' to terminate the application. + * - System.exitSpin + * A lightweight exit function that loops indefinitely in a while(1) trap + * function. + * - A custom exit function + * A user-defined function. See the System module documentation for + * details. + */ +System.exitFxn = System.exitStd; +//System.exitFxn = System.exitSpin; +//System.exitFxn = "&myExitSystem"; + +/* + * Minimize exit handler array in the System module. The System module includes + * an array of functions that are registered with System_atexit() which is + * called by System_exit(). The default value is 8. + */ +System.maxAtexitHandlers = 2; + +/* + * The System.SupportProxy defines a low-level implementation of System + * functions such as System_printf(), System_flush(), etc. + * + * Pick one pair: + * - SysMin + * This module maintains an internal configurable circular buffer that + * stores the output until System_flush() is called. + * The size of the circular buffer is set via SysMin.bufSize. + * - SysCallback + * SysCallback allows for user-defined implementations for System APIs. + * The SysCallback support proxy has a smaller code footprint and can be + * used to supply custom System_printf services. + * The default SysCallback functions point to stub functions. See the + * SysCallback module's documentation. + */ +var SysMin = xdc.useModule('xdc.runtime.SysMin'); +SysMin.bufSize = 128; +System.SupportProxy = SysMin; +//var SysCallback = xdc.useModule('xdc.runtime.SysCallback'); +//System.SupportProxy = SysCallback; +//SysCallback.abortFxn = "&myUserAbort"; +//SysCallback.exitFxn = "&myUserExit"; +//SysCallback.flushFxn = "&myUserFlush"; +//SysCallback.putchFxn = "&myUserPutch"; +//SysCallback.readyFxn = "&myUserReady"; + + + + +/* ================ Task configuration ================ */ +var Task = xdc.useModule('ti.sysbios.knl.Task'); +/* + * Check task stacks for overflow conditions. + * + * Pick one: + * - true (default) + * Enables runtime checks for task stack overflow conditions during + * context switching ("from" and "to") + * - false + * Disables runtime checks for task stack overflow conditions. + */ +Task.checkStackFlag = true; +//Task.checkStackFlag = false; + +/* + * Set the default task stack size when creating tasks. + * + * The default is dependent on the device being used. Reducing the default stack + * size yields greater memory savings. + */ +Task.defaultStackSize = 512; + +/* + * Enables the idle task. + * + * Pick one: + * - true (default) + * Creates a task with priority of 0 which calls idle hook functions. This + * option must be set to true to gain power savings provided by the Power + * module. + * - false + * No idle task is created. This option consumes less memory as no + * additional default task stack is needed. + * To gain power savings by the Power module without having the idle task, + * add Idle.run as the Task.allBlockedFunc. + */ +Task.enableIdleTask = true; +//Task.enableIdleTask = false; +//Task.allBlockedFunc = Idle.run; + +/* + * If Task.enableIdleTask is set to true, this option sets the idle task's + * stack size. + * + * Reducing the idle stack size yields greater memory savings. + */ +Task.idleTaskStackSize = 512; + +/* + * Reduce the number of task priorities. + * The default is 16. + * Decreasing the number of task priorities yield memory savings. + */ +Task.numPriorities = 16; + + + +/* ================ Text configuration ================ */ +var Text = xdc.useModule('xdc.runtime.Text'); +/* + * These strings are placed in the .const section. Setting this parameter to + * false will save space in the .const section. Error, Assert and Log messages + * will print raw ids and args instead of a formatted message. + * + * Pick one: + * - true (default) + * This option loads test string into the .const for easier debugging. + * - false + * This option reduces the .const footprint. + */ +Text.isLoaded = true; +//Text.isLoaded = false; + + + +/* ================ Types configuration ================ */ +var Types = xdc.useModule('xdc.runtime.Types'); +/* + * This module defines basic constants and types used throughout the + * xdc.runtime package. + */ + + + +/* ================ TI-RTOS middleware configuration ================ */ +var mwConfig = xdc.useModule('ti.mw.Config'); +/* + * Include TI-RTOS middleware libraries + */ + + + +/* ================ TI-RTOS drivers' configuration ================ */ +var driversConfig = xdc.useModule('ti.drivers.Config'); +/* + * Include TI-RTOS drivers + * + * Pick one: + * - driversConfig.LibType_NonInstrumented (default) + * Use TI-RTOS drivers library optimized for footprint and performance + * without asserts or logs. + * - driversConfig.LibType_Instrumented + * Use TI-RTOS drivers library for debugging with asserts and logs enabled. + */ +driversConfig.libType = driversConfig.LibType_NonInstrumented; +Clock.timerId = 0; +TimestampProvider.useClockTimer = true; +var task0Params = new Task.Params(); +task0Params.instance.name = "task0"; +task0Params.priority = 1; +Program.global.task0 = Task.create("&task0_func", task0Params); diff --git a/src/.exclude b/src/.exclude new file mode 100644 index 0000000..8c86331 --- /dev/null +++ b/src/.exclude @@ -0,0 +1 @@ +This file exists to prevent Eclipse/CDT from adding the C sources contained in this directory (or below) to any enclosing project. diff --git a/sysctl_pll.c b/sysctl_pll.c deleted file mode 100644 index d42264b..0000000 --- a/sysctl_pll.c +++ /dev/null @@ -1,115 +0,0 @@ -//***************************************************************************** -// -// sysctl.c - Driver for the system controller. -// -// Copyright (c) 2005-2015 Texas Instruments Incorporated. All rights reserved. -// Software License Agreement -// -// 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. -// -// Excerpt exporting the normally static function _SysCtlFrequencyGet. -// -//***************************************************************************** - -#include -#include -#include "inc/hw_ints.h" -#include "inc/hw_nvic.h" -#include "inc/hw_sysctl.h" -#include "inc/hw_types.h" -#include "inc/hw_flash.h" -#include "driverlib/cpu.h" -#include "driverlib/debug.h" -#include "driverlib/interrupt.h" -#include "driverlib/sysctl.h" - -//***************************************************************************** -// -// Calculate the system frequency from the register settings base on the -// oscillator input. -// -//***************************************************************************** -uint32_t SysCtlFrequencyGet(uint32_t ui32Xtal) -{ - uint32_t ui32Result; - uint_fast16_t ui16F1, ui16F2; - uint_fast16_t ui16PInt, ui16PFract; - uint_fast8_t ui8Q, ui8N; - - // - // Extract all of the values from the hardware registers. - // - ui16PFract = ((HWREG(SYSCTL_PLLFREQ0) & SYSCTL_PLLFREQ0_MFRAC_M) >> - SYSCTL_PLLFREQ0_MFRAC_S); - ui16PInt = HWREG(SYSCTL_PLLFREQ0) & SYSCTL_PLLFREQ0_MINT_M; - ui8Q = (((HWREG(SYSCTL_PLLFREQ1) & SYSCTL_PLLFREQ1_Q_M) >> - SYSCTL_PLLFREQ1_Q_S) + 1); - ui8N = (((HWREG(SYSCTL_PLLFREQ1) & SYSCTL_PLLFREQ1_N_M) >> - SYSCTL_PLLFREQ1_N_S) + 1); - - // - // Divide the crystal value by N. - // - ui32Xtal /= (uint32_t)ui8N; - - // - // Calculate the multiplier for bits 9:5. - // - ui16F1 = ui16PFract / 32; - - // - // Calculate the multiplier for bits 4:0. - // - ui16F2 = ui16PFract - (ui16F1 * 32); - - // - // Get the integer portion. - // - ui32Result = ui32Xtal * (uint32_t)ui16PInt; - - // - // Add first fractional bits portion(9:0). - // - ui32Result += (ui32Xtal * (uint32_t)ui16F1) / 32; - - // - // Add the second fractional bits portion(4:0). - // - ui32Result += (ui32Xtal * (uint32_t)ui16F2) / 1024; - - // - // Divide the result by Q. - // - ui32Result = ui32Result / (uint32_t)ui8Q; - - // - // Return the resulting PLL frequency. - // - return(ui32Result); -} diff --git a/sysctl_pll.h b/sysctl_pll.h deleted file mode 100644 index 68dccae..0000000 --- a/sysctl_pll.h +++ /dev/null @@ -1,45 +0,0 @@ -//***************************************************************************** -// -// sysctl.h - Prototypes for the system control driver. -// -// Copyright (c) 2005-2015 Texas Instruments Incorporated. All rights reserved. -// Software License Agreement -// -// 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. -// -// Excerpt exporting the normally static function _SysCtlFrequencyGet. -// -//***************************************************************************** - -#ifndef SYSCTL_PLL_H_ -#define SYSCTL_PLL_H_ - -uint32_t SysCtlFrequencyGet(uint32_t ui32Xtal); - -#endif /* SYSCTL_PLL_H_ */ diff --git a/targetConfigs/Tiva TM4C1294NCPDT.ccxml b/targetConfigs/Tiva TM4C1294NCPDT.ccxml index 089403b..721c691 100644 --- a/targetConfigs/Tiva TM4C1294NCPDT.ccxml +++ b/targetConfigs/Tiva TM4C1294NCPDT.ccxml @@ -1,24 +1,13 @@ - - - - - - - - - - - diff --git a/tm4c1294ncpdt.cmd b/tm4c1294ncpdt.cmd deleted file mode 100644 index ee18ce7..0000000 --- a/tm4c1294ncpdt.cmd +++ /dev/null @@ -1,45 +0,0 @@ -/****************************************************************************** - * - * Default Linker Command file for the Texas Instruments TM4C1294NCPDT - * - * This is derived from revision 15071 of the TivaWare Library. - * - *****************************************************************************/ - ---retain=g_pfnVectors - -MEMORY -{ - FLASH (RX) : origin = 0x00000000, length = 0x00100000 - SRAM (RWX) : origin = 0x20000000, length = 0x00040000 -} - -/* The following command line options are set as part of the CCS project. */ -/* If you are building using the command line, or for some reason want to */ -/* define them here, you can uncomment and modify these lines as needed. */ -/* If you are using CCS for building, it is probably better to make any such */ -/* modifications in your CCS project and leave this file alone. */ -/* */ -/* --heap_size=0 */ -/* --stack_size=256 */ -/* --library=rtsv7M4_T_le_eabi.lib */ - -/* Section allocation in memory */ - -SECTIONS -{ - .intvecs: > 0x00000000 - .text : > FLASH - .const : > FLASH - .cinit : > FLASH - .pinit : > FLASH - .init_array : > FLASH - - .vtable : > 0x20000000 - .data : > SRAM - .bss : > SRAM - .sysmem : > SRAM - .stack : > SRAM -} - -__STACK_TOP = __stack + 512; diff --git a/tm4c1294ncpdt_startup_ccs.c b/tm4c1294ncpdt_startup_ccs.c deleted file mode 100644 index cece001..0000000 --- a/tm4c1294ncpdt_startup_ccs.c +++ /dev/null @@ -1,278 +0,0 @@ -//***************************************************************************** -// -// Startup code for use with TI's Code Composer Studio. -// -// Copyright (c) 2011-2014 Texas Instruments Incorporated. All rights reserved. -// Software License Agreement -// -// Software License Agreement -// -// Texas Instruments (TI) is supplying this software for use solely and -// exclusively on TI's microcontroller products. The software is owned by -// TI and/or its suppliers, and is protected under applicable copyright -// laws. You may not combine this software with "viral" open-source -// software in order to form a larger program. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. -// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT -// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY -// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL -// DAMAGES, FOR ANY REASON WHATSOEVER. -// -//***************************************************************************** - -#include - -//***************************************************************************** -// -// Forward declaration of the default fault handlers. -// -//***************************************************************************** -void ResetISR(void); -static void NmiSR(void); -static void FaultISR(void); -static void IntDefaultHandler(void); -void ButtonISR(void); -void ADC_ISR(void); - -//***************************************************************************** -// -// External declaration for the reset handler that is to be called when the -// processor is started -// -//***************************************************************************** -extern void _c_int00(void); - -//***************************************************************************** -// -// Linker variable that marks the top of the stack. -// -//***************************************************************************** -extern uint32_t __STACK_TOP; - -//***************************************************************************** -// -// External declarations for the interrupt handlers used by the application. -// -//***************************************************************************** -// To be added by user - - -//***************************************************************************** -// -// The vector table. Note that the proper constructs must be placed on this to -// ensure that it ends up at physical address 0x0000.0000 or at the start of -// the program if located at a start address other than 0. -// -//***************************************************************************** -#pragma DATA_SECTION(g_pfnVectors, ".intvecs") -void (* const g_pfnVectors[])(void) = -{ - (void (*)(void))((uint32_t)&__STACK_TOP), - // The initial stack pointer - ResetISR, // The reset handler - NmiSR, // The NMI handler - FaultISR, // The hard fault handler - IntDefaultHandler, // The MPU fault handler - IntDefaultHandler, // The bus fault handler - IntDefaultHandler, // The usage fault handler - 0, // Reserved - 0, // Reserved - 0, // Reserved - 0, // Reserved - IntDefaultHandler, // SVCall handler - IntDefaultHandler, // Debug monitor handler - 0, // Reserved - IntDefaultHandler, // The PendSV handler - IntDefaultHandler, // The SysTick handler - IntDefaultHandler, // GPIO Port A - IntDefaultHandler, // GPIO Port B - IntDefaultHandler, // GPIO Port C - IntDefaultHandler, // GPIO Port D - IntDefaultHandler, // GPIO Port E - IntDefaultHandler, // UART0 Rx and Tx - IntDefaultHandler, // UART1 Rx and Tx - IntDefaultHandler, // SSI0 Rx and Tx - IntDefaultHandler, // I2C0 Master and Slave - IntDefaultHandler, // PWM Fault - IntDefaultHandler, // PWM Generator 0 - IntDefaultHandler, // PWM Generator 1 - IntDefaultHandler, // PWM Generator 2 - IntDefaultHandler, // Quadrature Encoder 0 - IntDefaultHandler, // ADC Sequence 0 - IntDefaultHandler, // ADC Sequence 1 - IntDefaultHandler, // ADC Sequence 2 - IntDefaultHandler, // ADC Sequence 3 - IntDefaultHandler, // Watchdog timer - ButtonISR, // Timer 0 subtimer A - IntDefaultHandler, // Timer 0 subtimer B - IntDefaultHandler, // Timer 1 subtimer A - IntDefaultHandler, // Timer 1 subtimer B - IntDefaultHandler, // Timer 2 subtimer A - IntDefaultHandler, // Timer 2 subtimer B - IntDefaultHandler, // Analog Comparator 0 - IntDefaultHandler, // Analog Comparator 1 - IntDefaultHandler, // Analog Comparator 2 - IntDefaultHandler, // System Control (PLL, OSC, BO) - IntDefaultHandler, // FLASH Control - IntDefaultHandler, // GPIO Port F - IntDefaultHandler, // GPIO Port G - IntDefaultHandler, // GPIO Port H - IntDefaultHandler, // UART2 Rx and Tx - IntDefaultHandler, // SSI1 Rx and Tx - IntDefaultHandler, // Timer 3 subtimer A - IntDefaultHandler, // Timer 3 subtimer B - IntDefaultHandler, // I2C1 Master and Slave - IntDefaultHandler, // CAN0 - IntDefaultHandler, // CAN1 - IntDefaultHandler, // Ethernet - IntDefaultHandler, // Hibernate - IntDefaultHandler, // USB0 - IntDefaultHandler, // PWM Generator 3 - IntDefaultHandler, // uDMA Software Transfer - IntDefaultHandler, // uDMA Error - ADC_ISR, // ADC1 Sequence 0 - IntDefaultHandler, // ADC1 Sequence 1 - IntDefaultHandler, // ADC1 Sequence 2 - IntDefaultHandler, // ADC1 Sequence 3 - IntDefaultHandler, // External Bus Interface 0 - IntDefaultHandler, // GPIO Port J - IntDefaultHandler, // GPIO Port K - IntDefaultHandler, // GPIO Port L - IntDefaultHandler, // SSI2 Rx and Tx - IntDefaultHandler, // SSI3 Rx and Tx - IntDefaultHandler, // UART3 Rx and Tx - IntDefaultHandler, // UART4 Rx and Tx - IntDefaultHandler, // UART5 Rx and Tx - IntDefaultHandler, // UART6 Rx and Tx - IntDefaultHandler, // UART7 Rx and Tx - IntDefaultHandler, // I2C2 Master and Slave - IntDefaultHandler, // I2C3 Master and Slave - IntDefaultHandler, // Timer 4 subtimer A - IntDefaultHandler, // Timer 4 subtimer B - IntDefaultHandler, // Timer 5 subtimer A - IntDefaultHandler, // Timer 5 subtimer B - IntDefaultHandler, // FPU - 0, // Reserved - 0, // Reserved - IntDefaultHandler, // I2C4 Master and Slave - IntDefaultHandler, // I2C5 Master and Slave - IntDefaultHandler, // GPIO Port M - IntDefaultHandler, // GPIO Port N - 0, // Reserved - IntDefaultHandler, // Tamper - IntDefaultHandler, // GPIO Port P (Summary or P0) - IntDefaultHandler, // GPIO Port P1 - IntDefaultHandler, // GPIO Port P2 - IntDefaultHandler, // GPIO Port P3 - IntDefaultHandler, // GPIO Port P4 - IntDefaultHandler, // GPIO Port P5 - IntDefaultHandler, // GPIO Port P6 - IntDefaultHandler, // GPIO Port P7 - IntDefaultHandler, // GPIO Port Q (Summary or Q0) - IntDefaultHandler, // GPIO Port Q1 - IntDefaultHandler, // GPIO Port Q2 - IntDefaultHandler, // GPIO Port Q3 - IntDefaultHandler, // GPIO Port Q4 - IntDefaultHandler, // GPIO Port Q5 - IntDefaultHandler, // GPIO Port Q6 - IntDefaultHandler, // GPIO Port Q7 - IntDefaultHandler, // GPIO Port R - IntDefaultHandler, // GPIO Port S - IntDefaultHandler, // SHA/MD5 0 - IntDefaultHandler, // AES 0 - IntDefaultHandler, // DES3DES 0 - IntDefaultHandler, // LCD Controller 0 - IntDefaultHandler, // Timer 6 subtimer A - IntDefaultHandler, // Timer 6 subtimer B - IntDefaultHandler, // Timer 7 subtimer A - IntDefaultHandler, // Timer 7 subtimer B - IntDefaultHandler, // I2C6 Master and Slave - IntDefaultHandler, // I2C7 Master and Slave - IntDefaultHandler, // HIM Scan Matrix Keyboard 0 - IntDefaultHandler, // One Wire 0 - IntDefaultHandler, // HIM PS/2 0 - IntDefaultHandler, // HIM LED Sequencer 0 - IntDefaultHandler, // HIM Consumer IR 0 - IntDefaultHandler, // I2C8 Master and Slave - IntDefaultHandler, // I2C9 Master and Slave - IntDefaultHandler, // GPIO Port T - IntDefaultHandler, // Fan 1 - 0, // Reserved -}; - -//***************************************************************************** -// -// This is the code that gets called when the processor first starts execution -// following a reset event. Only the absolutely necessary set is performed, -// after which the application supplied entry() routine is called. Any fancy -// actions (such as making decisions based on the reset cause register, and -// resetting the bits in that register) are left solely in the hands of the -// application. -// -//***************************************************************************** -void -ResetISR(void) -{ - // - // Jump to the CCS C initialization routine. This will enable the - // floating-point unit as well, so that does not need to be done here. - // - __asm(" .global _c_int00\n" - " b.w _c_int00"); -} - -//***************************************************************************** -// -// This is the code that gets called when the processor receives a NMI. This -// simply enters an infinite loop, preserving the system state for examination -// by a debugger. -// -//***************************************************************************** -static void -NmiSR(void) -{ - // - // Enter an infinite loop. - // - while(1) - { - } -} - -//***************************************************************************** -// -// This is the code that gets called when the processor receives a fault -// interrupt. This simply enters an infinite loop, preserving the system state -// for examination by a debugger. -// -//***************************************************************************** -static void -FaultISR(void) -{ - // - // Enter an infinite loop. - // - while(1) - { - } -} - -//***************************************************************************** -// -// This is the code that gets called when the processor receives an unexpected -// interrupt. This simply enters an infinite loop, preserving the system state -// for examination by a debugger. -// -//***************************************************************************** -static void -IntDefaultHandler(void) -{ - // - // Go into an infinite loop. - // - while(1) - { - } -}