added more code
This commit is contained in:
42
CPE325/Lab10_Part2/Debug/Lab10_Part2.d
Normal file
42
CPE325/Lab10_Part2/Debug/Lab10_Part2.d
Normal file
@ -0,0 +1,42 @@
|
||||
# FIXED
|
||||
|
||||
Lab10_Part2.obj: ../Lab10_Part2.c
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/ccs_base/msp430/include/msp430xG46x.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/ccs_base/msp430/include/in430.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics_legacy_undefs.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/math.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_ti_config.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/linkage.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_defs.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/_types.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/cdefs.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_types.h
|
||||
Lab10_Part2.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_limits.h
|
||||
|
||||
../Lab10_Part2.c:
|
||||
|
||||
C:/ti/ccs1040/ccs/ccs_base/msp430/include/msp430xG46x.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/ccs_base/msp430/include/in430.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics_legacy_undefs.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/math.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_defs.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_limits.h:
|
||||
|
1182
CPE325/Lab10_Part2/Debug/Lab10_Part2.map
Normal file
1182
CPE325/Lab10_Part2/Debug/Lab10_Part2.map
Normal file
File diff suppressed because it is too large
Load Diff
BIN
CPE325/Lab10_Part2/Debug/Lab10_Part2.obj
Normal file
BIN
CPE325/Lab10_Part2/Debug/Lab10_Part2.obj
Normal file
Binary file not shown.
BIN
CPE325/Lab10_Part2/Debug/Lab10_Part2.out
Normal file
BIN
CPE325/Lab10_Part2/Debug/Lab10_Part2.out
Normal file
Binary file not shown.
7888
CPE325/Lab10_Part2/Debug/Lab10_Part2_linkInfo.xml
Normal file
7888
CPE325/Lab10_Part2/Debug/Lab10_Part2_linkInfo.xml
Normal file
File diff suppressed because it is too large
Load Diff
1
CPE325/Lab10_Part2/Debug/ccsObjs.opt
Normal file
1
CPE325/Lab10_Part2/Debug/ccsObjs.opt
Normal file
@ -0,0 +1 @@
|
||||
"./Lab10_Part2.obj" "../lnk_msp430fg4618.cmd" -llibc.a
|
42
CPE325/Lab10_Part2/Debug/main.d
Normal file
42
CPE325/Lab10_Part2/Debug/main.d
Normal file
@ -0,0 +1,42 @@
|
||||
# FIXED
|
||||
|
||||
main.obj: ../main.c
|
||||
main.obj: C:/ti/ccs1040/ccs/ccs_base/msp430/include/msp430xG46x.h
|
||||
main.obj: C:/ti/ccs1040/ccs/ccs_base/msp430/include/in430.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics_legacy_undefs.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/math.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_ti_config.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/linkage.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_defs.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/_types.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/cdefs.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_types.h
|
||||
main.obj: C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_limits.h
|
||||
|
||||
../main.c:
|
||||
|
||||
C:/ti/ccs1040/ccs/ccs_base/msp430/include/msp430xG46x.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/ccs_base/msp430/include/in430.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/intrinsics_legacy_undefs.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/math.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_ti_config.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/linkage.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/_defs.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/_types.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/sys/cdefs.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_types.h:
|
||||
|
||||
C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include/machine/_limits.h:
|
||||
|
166
CPE325/Lab10_Part2/Debug/makefile
Normal file
166
CPE325/Lab10_Part2/Debug/makefile
Normal file
@ -0,0 +1,166 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL = cmd.exe
|
||||
|
||||
CG_TOOL_ROOT := C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS
|
||||
|
||||
GEN_OPTS__FLAG :=
|
||||
GEN_CMDS__FLAG :=
|
||||
|
||||
ORDERED_OBJS += \
|
||||
"./Lab10_Part2.obj" \
|
||||
"../lnk_msp430fg4618.cmd" \
|
||||
$(GEN_CMDS__FLAG) \
|
||||
-llibc.a \
|
||||
|
||||
-include ../makefile.init
|
||||
|
||||
RM := DEL /F
|
||||
RMDIR := RMDIR /S/Q
|
||||
|
||||
# All of the sources participating in the build are defined here
|
||||
-include sources.mk
|
||||
-include subdir_vars.mk
|
||||
-include subdir_rules.mk
|
||||
-include objects.mk
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C55_DEPS)),)
|
||||
-include $(C55_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C_UPPER_DEPS)),)
|
||||
-include $(C_UPPER_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S67_DEPS)),)
|
||||
-include $(S67_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S62_DEPS)),)
|
||||
-include $(S62_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S_DEPS)),)
|
||||
-include $(S_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(OPT_DEPS)),)
|
||||
-include $(OPT_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C??_DEPS)),)
|
||||
-include $(C??_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(ASM_UPPER_DEPS)),)
|
||||
-include $(ASM_UPPER_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S??_DEPS)),)
|
||||
-include $(S??_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C64_DEPS)),)
|
||||
-include $(C64_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(CXX_DEPS)),)
|
||||
-include $(CXX_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S64_DEPS)),)
|
||||
-include $(S64_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(INO_DEPS)),)
|
||||
-include $(INO_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(CLA_DEPS)),)
|
||||
-include $(CLA_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S55_DEPS)),)
|
||||
-include $(S55_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(SV7A_DEPS)),)
|
||||
-include $(SV7A_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C62_DEPS)),)
|
||||
-include $(C62_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C67_DEPS)),)
|
||||
-include $(C67_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(PDE_DEPS)),)
|
||||
-include $(PDE_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(K_DEPS)),)
|
||||
-include $(K_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(CC_DEPS)),)
|
||||
-include $(CC_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C++_DEPS)),)
|
||||
-include $(C++_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(C43_DEPS)),)
|
||||
-include $(C43_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S43_DEPS)),)
|
||||
-include $(S43_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(ASM_DEPS)),)
|
||||
-include $(ASM_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(S_UPPER_DEPS)),)
|
||||
-include $(S_UPPER_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(CPP_DEPS)),)
|
||||
-include $(CPP_DEPS)
|
||||
endif
|
||||
ifneq ($(strip $(SA_DEPS)),)
|
||||
-include $(SA_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
-include ../makefile.defs
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
EXE_OUTPUTS += \
|
||||
Lab10_Part2.out \
|
||||
|
||||
EXE_OUTPUTS__QUOTED += \
|
||||
"Lab10_Part2.out" \
|
||||
|
||||
BIN_OUTPUTS += \
|
||||
Lab10_Part2.hex \
|
||||
|
||||
BIN_OUTPUTS__QUOTED += \
|
||||
"Lab10_Part2.hex" \
|
||||
|
||||
|
||||
# All Target
|
||||
all: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
|
||||
@$(MAKE) --no-print-directory -Onone "Lab10_Part2.out"
|
||||
|
||||
# Tool invocations
|
||||
Lab10_Part2.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
|
||||
@echo 'Building target: "$@"'
|
||||
@echo 'Invoking: MSP430 Linker'
|
||||
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/bin/cl430" -vmsp --data_model=small --use_hw_mpy=16 --advice:power=all --define=__MSP430FG4618__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU19 -z -m"Lab10_Part2.map" --heap_size=80 --stack_size=80 --cinit_hold_wdt=on -i"C:/ti/ccs1040/ccs/ccs_base/msp430/include" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/lib" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="Lab10_Part2_linkInfo.xml" --use_hw_mpy=16 --rom_model -o "Lab10_Part2.out" $(ORDERED_OBJS)
|
||||
@echo 'Finished building target: "$@"'
|
||||
@echo ' '
|
||||
|
||||
Lab10_Part2.hex: $(EXE_OUTPUTS)
|
||||
@echo 'Building secondary target: "$@"'
|
||||
@echo 'Invoking: MSP430 Hex Utility'
|
||||
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/bin/hex430" --memwidth=8 --romwidth=8 --diag_wrap=off -o "Lab10_Part2.hex" $(EXE_OUTPUTS__QUOTED)
|
||||
@echo 'Finished building secondary target: "$@"'
|
||||
@echo ' '
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(BIN_OUTPUTS__QUOTED)$(EXE_OUTPUTS__QUOTED)
|
||||
-$(RM) "Lab10_Part2.obj"
|
||||
-$(RM) "Lab10_Part2.d"
|
||||
-@echo 'Finished clean'
|
||||
-@echo ' '
|
||||
|
||||
.PHONY: all clean dependents
|
||||
.SECONDARY:
|
||||
|
||||
-include ../makefile.targets
|
||||
|
8
CPE325/Lab10_Part2/Debug/objects.mk
Normal file
8
CPE325/Lab10_Part2/Debug/objects.mk
Normal file
@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS := -llibc.a
|
||||
|
115
CPE325/Lab10_Part2/Debug/sources.mk
Normal file
115
CPE325/Lab10_Part2/Debug/sources.mk
Normal file
@ -0,0 +1,115 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
C55_SRCS :=
|
||||
A_SRCS :=
|
||||
ASM_UPPER_SRCS :=
|
||||
EXE_SRCS :=
|
||||
LDS_UPPER_SRCS :=
|
||||
CPP_SRCS :=
|
||||
CMD_SRCS :=
|
||||
O_SRCS :=
|
||||
ELF_SRCS :=
|
||||
C??_SRCS :=
|
||||
C64_SRCS :=
|
||||
C67_SRCS :=
|
||||
SA_SRCS :=
|
||||
S64_SRCS :=
|
||||
OPT_SRCS :=
|
||||
CXX_SRCS :=
|
||||
S67_SRCS :=
|
||||
S??_SRCS :=
|
||||
PDE_SRCS :=
|
||||
SV7A_SRCS :=
|
||||
K_SRCS :=
|
||||
CLA_SRCS :=
|
||||
S55_SRCS :=
|
||||
LD_UPPER_SRCS :=
|
||||
OUT_SRCS :=
|
||||
INO_SRCS :=
|
||||
LIB_SRCS :=
|
||||
ASM_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
S43_SRCS :=
|
||||
LD_SRCS :=
|
||||
CMD_UPPER_SRCS :=
|
||||
C_UPPER_SRCS :=
|
||||
C++_SRCS :=
|
||||
C43_SRCS :=
|
||||
OBJ_SRCS :=
|
||||
LDS_SRCS :=
|
||||
S_SRCS :=
|
||||
CC_SRCS :=
|
||||
S62_SRCS :=
|
||||
C62_SRCS :=
|
||||
C_SRCS :=
|
||||
C55_DEPS :=
|
||||
C_UPPER_DEPS :=
|
||||
S67_DEPS :=
|
||||
S62_DEPS :=
|
||||
S_DEPS :=
|
||||
OPT_DEPS :=
|
||||
C??_DEPS :=
|
||||
ASM_UPPER_DEPS :=
|
||||
S??_DEPS :=
|
||||
C64_DEPS :=
|
||||
CXX_DEPS :=
|
||||
S64_DEPS :=
|
||||
INO_DEPS :=
|
||||
CLA_DEPS :=
|
||||
S55_DEPS :=
|
||||
SV7A_DEPS :=
|
||||
EXE_OUTPUTS :=
|
||||
C62_DEPS :=
|
||||
C67_DEPS :=
|
||||
PDE_DEPS :=
|
||||
K_DEPS :=
|
||||
C_DEPS :=
|
||||
CC_DEPS :=
|
||||
BIN_OUTPUTS :=
|
||||
C++_DEPS :=
|
||||
C43_DEPS :=
|
||||
S43_DEPS :=
|
||||
OBJS :=
|
||||
ASM_DEPS :=
|
||||
S_UPPER_DEPS :=
|
||||
CPP_DEPS :=
|
||||
SA_DEPS :=
|
||||
C++_DEPS__QUOTED :=
|
||||
OPT_DEPS__QUOTED :=
|
||||
S_UPPER_DEPS__QUOTED :=
|
||||
SA_DEPS__QUOTED :=
|
||||
C??_DEPS__QUOTED :=
|
||||
S67_DEPS__QUOTED :=
|
||||
C55_DEPS__QUOTED :=
|
||||
CC_DEPS__QUOTED :=
|
||||
ASM_UPPER_DEPS__QUOTED :=
|
||||
SV7A_DEPS__QUOTED :=
|
||||
S??_DEPS__QUOTED :=
|
||||
OBJS__QUOTED :=
|
||||
C67_DEPS__QUOTED :=
|
||||
K_DEPS__QUOTED :=
|
||||
S55_DEPS__QUOTED :=
|
||||
INO_DEPS__QUOTED :=
|
||||
C62_DEPS__QUOTED :=
|
||||
C_DEPS__QUOTED :=
|
||||
C_UPPER_DEPS__QUOTED :=
|
||||
C43_DEPS__QUOTED :=
|
||||
CPP_DEPS__QUOTED :=
|
||||
BIN_OUTPUTS__QUOTED :=
|
||||
C64_DEPS__QUOTED :=
|
||||
CXX_DEPS__QUOTED :=
|
||||
CLA_DEPS__QUOTED :=
|
||||
S_DEPS__QUOTED :=
|
||||
ASM_DEPS__QUOTED :=
|
||||
S43_DEPS__QUOTED :=
|
||||
EXE_OUTPUTS__QUOTED :=
|
||||
S64_DEPS__QUOTED :=
|
||||
S62_DEPS__QUOTED :=
|
||||
PDE_DEPS__QUOTED :=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS := \
|
||||
. \
|
||||
|
15
CPE325/Lab10_Part2/Debug/subdir_rules.mk
Normal file
15
CPE325/Lab10_Part2/Debug/subdir_rules.mk
Normal file
@ -0,0 +1,15 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL = cmd.exe
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
%.obj: ../%.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
|
||||
@echo 'Building file: "$<"'
|
||||
@echo 'Invoking: MSP430 Compiler'
|
||||
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/bin/cl430" -vmsp --data_model=small --use_hw_mpy=16 --include_path="C:/ti/ccs1040/ccs/ccs_base/msp430/include" --include_path="C:/CPE325_Workspace/Lab10_Part2" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-msp430_20.2.5.LTS/include" --advice:power=all --define=__MSP430FG4618__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU19 --preproc_with_compile --preproc_dependency="$(basename $(<F)).d_raw" $(GEN_OPTS__FLAG) "$<"
|
||||
@echo 'Finished building: "$<"'
|
||||
@echo ' '
|
||||
|
||||
|
29
CPE325/Lab10_Part2/Debug/subdir_vars.mk
Normal file
29
CPE325/Lab10_Part2/Debug/subdir_vars.mk
Normal file
@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL = cmd.exe
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
CMD_SRCS += \
|
||||
../lnk_msp430fg4618.cmd
|
||||
|
||||
C_SRCS += \
|
||||
../Lab10_Part2.c
|
||||
|
||||
C_DEPS += \
|
||||
./Lab10_Part2.d
|
||||
|
||||
OBJS += \
|
||||
./Lab10_Part2.obj
|
||||
|
||||
OBJS__QUOTED += \
|
||||
"Lab10_Part2.obj"
|
||||
|
||||
C_DEPS__QUOTED += \
|
||||
"Lab10_Part2.d"
|
||||
|
||||
C_SRCS__QUOTED += \
|
||||
"../Lab10_Part2.c"
|
||||
|
||||
|
117
CPE325/Lab10_Part2/Lab10_Part2.c
Normal file
117
CPE325/Lab10_Part2/Lab10_Part2.c
Normal file
@ -0,0 +1,117 @@
|
||||
|
||||
#include <msp430xG46x.h>
|
||||
#include <math.h>
|
||||
|
||||
volatile long int ADCXval, ADCYval, ADCZval;
|
||||
volatile float Xper, Yper, Zper, M;
|
||||
|
||||
#define SW1_PRESSED ((BIT0&P1IFG)==0) // SW1 Status
|
||||
|
||||
void TimerA_setup(void) {
|
||||
TACCR0 = 3277; // 3277 / 32768 Hz = 0.1s
|
||||
TACTL = TASSEL_1 + MC_1; // ACLK, up mode
|
||||
TACCTL0 = CCIE; // Enabled interrupt
|
||||
}
|
||||
|
||||
void ADC_setup(void) {
|
||||
int i =0;
|
||||
_EINT(); // Enable interrupts
|
||||
P1IE |= BIT1; // P1.1 interrupt enabled
|
||||
P1IES |= BIT1; // P1.1 hi/low edge
|
||||
P1IFG &= ~BIT1; // P1.1 IFG cleared
|
||||
P2DIR |= BIT2; // Set P2 output direction
|
||||
P2OUT &= ~BIT2; // Turn Off LED2
|
||||
P6DIR &= ~BIT3 + ~BIT5 + ~BIT7; // Configure P6.3, P6.5, and P6.7 as input pins
|
||||
P6SEL |= BIT3 + BIT5 + BIT7; // Configure P6.3, P6.5, and P6.7 as analog pins
|
||||
// P6DIR &= ~BIT2 + ~BIT4 + ~BIT6; // Configure P6.3, P6.5, and P6.7 as input pins
|
||||
// P6SEL |= BIT2+ BIT4 + BIT6; // Configure P6.3, P6.5, and P6.7 as analog pins
|
||||
ADC12CTL0 = ADC12ON + SHT0_6 + MSC; // configure ADC converter
|
||||
ADC12CTL1 = SHP + CONSEQ_1; // Use sample timer, single sequence
|
||||
ADC12MCTL0 = INCH_3; // ADC A3 pin - Stick Z-axis
|
||||
ADC12MCTL1 = INCH_5; // ADC A5 pin - Stick Y-axis
|
||||
ADC12MCTL2 = INCH_7 + EOS; // ADC A7 pin - Stick X-axis
|
||||
// ADC12MCTL0 = INCH_2; // ADC A3 pin - Z-axis
|
||||
// ADC12MCTL1 = INCH_4; // ADC A5 pin - Y-axis
|
||||
// ADC12MCTL2 = INCH_6 + EOS; // ADC A7 pin - X-axis
|
||||
// EOS - End of Sequence for Conversions
|
||||
ADC12IE |= 0x03; // Enable ADC12IFG.1
|
||||
for (i = 0; i < 0x3600; i++); // Delay for reference start-up
|
||||
ADC12CTL0 |= ENC; // Enable conversions
|
||||
}
|
||||
|
||||
void UART_putCharacter(char c) {
|
||||
while(!(IFG2 & UCA0TXIFG)); // Wait for previous character to be sent
|
||||
UCA0TXBUF = c; // Send byte to the buffer for transmitting
|
||||
}
|
||||
|
||||
void UART_setup(void) {
|
||||
P2SEL |= BIT4 + BIT5; // Set up Rx and Tx bits
|
||||
UCA0CTL0 = 0; // Set up default RS-232 protocol
|
||||
UCA0CTL1 |= BIT0 + UCSSEL_2; // Disable device, set clock
|
||||
UCA0BR0 = 27; // 1048576 Hz / 38400
|
||||
UCA0BR1 = 0;
|
||||
UCA0MCTL = 0x94;
|
||||
UCA0CTL1 &= ~BIT0; // Start UART device
|
||||
}
|
||||
|
||||
void sendData(void) {
|
||||
int i;
|
||||
Xper = (((ADCXval*(3.0/4095)) - 1.5)/0.3); // Calculate percentage outputs
|
||||
Yper = (((ADCYval*(3.0/4095)) - 1.5)/0.3);
|
||||
Zper = (((ADCZval*(3.0/4095)) - 1.5)/0.3);
|
||||
M = sqrt(pow(Xper,2)+pow(Yper,2)+pow(Zper,2));
|
||||
if(M > 2){
|
||||
P2OUT |= BIT2; //Turn LED1 on
|
||||
}
|
||||
// Use character pointers to send one byte at a time
|
||||
char *xpointer=(char *)&Xper;
|
||||
char *ypointer=(char *)&Yper;
|
||||
char *zpointer=(char *)&Zper;
|
||||
|
||||
UART_putCharacter(0x55); // Send header
|
||||
for(i = 0; i < 4; i++) { // Send x percentage - one byte at a time
|
||||
UART_putCharacter(xpointer[i]);
|
||||
}
|
||||
for(i = 0; i < 4; i++) { // Send y percentage - one byte at a time
|
||||
UART_putCharacter(ypointer[i]);
|
||||
}
|
||||
for(i = 0; i < 4; i++) { // Send y percentage - one byte at a time
|
||||
UART_putCharacter(zpointer[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void main(void) {
|
||||
WDTCTL = WDTPW +WDTHOLD; // Stop WDT
|
||||
TimerA_setup(); // Setup timer to send ADC data
|
||||
ADC_setup(); // Setup ADC
|
||||
UART_setup(); // Setup UART for RS-232
|
||||
_EINT();
|
||||
while (1){
|
||||
ADC12CTL0 |= ADC12SC; // Start conversions
|
||||
__bis_SR_register(LPM0_bits + GIE); // Enter LPM0
|
||||
}
|
||||
}
|
||||
|
||||
#pragma vector = ADC12_VECTOR
|
||||
__interrupt void ADC12ISR(void) {
|
||||
ADCXval = ADC12MEM0; // Move results, IFG is cleared
|
||||
ADCYval = ADC12MEM1;
|
||||
ADCZval = ADC12MEM2;
|
||||
__bic_SR_register_on_exit(LPM0_bits); // Exit LPM0
|
||||
}
|
||||
|
||||
#pragma vector = TIMERA0_VECTOR
|
||||
__interrupt void timerA_isr() {
|
||||
sendData(); // Send data to serial app
|
||||
__bic_SR_register_on_exit(LPM0_bits); // Exit LPM0
|
||||
}
|
||||
|
||||
// Port 1 interrupt service routine
|
||||
#pragma vector = PORT2_VECTOR
|
||||
__interrupt void Port2_ISR (void) {
|
||||
if(!SW1_PRESSED){
|
||||
P2OUT &= ~BIT2;
|
||||
P1IES |= BIT1; // P1.1 hi/low edge
|
||||
P1IFG &= ~BIT1; // P1.1 IFG cleared
|
||||
}
|
||||
}
|
184
CPE325/Lab10_Part2/lnk_msp430fg4618.cmd
Executable file
184
CPE325/Lab10_Part2/lnk_msp430fg4618.cmd
Executable file
@ -0,0 +1,184 @@
|
||||
/* ============================================================================ */
|
||||
/* Copyright (c) 2020, 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. */
|
||||
/* ============================================================================ */
|
||||
|
||||
/******************************************************************************/
|
||||
/* lnk_msp430fg4618.cmd - LINKER COMMAND FILE FOR LINKING MSP430FG4618 PROGRAMS */
|
||||
/* */
|
||||
/* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */
|
||||
/* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* These linker options are for command line linking only. For IDE linking, */
|
||||
/* you should set your linker options in Project Properties */
|
||||
/* -c LINK USING C CONVENTIONS */
|
||||
/* -stack 0x0100 SOFTWARE STACK SIZE */
|
||||
/* -heap 0x0100 HEAP AREA SIZE */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Version: 1.211 */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/****************************************************************************/
|
||||
/* Specify the system memory map */
|
||||
/****************************************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
SFR : origin = 0x0000, length = 0x0010
|
||||
PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
|
||||
PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
|
||||
RAM : origin = 0x1100, length = 0x2000
|
||||
INFOA : origin = 0x1080, length = 0x0080
|
||||
INFOB : origin = 0x1000, length = 0x0080
|
||||
FLASH : origin = 0x3100, length = 0xCEBE
|
||||
FLASH2 : origin = 0x10000,length = 0x10000
|
||||
BSLSIGNATURE : origin = 0xFFBE, length = 0x0002, fill = 0xFFFF
|
||||
INT00 : origin = 0xFFC0, length = 0x0002
|
||||
INT01 : origin = 0xFFC2, length = 0x0002
|
||||
INT02 : origin = 0xFFC4, length = 0x0002
|
||||
INT03 : origin = 0xFFC6, length = 0x0002
|
||||
INT04 : origin = 0xFFC8, length = 0x0002
|
||||
INT05 : origin = 0xFFCA, length = 0x0002
|
||||
INT06 : origin = 0xFFCC, length = 0x0002
|
||||
INT07 : origin = 0xFFCE, length = 0x0002
|
||||
INT08 : origin = 0xFFD0, length = 0x0002
|
||||
INT09 : origin = 0xFFD2, length = 0x0002
|
||||
INT10 : origin = 0xFFD4, length = 0x0002
|
||||
INT11 : origin = 0xFFD6, length = 0x0002
|
||||
INT12 : origin = 0xFFD8, length = 0x0002
|
||||
INT13 : origin = 0xFFDA, length = 0x0002
|
||||
INT14 : origin = 0xFFDC, length = 0x0002
|
||||
INT15 : origin = 0xFFDE, length = 0x0002
|
||||
INT16 : origin = 0xFFE0, length = 0x0002
|
||||
INT17 : origin = 0xFFE2, length = 0x0002
|
||||
INT18 : origin = 0xFFE4, length = 0x0002
|
||||
INT19 : origin = 0xFFE6, length = 0x0002
|
||||
INT20 : origin = 0xFFE8, length = 0x0002
|
||||
INT21 : origin = 0xFFEA, length = 0x0002
|
||||
INT22 : origin = 0xFFEC, length = 0x0002
|
||||
INT23 : origin = 0xFFEE, length = 0x0002
|
||||
INT24 : origin = 0xFFF0, length = 0x0002
|
||||
INT25 : origin = 0xFFF2, length = 0x0002
|
||||
INT26 : origin = 0xFFF4, length = 0x0002
|
||||
INT27 : origin = 0xFFF6, length = 0x0002
|
||||
INT28 : origin = 0xFFF8, length = 0x0002
|
||||
INT29 : origin = 0xFFFA, length = 0x0002
|
||||
INT30 : origin = 0xFFFC, length = 0x0002
|
||||
RESET : origin = 0xFFFE, length = 0x0002
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Specify the sections allocation into memory */
|
||||
/****************************************************************************/
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.bss : {} > RAM /* Global & static vars */
|
||||
.data : {} > RAM /* Global & static vars */
|
||||
.TI.noinit : {} > RAM /* For #pragma noinit */
|
||||
.sysmem : {} > RAM /* Dynamic memory allocation area */
|
||||
.stack : {} > RAM (HIGH) /* Software system stack */
|
||||
|
||||
#ifndef __LARGE_CODE_MODEL__
|
||||
.text : {} > FLASH /* Code */
|
||||
#else
|
||||
.text : {} >> FLASH2 | FLASH /* Code */
|
||||
#endif
|
||||
.text:_isr : {} > FLASH /* ISR Code space */
|
||||
.cinit : {} > FLASH /* Initialization tables */
|
||||
#ifndef __LARGE_DATA_MODEL__
|
||||
.const : {} > FLASH /* Constant data */
|
||||
#else
|
||||
.const : {} >> FLASH | FLASH2 /* Constant data */
|
||||
#endif
|
||||
.bslsignature : {} > BSLSIGNATURE /* BSL Signature */
|
||||
.cio : {} > RAM /* C I/O Buffer */
|
||||
|
||||
.pinit : {} > FLASH /* C++ Constructor tables */
|
||||
.binit : {} > FLASH /* Boot-time Initialization tables */
|
||||
.init_array : {} > FLASH /* C++ Constructor tables */
|
||||
.mspabi.exidx : {} > FLASH /* C++ Constructor tables */
|
||||
.mspabi.extab : {} > FLASH /* C++ Constructor tables */
|
||||
#ifdef __TI_COMPILER_VERSION__
|
||||
#if __TI_COMPILER_VERSION__ >= 15009000
|
||||
#ifndef __LARGE_CODE_MODEL__
|
||||
.TI.ramfunc : {} load=FLASH, run=RAM, table(BINIT)
|
||||
#else
|
||||
.TI.ramfunc : {} load=FLASH | FLASH2, run=RAM, table(BINIT)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
.infoA : {} > INFOA /* MSP430 INFO FLASH Memory segments */
|
||||
.infoB : {} > INFOB
|
||||
|
||||
/* MSP430 Interrupt vectors */
|
||||
.int00 : {} > INT00
|
||||
.int01 : {} > INT01
|
||||
.int02 : {} > INT02
|
||||
.int03 : {} > INT03
|
||||
.int04 : {} > INT04
|
||||
.int05 : {} > INT05
|
||||
.int06 : {} > INT06
|
||||
.int07 : {} > INT07
|
||||
.int08 : {} > INT08
|
||||
.int09 : {} > INT09
|
||||
.int10 : {} > INT10
|
||||
.int11 : {} > INT11
|
||||
.int12 : {} > INT12
|
||||
.int13 : {} > INT13
|
||||
DAC12 : { * ( .int14 ) } > INT14 type = VECT_INIT
|
||||
DMA : { * ( .int15 ) } > INT15 type = VECT_INIT
|
||||
BASICTIMER : { * ( .int16 ) } > INT16 type = VECT_INIT
|
||||
PORT2 : { * ( .int17 ) } > INT17 type = VECT_INIT
|
||||
USART1TX : { * ( .int18 ) } > INT18 type = VECT_INIT
|
||||
USART1RX : { * ( .int19 ) } > INT19 type = VECT_INIT
|
||||
PORT1 : { * ( .int20 ) } > INT20 type = VECT_INIT
|
||||
TIMERA1 : { * ( .int21 ) } > INT21 type = VECT_INIT
|
||||
TIMERA0 : { * ( .int22 ) } > INT22 type = VECT_INIT
|
||||
ADC12 : { * ( .int23 ) } > INT23 type = VECT_INIT
|
||||
USCIAB0TX : { * ( .int24 ) } > INT24 type = VECT_INIT
|
||||
USCIAB0RX : { * ( .int25 ) } > INT25 type = VECT_INIT
|
||||
WDT : { * ( .int26 ) } > INT26 type = VECT_INIT
|
||||
COMPARATORA : { * ( .int27 ) } > INT27 type = VECT_INIT
|
||||
TIMERB1 : { * ( .int28 ) } > INT28 type = VECT_INIT
|
||||
TIMERB0 : { * ( .int29 ) } > INT29 type = VECT_INIT
|
||||
NMI : { * ( .int30 ) } > INT30 type = VECT_INIT
|
||||
.reset : {} > RESET /* MSP430 Reset vector */
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* Include peripherals memory map */
|
||||
/****************************************************************************/
|
||||
|
||||
-l msp430fg4618.cmd
|
||||
|
12
CPE325/Lab10_Part2/targetConfigs/MSP430FG4618.ccxml
Normal file
12
CPE325/Lab10_Part2/targetConfigs/MSP430FG4618.ccxml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
<configuration XML_version="1.2" id="configuration_0">
|
||||
<instance XML_version="1.2" desc="TI MSP430 USB1" href="connections/TIMSP430-USB.xml" id="TI MSP430 USB1" xml="TIMSP430-USB.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="TI MSP430 USB1">
|
||||
<instance XML_version="1.2" href="drivers/msp430_emu.xml" id="drivers" xml="msp430_emu.xml" xmlpath="drivers"/>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="MSP430FG4618" href="devices/MSP430FG4618.xml" id="MSP430FG4618" xml="MSP430FG4618.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
</connection>
|
||||
</configuration>
|
||||
</configurations>
|
9
CPE325/Lab10_Part2/targetConfigs/readme.txt
Normal file
9
CPE325/Lab10_Part2/targetConfigs/readme.txt
Normal file
@ -0,0 +1,9 @@
|
||||
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
|
||||
on the device and connection settings specified in your project on the Properties > General page.
|
||||
|
||||
Please note that in automatic target-configuration management, changes to the project's device and/or
|
||||
connection settings will either modify an existing or generate a new target-configuration file. Thus,
|
||||
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
|
||||
you may create your own target-configuration file for this project and manage it manually. You can
|
||||
always switch back to automatic target-configuration management by checking the "Manage the project's
|
||||
target-configuration automatically" checkbox on the project's Properties > General page.
|
Reference in New Issue
Block a user