Commit 1b6e15b4 by Víctor Elexpe

Initial version of lab files

parents
Showing with 2706 additions and 0 deletions
File added
<?xml version="1.0" encoding="UTF-8" ?>
<?ccsproject version="1.0"?>
<projectOptions>
<deviceVariant value="Cortex M.TM4C123GH6PM"/>
<deviceFamily value="TMS470"/>
<deviceEndianness value="little"/>
<codegenToolVersion value="5.2.4"/>
<isElfFormat value="true"/>
<connection value="common/targetdb/connections/Stellaris_ICDI_Connection.xml"/>
<linkerCommandFile value="tm4c123gh6pm.cmd"/>
<rts value="libc.a"/>
<createSlaveProjects value=""/>
<templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
<isTargetManual value="false"/>
</projectOptions>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging">
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_CPUS_WITH_PROJECT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;cpus_with_project&gt;&#13;&#10;&lt;id id=&quot;Stellaris In-Circuit Debug Interface/CORTEX_M4_0&quot; isa=&quot;CORTEX_M4&quot;/&gt;&#13;&#10;&lt;/cpus_with_project&gt;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="${build_artifact:CC3100GetWeather_4C123}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="CC3100GetWeather_4C123"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:CC3100GetWeather_4C123}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="D:/Dropbox\ArmBook\LaunchPad\ValvanoWareTM4C123\CC3100GetWeather_4C123\Debug\CC3100GetWeather_4C123.out"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/CC3100GetWeather_4C123"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="com.ti.ccstudio.debug.sourceLocator"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;cpuSpecificContainer cpuName=&amp;quot;Stellaris In-Circuit Debug Interface/CORTEX_M4_0&amp;quot;&amp;gt;&amp;#13;&amp;#10;&amp;lt;childContainerEntry childMemento=&amp;quot;&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; standalone=&amp;amp;quot;no&amp;amp;quot;?&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;amp;lt;project name=&amp;amp;quot;CC3100GetWeather_4C123&amp;amp;quot; referencedProjects=&amp;amp;quot;true&amp;amp;quot;/&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;quot; childType=&amp;quot;org.eclipse.debug.core.containerType.project&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&amp;lt;childContainerEntry childMemento=&amp;quot;&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; standalone=&amp;amp;quot;no&amp;amp;quot;?&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;amp;lt;default/&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;quot; childType=&amp;quot;org.eclipse.debug.core.containerType.default&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&amp;lt;childContainerEntry childMemento=&amp;quot;&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; standalone=&amp;amp;quot;no&amp;amp;quot;?&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;amp;lt;librarySource/&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;quot; childType=&amp;quot;com.ti.ccstudio.debug.containerType.library.source&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&amp;lt;/cpuSpecificContainer&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;com.ti.ccstudio.debug.containerType.cpu.specific&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging">
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_CPUS_WITH_PROJECT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;cpus_with_project&gt;&#13;&#10;&lt;id id=&quot;Stellaris In-Circuit Debug Interface/CORTEX_M4_0&quot; isa=&quot;CORTEX_M4&quot;/&gt;&#13;&#10;&lt;/cpus_with_project&gt;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;FlashCrystalFreq&quot;&gt;&#10; &lt;curValue&gt;16&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="${build_artifact:GetWeather_4C123}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="GetWeather_4C123"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:GetWeather_4C123}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.Stellaris In-Circuit Debug Interface/CORTEX_M4_0" value="D:/Dropbox\ArmBook\LaunchPad\ValvanoWaveTM4C123\GetWeather_4C123\Debug\GetWeather_4C123.out"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/GetWeather_4C123"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="com.ti.ccstudio.debug.sourceLocator"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;cpuSpecificContainer cpuName=&amp;quot;Stellaris In-Circuit Debug Interface/CORTEX_M4_0&amp;quot;&amp;gt;&amp;#13;&amp;#10;&amp;lt;childContainerEntry childMemento=&amp;quot;&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; standalone=&amp;amp;quot;no&amp;amp;quot;?&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;amp;lt;project name=&amp;amp;quot;GetWeather_4C123&amp;amp;quot; referencedProjects=&amp;amp;quot;true&amp;amp;quot;/&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;quot; childType=&amp;quot;org.eclipse.debug.core.containerType.project&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&amp;lt;childContainerEntry childMemento=&amp;quot;&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; standalone=&amp;amp;quot;no&amp;amp;quot;?&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;amp;lt;default/&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;quot; childType=&amp;quot;org.eclipse.debug.core.containerType.default&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&amp;lt;childContainerEntry childMemento=&amp;quot;&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot; standalone=&amp;amp;quot;no&amp;amp;quot;?&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;amp;lt;librarySource/&amp;amp;gt;&amp;amp;#13;&amp;amp;#10;&amp;quot; childType=&amp;quot;com.ti.ccstudio.debug.containerType.library.source&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&amp;lt;/cpuSpecificContainer&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;com.ti.ccstudio.debug.containerType.cpu.specific&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>CC3100GetWeather_4C123</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.ti.ccstudio.core.ccsNature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>board.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/platform/ek-tm4c123gxl/board.c</locationURI>
</link>
<link>
<name>device.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/device.c</locationURI>
</link>
<link>
<name>driver.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/driver.c</locationURI>
</link>
<link>
<name>flowcont.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/flowcont.c</locationURI>
</link>
<link>
<name>fs.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/fs.c</locationURI>
</link>
<link>
<name>netapp.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/netapp.c</locationURI>
</link>
<link>
<name>netcfg.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/netcfg.c</locationURI>
</link>
<link>
<name>nonos.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/nonos.c</locationURI>
</link>
<link>
<name>socket.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/socket.c</locationURI>
</link>
<link>
<name>spawn.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/spawn.c</locationURI>
</link>
<link>
<name>spi.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/platform/ek-tm4c123gxl/spi.c</locationURI>
</link>
<link>
<name>uart.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/platform/ek-tm4c123gxl/uart.c</locationURI>
</link>
<link>
<name>uartstdio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/platform/ek-tm4c123gxl/uartstdio.c</locationURI>
</link>
<link>
<name>ustdlib.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/platform/ek-tm4c123gxl/ustdlib.c</locationURI>
</link>
<link>
<name>wlan.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/CC3100/simplelink/source/wlan.c</locationURI>
</link>
</linkedResources>
</projectDescription>
This source diff could not be displayed because it is too large. You can view the blob instead.
"./LED.obj" "./Nokia5110.obj" "./board.obj" "./device.obj" "./driver.obj" "./flowcont.obj" "./fs.obj" "./main.obj" "./netapp.obj" "./netcfg.obj" "./nonos.obj" "./socket.obj" "./spawn.obj" "./spi.obj" "./startup_ccs.obj" "./uart.obj" "./uartstdio.obj" "./ustdlib.obj" "./wlan.obj" "../tm4c123gh6pm.cmd" -l"libc.a" -l"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123\driverlib\ccs\Debug\driverlib.lib"
\ No newline at end of file
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
SHELL = cmd.exe
CG_TOOL_ROOT := C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4
ORDERED_OBJS += \
"./LED.obj" \
"./Nokia5110.obj" \
"./board.obj" \
"./device.obj" \
"./driver.obj" \
"./flowcont.obj" \
"./fs.obj" \
"./main.obj" \
"./netapp.obj" \
"./netcfg.obj" \
"./nonos.obj" \
"./socket.obj" \
"./spawn.obj" \
"./spi.obj" \
"./startup_ccs.obj" \
"./uart.obj" \
"./uartstdio.obj" \
"./ustdlib.obj" \
"./wlan.obj" \
"../tm4c123gh6pm.cmd" \
$(GEN_CMDS__FLAG) \
-l"libc.a" \
-l"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123\driverlib\ccs\Debug\driverlib.lib" \
-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 $(S_DEPS)),)
-include $(S_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
ifneq ($(strip $(S62_DEPS)),)
-include $(S62_DEPS)
endif
ifneq ($(strip $(C64_DEPS)),)
-include $(C64_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(S55_DEPS)),)
-include $(S55_DEPS)
endif
ifneq ($(strip $(C67_DEPS)),)
-include $(C67_DEPS)
endif
ifneq ($(strip $(CLA_DEPS)),)
-include $(CLA_DEPS)
endif
ifneq ($(strip $(C??_DEPS)),)
-include $(C??_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(S??_DEPS)),)
-include $(S??_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(C62_DEPS)),)
-include $(C62_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(ASM_UPPER_DEPS)),)
-include $(ASM_UPPER_DEPS)
endif
ifneq ($(strip $(K_DEPS)),)
-include $(K_DEPS)
endif
ifneq ($(strip $(C43_DEPS)),)
-include $(C43_DEPS)
endif
ifneq ($(strip $(INO_DEPS)),)
-include $(INO_DEPS)
endif
ifneq ($(strip $(S67_DEPS)),)
-include $(S67_DEPS)
endif
ifneq ($(strip $(SA_DEPS)),)
-include $(SA_DEPS)
endif
ifneq ($(strip $(S43_DEPS)),)
-include $(S43_DEPS)
endif
ifneq ($(strip $(OPT_DEPS)),)
-include $(OPT_DEPS)
endif
ifneq ($(strip $(PDE_DEPS)),)
-include $(PDE_DEPS)
endif
ifneq ($(strip $(S64_DEPS)),)
-include $(S64_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(C55_DEPS)),)
-include $(C55_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
EXE_OUTPUTS += \
CC3100GetWeather_4C123.out \
EXE_OUTPUTS__QUOTED += \
"CC3100GetWeather_4C123.out" \
BIN_OUTPUTS += \
CC3100GetWeather_4C123.hex \
BIN_OUTPUTS__QUOTED += \
"CC3100GetWeather_4C123.hex" \
# All Target
all: CC3100GetWeather_4C123.out
# Tool invocations
CC3100GetWeather_4C123.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
@echo 'Building target: $@'
@echo 'Invoking: ARM Linker'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --c99 --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PM --display_error_number --diag_warning=225 --diag_wrap=off -z -m"CC3100GetWeather_4C123.map" --heap_size=0 --stack_size=1024 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="CC3100GetWeather_4C123_linkInfo.xml" --rom_model -o "CC3100GetWeather_4C123.out" $(ORDERED_OBJS)
@echo 'Finished building target: $@'
@echo ' '
CC3100GetWeather_4C123.hex: $(EXE_OUTPUTS)
@echo 'Invoking: ARM Hex Utility'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/bin/armhex" -o "CC3100GetWeather_4C123.hex" $(EXE_OUTPUTS__QUOTED)
@echo 'Finished building: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(EXE_OUTPUTS__QUOTED)$(BIN_OUTPUTS__QUOTED)
-$(RM) "LED.pp" "Nokia5110.pp" "board.pp" "device.pp" "driver.pp" "flowcont.pp" "fs.pp" "main.pp" "netapp.pp" "netcfg.pp" "nonos.pp" "socket.pp" "spawn.pp" "spi.pp" "startup_ccs.pp" "uart.pp" "uartstdio.pp" "ustdlib.pp" "wlan.pp"
-$(RM) "LED.obj" "Nokia5110.obj" "board.obj" "device.obj" "driver.obj" "flowcont.obj" "fs.obj" "main.obj" "netapp.obj" "netcfg.obj" "nonos.obj" "socket.obj" "spawn.obj" "spi.obj" "startup_ccs.obj" "uart.obj" "uartstdio.obj" "ustdlib.obj" "wlan.obj"
-@echo 'Finished clean'
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS := -l"libc.a" -l"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/driverlib/ccs/Debug/driverlib.lib"
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
O_SRCS :=
CPP_SRCS :=
K_SRCS :=
LD_SRCS :=
S67_SRCS :=
LDS_SRCS :=
CMD_SRCS :=
EXE_SRCS :=
CXX_SRCS :=
CMD_UPPER_SRCS :=
ELF_SRCS :=
C43_SRCS :=
S55_SRCS :=
LD_UPPER_SRCS :=
C62_SRCS :=
S_UPPER_SRCS :=
A_SRCS :=
SA_SRCS :=
C55_SRCS :=
LDS_UPPER_SRCS :=
C_UPPER_SRCS :=
OUT_SRCS :=
INO_SRCS :=
OBJ_SRCS :=
S62_SRCS :=
LIB_SRCS :=
PDE_SRCS :=
ASM_SRCS :=
ASM_UPPER_SRCS :=
C++_SRCS :=
CLA_SRCS :=
S??_SRCS :=
C_SRCS :=
C67_SRCS :=
S_SRCS :=
S43_SRCS :=
OPT_SRCS :=
C64_SRCS :=
CC_SRCS :=
C??_SRCS :=
S64_SRCS :=
OBJS :=
BIN_OUTPUTS :=
S_DEPS :=
S_UPPER_DEPS :=
S62_DEPS :=
C64_DEPS :=
ASM_DEPS :=
CC_DEPS :=
S55_DEPS :=
C67_DEPS :=
CLA_DEPS :=
C??_DEPS :=
CPP_DEPS :=
S??_DEPS :=
C_DEPS :=
C62_DEPS :=
EXE_OUTPUTS :=
CXX_DEPS :=
C++_DEPS :=
ASM_UPPER_DEPS :=
K_DEPS :=
C43_DEPS :=
INO_DEPS :=
S67_DEPS :=
SA_DEPS :=
S43_DEPS :=
OPT_DEPS :=
PDE_DEPS :=
S64_DEPS :=
C_UPPER_DEPS :=
C55_DEPS :=
CPP_DEPS__QUOTED :=
C67_DEPS__QUOTED :=
INO_DEPS__QUOTED :=
C??_DEPS__QUOTED :=
S_UPPER_DEPS__QUOTED :=
CLA_DEPS__QUOTED :=
ASM_UPPER_DEPS__QUOTED :=
C62_DEPS__QUOTED :=
CXX_DEPS__QUOTED :=
EXE_OUTPUTS__QUOTED :=
S67_DEPS__QUOTED :=
BIN_OUTPUTS__QUOTED :=
C_DEPS__QUOTED :=
C_UPPER_DEPS__QUOTED :=
OPT_DEPS__QUOTED :=
S_DEPS__QUOTED :=
K_DEPS__QUOTED :=
S??_DEPS__QUOTED :=
C64_DEPS__QUOTED :=
C++_DEPS__QUOTED :=
OBJS__QUOTED :=
CC_DEPS__QUOTED :=
S43_DEPS__QUOTED :=
S55_DEPS__QUOTED :=
SA_DEPS__QUOTED :=
C55_DEPS__QUOTED :=
PDE_DEPS__QUOTED :=
C43_DEPS__QUOTED :=
S62_DEPS__QUOTED :=
ASM_DEPS__QUOTED :=
S64_DEPS__QUOTED :=
# Every subdirectory with source files must be described here
SUBDIRS := \
. \
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CMD_SRCS += \
../tm4c123gh6pm.cmd
C_SRCS += \
../LED.c \
../Nokia5110.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/board.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/device.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/driver.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/flowcont.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/fs.c \
../main.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/netapp.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/netcfg.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/nonos.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/socket.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/spawn.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/spi.c \
../startup_ccs.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/uart.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/uartstdio.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/ustdlib.c \
D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/wlan.c
OBJS += \
./LED.obj \
./Nokia5110.obj \
./board.obj \
./device.obj \
./driver.obj \
./flowcont.obj \
./fs.obj \
./main.obj \
./netapp.obj \
./netcfg.obj \
./nonos.obj \
./socket.obj \
./spawn.obj \
./spi.obj \
./startup_ccs.obj \
./uart.obj \
./uartstdio.obj \
./ustdlib.obj \
./wlan.obj
C_DEPS += \
./LED.pp \
./Nokia5110.pp \
./board.pp \
./device.pp \
./driver.pp \
./flowcont.pp \
./fs.pp \
./main.pp \
./netapp.pp \
./netcfg.pp \
./nonos.pp \
./socket.pp \
./spawn.pp \
./spi.pp \
./startup_ccs.pp \
./uart.pp \
./uartstdio.pp \
./ustdlib.pp \
./wlan.pp
C_DEPS__QUOTED += \
"LED.pp" \
"Nokia5110.pp" \
"board.pp" \
"device.pp" \
"driver.pp" \
"flowcont.pp" \
"fs.pp" \
"main.pp" \
"netapp.pp" \
"netcfg.pp" \
"nonos.pp" \
"socket.pp" \
"spawn.pp" \
"spi.pp" \
"startup_ccs.pp" \
"uart.pp" \
"uartstdio.pp" \
"ustdlib.pp" \
"wlan.pp"
OBJS__QUOTED += \
"LED.obj" \
"Nokia5110.obj" \
"board.obj" \
"device.obj" \
"driver.obj" \
"flowcont.obj" \
"fs.obj" \
"main.obj" \
"netapp.obj" \
"netcfg.obj" \
"nonos.obj" \
"socket.obj" \
"spawn.obj" \
"spi.obj" \
"startup_ccs.obj" \
"uart.obj" \
"uartstdio.obj" \
"ustdlib.obj" \
"wlan.obj"
C_SRCS__QUOTED += \
"../LED.c" \
"../Nokia5110.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/board.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/device.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/driver.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/flowcont.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/fs.c" \
"../main.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/netapp.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/netcfg.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/nonos.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/socket.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/spawn.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/spi.c" \
"../startup_ccs.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/uart.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/uartstdio.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/platform/ek-tm4c123gxl/ustdlib.c" \
"D:/Dropbox/ArmBook/LaunchPad/ValvanoWareTM4C123/CC3100/simplelink/source/wlan.c"
// LED.c
// Runs on TM4C123
// Provide functions that initialize a GPIO as an input pin and
// allow reading of two negative logic switches on PF0 and PF4
// Output to LEDs
// Use bit-banded I/O.
// Daniel and Jonathan Valvano
// Feb 23, 2015
#include <stdint.h>
#include "../inc/tm4c123gh6pm.h"
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2014
Section 4.2 Program 4.2
"Embedded Systems: Real Time Interfacing to ARM Cortex M Microcontrollers",
ISBN: 978-1463590154, Jonathan Valvano, copyright (c) 2014
Example 2.3, Program 2.9, Figure 2.36
Copyright 2015 by Jonathan W. Valvano, valvano@mail.utexas.edu
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". 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.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
#define GPIO_LOCK_KEY 0x4C4F434B // Unlocks the GPIO_CR register
#define PF0 (*((volatile uint32_t *)0x40025004))
#define PF4 (*((volatile uint32_t *)0x40025040))
#define SWITCHES (*((volatile uint32_t *)0x40025044))
#define SW1 0x10 // on the left side of the Launchpad board
#define SW2 0x01 // on the right side of the Launchpad board
#define PF1 (*((volatile uint32_t *)0x40025008))
#define PF2 (*((volatile uint32_t *)0x40025010))
#define PF3 (*((volatile uint32_t *)0x40025020))
//------------LED_Init------------
// Initialize GPIO Port F for negative logic switches on PF0 and
// PF4 as the Launchpad is wired. Weak internal pull-up
// resistors are enabled, and the NMI functionality on PF0 is disabled.
// LEDs on PF3,2,1 are enabled
// Input: none
// Output: none
void LED_Init(void){
SYSCTL_RCGCGPIO_R |= 0x20; // 1) activate Port F
while((SYSCTL_PRGPIO_R & 0x20)!=0x20){}; // wait to finish activating
GPIO_PORTF_LOCK_R = GPIO_LOCK_KEY;// 2a) unlock GPIO Port F Commit Register
GPIO_PORTF_CR_R = 0x1F; // 2b) enable commit for PF4-PF0
GPIO_PORTF_AMSEL_R &= ~0x1F; // 3) disable analog functionality on PF4-PF0
GPIO_PORTF_PCTL_R = 0x00000000;// 4) configure PF0-PF4 as GPIO
GPIO_PORTF_DIR_R = 0x0E; // 5) make PF0 and PF4 in PF3-1 output
GPIO_PORTF_AFSEL_R = 0; // 6) disable alt funct on PF0 and PF4
GPIO_PORTF_PUR_R = 0x11; // enable weak pull-up on PF0 and PF4
GPIO_PORTF_DEN_R = 0x1F; // 7) enable digital I/O on PF0-PF4
}
//------------Board_Input------------
// Read and return the status of the switches.
// Input: none
// Output: 2 if only Switch 1 is pressed
// 1 if only Switch 2 is pressed
// 3 if both switches are pressed
// 0 if no switches are pressed
uint32_t Board_Input(void){
return (~((PF4>>3)+PF0))&0x03;
}
//------------LED_RedOn------------
// Turn on red LED
// Input: none
// Output: none
void LED_RedOn(void){
PF1 = 0x02;
}
//------------LED_RedOff------------
// Turn off red LED
// Input: none
// Output: none
void LED_RedOff(void){
PF1 = 0x00;
}
//------------LED_RedToggle------------
// Toggle redv LED
// Input: none
// Output: none
void LED_RedToggle(void){
PF1 ^= 0x02;
}
//------------LED_BlueToggle------------
// Toggle blue LED
// Input: none
// Output: none
void LED_BlueToggle(void){
PF2 ^= 0x04;
}
//------------LED_GreenToggle------------
// Toggle green LED
// Input: none
// Output: none
void LED_GreenToggle(void){
PF3 ^= 0x08;
}
//------------LED_GreenOn------------
// Turn on green LED
// Input: none
// Output: none
void LED_GreenOn(void){
PF3 = 0x08;
}
//------------LED_GreenOff------------
// Turn off green LED
// Input: none
// Output: none
void LED_GreenOff(void){
PF3 = 0x00;
}
// LED.h
// Runs on TM4C123
// Provide functions that initialize a GPIO as an input pin and
// allow reading of two negative logic switches on PF0 and PF4
// Use bit-banded I/O.
// Daniel and Jonathan Valvano
// Feb 23, 2015
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2014
Section 4.2 Program 4.2
"Embedded Systems: Real Time Interfacing to ARM Cortex M Microcontrollers",
ISBN: 978-1463590154, Jonathan Valvano, copyright (c) 2014
Example 2.3, Program 2.9, Figure 2.36
Copyright 2015 by Jonathan W. Valvano, valvano@mail.utexas.edu
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". 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.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
//------------LED_Init------------
// Initialize GPIO Port F for negative logic switches on PF0 and
// PF4 as the Launchpad is wired. Weak internal pull-up
// resistors are enabled, and the NMI functionality on PF0 is disabled.
// LEDs on PF3,2,1 are enabled
// Input: none
// Output: none
void LED_Init(void);
//------------Board_Input------------
// Read and return the status of the switches.
// Input: none
// Output: 2 if only Switch 1 is pressed
// 1 if only Switch 2 is pressed
// 3 if both switches are pressed
// 0 if no switches are pressed
uint32_t Board_Input(void);
//------------LED_RedOn------------
// Turn on red LED
// Input: none
// Output: none
void LED_RedOn(void);
//------------LED_RedOff------------
// Turn off red LED
// Input: none
// Output: none
void LED_RedOff(void);
//------------LED_RedToggle------------
// Toggle redv LED
// Input: none
// Output: none
void LED_RedToggle(void);
//------------LED_BlueToggle------------
// Toggle blue LED
// Input: none
// Output: none
void LED_BlueToggle(void);
//------------LED_GreenToggle------------
// Toggle green LED
// Input: none
// Output: none
void LED_GreenToggle(void);
//------------LED_GreenOn------------
// Turn on green LED
// Input: none
// Output: none
void LED_GreenOn(void);
//------------LED_GreenOff------------
// Turn off green LED
// Input: none
// Output: none
void LED_GreenOff(void);
#******************************************************************************
#
# Makefile - Rules for building the CC3000 Basic WiFi Application.
#
# Copyright (c) 2014 Texas Instruments Incorporated. All rights reserved.
# TI Information - Selective Disclosure
#
#******************************************************************************
#
# Defines the part type that this project uses.
#
PART=TM4C123GH6PM
#
# The base directory for TivaWare.
#
ROOT=../../../..
#
# Include the common make definitions.
#
include ${ROOT}/makedefs
#
# Where to find source files that do not live in this directory.
#
VPATH=../cc3100
VPATH+=../drivers
VPATH+=../cc3100/platform/ek-tm4c123gxl
VPATH+=../cc3100/simplelink/include
VPATH+=../cc3100/simplelink/source
VPATH+=../../../../utils
VPATH+=../../../../utils
#
# Where to find header files that do not live in the source directory.
#
IPATH=..
IPATH+=../
IPATH+=../../../..
IPATH+=../cc3100
IPATH+=../cc3100/platform/ek-tm4c123gxl
IPATH+=../cc3100/simplelink/include
IPATH+=../cc3100/simplelink/source
#
# The default rule, which causes the CC3000 Basic WiFi Application to be built.
#
all: ${COMPILER}
all: ${COMPILER}/cc31000_starter.axf
##### INTERNAL BEGIN #####
all_comp:
@for i in `grep COMPILER= ${ROOT}/makedefs | awk -F= '{print $$2}'`; \
do \
${MAKE} COMPILER=$${i}; \
done
#
# A rule to regenerate the Makefile if config.in has changed.
#
Makefile: config.in
@perl ${ROOT}/scripts/buildproj.pl -s -f config.in
##### INTERNAL END #####
#
# The rule to clean out all the build products.
#
clean:
@rm -rf ${COMPILER} ${wildcard *~}
##### INTERNAL BEGIN #####
@rm -rf settings ${wildcard *.Bak} ${wildcard *.dep}
clean_comp:
@for i in `grep COMPILER= ${ROOT}/makedefs | awk -F= '{print $$2}'`; \
do \
${MAKE} COMPILER=$${i} clean; \
done
#
# Cleans out everything, including the Makefile. Should return this directory
# to fresh from subversion status.
#
realclean:: clean
@rm -rf ccs codered ewarm gcc rvmdk sourcerygxx ccstempws
@rm -f ${wildcard *.Uv2} ${wildcard *.Opt}
@rm -f ${wildcard *.uvopt} ${wildcard *.uvproj}
@rm -f ${wildcard *.ew?} ${wildcard *.xcl}
@rm -f ${wildcard *.sgxx}
@rm -f ccs_proj_args.txt
@rm -f cc31000_starter_ccs.cmd
@rm -f cc31000_starter_codered.ld
@rm -f cc31000_starter.ld
@rm -f cc31000_starter_sourcerygxx.ld
@rm -f ${wildcard *-rom.ld}
@rm -f cc31000_starter.icf
@rm -f cc31000_starter.sct
@rm -f ${wildcard *.xml}
@rm -f ${wildcard startup_*}
@rm -f readme.txt
@rm -f Makefile cr_project.xml
##### INTERNAL END #####
#
# The rule to create the target directory.
#
${COMPILER}:
@mkdir -p ${COMPILER}
#
# Rules for building the CC3000 Basic WiFi Application.
#
${COMPILER}/cc31000_starter.axf: ${COMPILER}/board.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/cmdline.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/device.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/driver.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/flowcont.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/fs.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/netapp.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/netcfg.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/nonos.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/socket.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/spawn.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/spi.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/starter.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/startup_${COMPILER}.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/uart.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/uartstdio.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/ustdlib.o
${COMPILER}/cc31000_starter.axf: ${COMPILER}/wlan.o
${COMPILER}/cc31000_starter.axf: ${ROOT}/driverlib/${COMPILER}/libdriver.a
##### INTERNAL BEGIN #####
ifeq (${COMPILER}, ccs)
${COMPILER}/cc31000_starter.axf: cc31000_starter_ccs.cmd
endif
SCATTERccs_cc31000_starter=cc31000_starter_ccs.cmd
ifeq (${COMPILER}, codered)
${COMPILER}/cc31000_starter.axf: cc31000_starter_codered.ld
endif
SCATTERcodered_cc31000_starter=cc31000_starter_codered.ld
ifeq (${COMPILER}, ewarm)
${COMPILER}/cc31000_starter.axf: cc31000_starter.icf
endif
SCATTERewarm_cc31000_starter=cc31000_starter.icf
ifeq (${COMPILER}, gcc)
##### INTERNAL END #####
${COMPILER}/cc31000_starter.axf: cc31000_starter.ld
##### INTERNAL BEGIN #####
endif
##### INTERNAL END #####
SCATTERgcc_cc31000_starter=cc31000_starter.ld
##### INTERNAL BEGIN #####
ifeq (${COMPILER}, rvmdk)
${COMPILER}/cc31000_starter.axf: cc31000_starter.sct
endif
SCATTERrvmdk_cc31000_starter=cc31000_starter.sct
ifeq (${COMPILER}, sourcerygxx)
${COMPILER}/cc31000_starter.axf: cc31000_starter_sourcerygxx.ld
endif
SCATTERsourcerygxx_cc31000_starter=lm4f120h5qr-rom.ld -T cc31000_starter_sourcerygxx.ld
##### INTERNAL END #####
ENTRY_cc31000_starter=ResetISR
##### INTERNAL BEGIN #####
CFLAGSccs=-D_POSIX_SOURCE -DUART_BUFFERED -DTARGET_IS_TM4C123_RB1
##### INTERNAL END #####
##### INTERNAL BEGIN #####
CFLAGScodered=-D_POSIX_SOURCE -DUART_BUFFERED -DTARGET_IS_TM4C123_RB1
##### INTERNAL END #####
##### INTERNAL BEGIN #####
CFLAGSewarm=-D_POSIX_SOURCE -DUART_BUFFERED -DTARGET_IS_TM4C123_RB1
##### INTERNAL END #####
CFLAGSgcc=-D_POSIX_SOURCE -DUART_BUFFERED -DTARGET_IS_TM4C123_RB1
##### INTERNAL BEGIN #####
CFLAGSrvmdk=-D_POSIX_SOURCE -DUART_BUFFERED -DTARGET_IS_TM4C123_RB1
##### INTERNAL END #####
##### INTERNAL BEGIN #####
CFLAGSsourcerygxx=-D_POSIX_SOURCE -DUART_BUFFERED -DTARGET_IS_TM4C123_RB1
##### INTERNAL END #####
#
# Include the automatically generated dependency files.
#
ifneq (${MAKECMDGOALS},clean)
##### INTERNAL BEGIN #####
ifneq (${MAKECMDGOALS},realclean)
##### INTERNAL END #####
-include ${wildcard ${COMPILER}/*.d} __dummy__
##### INTERNAL BEGIN #####
endif
##### INTERNAL END #####
endif
//*****************************************************************************
//
// application_commands.h - Prototypes for the evaluation board
// command line utils.
//
// Copyright (c) 2014 Texas Instruments Incorporated. All rights reserved.
// TI Information - Selective Disclosure
//
//*****************************************************************************
#ifndef __APPLICATION_COMMANDS_H__
#define __APPLICATION_COMMANDS_H__
//*****************************************************************************
//
// Defines for the command line argument parser provided as a standard part of
// TivaWare.
//
//*****************************************************************************
#define CMDLINE_MAX_ARGS (3)
//*****************************************************************************
//
// Maximum size of command line command buffer.
//
//*****************************************************************************
#define MAX_COMMAND_SIZE (128)
//*****************************************************************************
//
// Success / Fail defines
//
//*****************************************************************************
#define COMMAND_SUCCESS (0)
#define COMMAND_FAIL (-1)
//*****************************************************************************
//
// Sentinel use to make code easier to understand
//
//*****************************************************************************
#define SENTINEL_EMPTY 0xFFFFFFFF
//*****************************************************************************
//
// CC3000 Deffinitions
//
//*****************************************************************************
#define PLATFORM_VERSION (5)
#define UART_COMMAND_CC3000_SIMPLE_CONFIG_START (0x31)
#define UART_COMMAND_CC3000_CONNECT (0x32)
#define UART_COMMAND_SOCKET_OPEN (0x33)
#define UART_COMMAND_SEND_DATA (0x34)
#define UART_COMMAND_RCV_DATA (0x35)
#define UART_COMMAND_BSD_BIND (0x36)
#define UART_COMMAND_SOCKET_CLOSE (0x37)
#define UART_COMMAND_IP_CONFIG (0x38)
#define UART_COMMAND_CC3000_DISCONNECT (0x39)
#define UART_COMMAND_CC3000_DEL_POLICY (0x61)
#define UART_COMMAND_SEND_DNS_ADVERTIZE (0x62)
#define CC3000_APP_BUFFER_SIZE (255)
#define CC3000_RX_BUFFER_OVERHEAD_SIZE (20)
#define DISABLE (0)
#define ENABLE (1)
#define SL_VERSION_LENGTH (11)
#define NETAPP_IPCONFIG_MAC_OFFSET (20)
//*****************************************************************************
//
// Declaration for the callback functions that will implement the command line
// functionality. These functions get called by the command line interpreter
// when the corresponding command is typed into the command line.
//
//*****************************************************************************
extern int CMD_help (int argc, char **argv);
extern int CMD_smartConfig (int argc, char **argv);
extern int CMD_connect (int argc, char **argv);
extern int CMD_socketOpen (int argc, char **argv);
extern int CMD_sendData (int argc, char **argv);
extern int CMD_receiveData (int argc, char **argv);
extern int CMD_bind (int argc, char **argv);
extern int CMD_socketClose (int argc, char **argv);
extern int CMD_ipConfig (int argc, char **argv);
extern int CMD_disconnect (int argc, char **argv);
extern int CMD_deletePolicy (int argc, char **argv);
extern int CMD_mdnsadvertise (int argc, char **argv);
extern int CMD_cc3000reset (int argc, char **argv);
extern int CMD_ping (int argc, char **argv);
#endif // __APPLICATION_COMMANDS_H__
;******************************************************************************
;
; cc31000_starter.sct - Linker configuration file for cc31000_starter.
;
; Copyright (c) 2014 Texas Instruments Incorporated. All rights reserved.
; TI Information - Selective Disclosure
;
;******************************************************************************
LR_IROM 0x00000000 0x00040000
{
;
; Specify the Execution Address of the code and the size.
;
ER_IROM 0x00000000 0x00040000
{
*.o (RESET, +First)
* (InRoot$$Sections, +RO)
}
;
; Specify the Execution Address of the data area.
;
RW_IRAM 0x20000000 0x00008000
{
;
; Uncomment the following line in order to use IntRegister().
;
;* (vtable, +First)
* (+RW, +ZI)
}
}
<?xml version="1.0" encoding="UTF-8"?>
<importSpec>
<source root="..">
<file name=""/>
<file name="starter.c"/>
<file name=""/>
<file regex=".*_ccs\.cmd"/>
<file name="startup_ccs.c"/>
</source>
</importSpec>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="Stellaris In-Circuit Debug Interface_0">
<instance XML_version="1.2" desc="Stellaris In-Circuit Debug Interface_0" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface_0" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface_0">
<instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/stellaris_cortex_m4.xml" id="drivers" xml="stellaris_cortex_m4.xml" xmlpath="drivers"/>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="Stellaris TM4C123GH6PM_0" href="devices/tm4c123gh6pm.xml" id="Stellaris TM4C123GH6PM_0" xml="tm4c123gh6pm.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>
-ccs.name cc31000_starter
-ccs.location C:/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/CC31xxxx/ek-tm4c123gxl-boost-cc3100_starter/ccs
-ccs.device "Cortex M.TM4C123GH6PM"
-ccs.cmd ""
-ccs.rts libc.a
-ccs.overwrite keep
-ccs.endianness little
-ccs.outputFormat ELF
-ccs.outputType executable
-ccs.definePathVariable SW_ROOT "C:\ti\TivaWare_C_Series-2.1.0.12573"
-ccs.definePathVariable SW_PARENT "C:\ti"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/ek-tm4c123gxl-boost-cc3100_starter/starter.c" "."
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/platform/ek-tm4c123gxl/board.c" "cc3100/platform/ek-tm4c123gxl"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/platform/ek-tm4c123gxl/spi.c" "cc3100/platform/ek-tm4c123gxl"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/platform/ek-tm4c123gxl/uart.c" "cc3100/platform/ek-tm4c123gxl"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/device.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/driver.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/flowcont.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/fs.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/netapp.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/netcfg.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/nonos.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/wlan.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/spawn.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/cc3100/simplelink/source/socket.c" "cc3100/simplelink/source"
-ccs.linkFile "SW_ROOT/utils/ustdlib.c" "utils"
-ccs.linkFile "SW_ROOT/utils/cmdline.c" "utils"
-ccs.linkFile "SW_ROOT/utils/uartstdio.c" "utils"
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/ek-tm4c123gxl-boost-cc3100_starter/startup_ccs.c" "."
-ccs.linkFile "SW_ROOT/examples/boards/CC31xxxx/ek-tm4c123gxl-boost-cc3100_starter/cc31000_starter_ccs.cmd" "."
-ccs.setCompilerOptions " --silicon_version=7M4 --float_support=FPv4SPD16 --abi=eabi --code_state=16 --gen_func_subsections=on -O2 --gcc --ual -D=ccs=\"ccs\" -D=PART_TM4C123GH6PM -D=_POSIX_SOURCE -D=UART_BUFFERED -D=TARGET_IS_TM4C123_RB1 -I=\"${SW_ROOT}/examples/boards/CC31xxxx\" -I=\"${SW_ROOT}/examples/boards/CC31xxxx\" -I=\"${SW_ROOT}\" -I=\"${SW_ROOT}/examples/boards/CC31xxxx/cc3100\" -I=\"${SW_ROOT}/examples/boards/CC31xxxx/cc3100/platform/ek-tm4c123gxl\" -I=\"${SW_ROOT}/examples/boards/CC31xxxx/cc3100/simplelink/source\" -I=\"${SW_ROOT}/examples/boards/CC31xxxx/cc3100/simplelink/include\""
-ccs.setLinkerOptions " -m=cc31000_starter_ccs.map --stack_size=16384 --heap_size=0 --rom_model -l \"${SW_ROOT}/driverlib/ccs/Debug/driverlib.lib\""
-ccs.setPostBuildStep "\"${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin\" \"${BuildArtifactFileName}\" \"${BuildArtifactFileBaseName}.bin\" \"${CG_TOOL_ROOT}/bin/armofd\" \"${CG_TOOL_ROOT}/bin/armhex\" \"${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin\""
#******************************************************************************
#
# config.in - Configuration information for the Patch Programmer
#
# Copyright (c) 2014 Texas Instruments Incorporated. All rights reserved.
# TI Information - Selective Disclosure
#
#******************************************************************************
PART=TM4C123GH6PM
TARGET=cc31000_starter
DESC=CC3000 Basic WiFi Application
ROOT=../../../..
COPYRIGHT=2014
STACK=4096
VPATH=../drivers
VPATH+=:../../../../utils
VPATH+=:../cc3100
VPATH+=:../cc3100/platform/ek-tm4c123gxl
VPATH+=:../cc3100/simplelink/source
VPATH+=:../cc3100/simplelink/include
VPATH+=:../../../../utils
IPATH=..
IPATH+=:../
IPATH+=:../../../..
IPATH+=:../cc3100
IPATH+=:../cc3100/platform/ek-tm4c123gxl
IPATH+=:../cc3100/simplelink/source
IPATH+=:../cc3100/simplelink/include
SRC=./starter.c
#SRC+= ./cc3000_basic_wifi_application_commands.c
SRC+= ../cc3100/platform/ek-tm4c123gxl/board.c
SRC+= ../cc3100/platform/ek-tm4c123gxl/spi.c
SRC+= ../cc3100/platform/ek-tm4c123gxl/uart.c
SRC+= ../cc3100/simplelink/source/device.c
SRC+= ../cc3100/simplelink/source/driver.c
SRC+= ../cc3100/simplelink/source/flowcont.c
SRC+= ../cc3100/simplelink/source/fs.c
SRC+= ../cc3100/simplelink/source/netapp.c
SRC+= ../cc3100/simplelink/source/netcfg.c
SRC+= ../cc3100/simplelink/source/nonos.c
SRC+= ../cc3100/simplelink/source/wlan.c
SRC+= ../cc3100/simplelink/source/spawn.c
SRC+= ../cc3100/simplelink/source/socket.c
SRC+= ../../../../utils/ustdlib.c
SRC+= ../../../../utils/cmdline.c
SRC+= ../../../../utils/uartstdio.c
HEADER+=../cc3100/platform/ek-tm4c123gxl/user.h
#DEFINES=CC3000_USE_BOOSTERPACK1
DEFINES=_POSIX_SOURCE
DEFINES+=:UART_BUFFERED
DEFINES+=:TARGET_IS_TM4C123_RB1
#DEFINES+=:CC3000_TM4C123_SPI
DRIVERLIB=1
#SYSTICK=SysTickHandler
GPIOB=GPIOB_intHandler
UART0=UARTStdioIntHandler
#SSI2=SpiIntHandler
#******************************************************************************
#
# filelist.txt - List of files to be included in the release.
#
# Copyright (c) 2013 Texas Instruments Incorporated. All rights reserved.
# TI Information - Selective Disclosure
#
# This lists all files in this directory that should be included in a release.
# Files associated with unannounced parts can be listed with proper marking
# (the typical unannounced begin/end) but internal use only files should not be
# listed and protected.
#
#******************************************************************************
#PROJECT
starter.c
<h1>CC3100GetWeather_4C123 Example</h1>
<!--##### README BEGIN #####-->
Simple starter file
This application will fetch weather data from openweathermap.org
It will request weather by sending "GET /data/2.5/weather?q=Austin%20Texas&units=metric HTTP/1.1\r\nUser-Agent: Keil\r\nHost:api.openweathermap.org\r\nAccept: */*\r\n\r\n"
With all the buzz about the Internet of Things (IoT), we all have considered adding wireless connectivity to our embedded system lab. However, a flood of worries may hold us back, such as cost, complexity, and inertia. This example explains to create a smart object.
Why. With the proliferation of embedded systems and the pervasiveness of the internet, it is only natural to connect the two. IoT is the combination of embedded systems, which have sensors to collect data and actuators to affect the surrounding, and the internet, which provides for ubiquitous remote and secure communication. Traditional education on wireless communication focuses on the theory of communication, which is appropriate for those engineers destined to develop new channels and maintain existing ones. However, it is likely for the embedded system engineer to be asked to connect devices to the internet. Therefore, we should add wireless connectivity to our students’ toolbox so they will be competitive in the job market.
Pedagogical Shift. I am a strong advocate of bottom-up education, which means we start with the basics, teach a topic until the student has full grasp, and then encapsulate and use that topic as we move to teach a higher-level topic. In order to connect to the internet, our device must implement a plethora of details to be fully compatible. The only way to add wireless to an existing embedded system lab is to violate the bottom up rule “students must understand everything about the devices they use” and provide them a working “black box” with which they can experiment. More specifically, we will purchase a hardware/software solution (called an internet stack) that is internet ready, and we will provide a rich set of example solutions to teach how the internet works at the component level. Students will modify and combine these examples to design systems. This purchase-and-use design process is prevalent in industry, so it will be beneficial for students to be exposed to both bottom-up and component-level design processes.
How. The approach for implementing a smart object over wifi is to begin with a hardware/software platform that implements IEEE801.11 wifi. The CC3100BOOST is a boosterpack that can be used with the MSP430 LaunchPad, the MSP432 LaunchPad, the TM4C123 LaunchPad, the TM4C1294 LaunchPad, or with a CC31XXEMUBOOST emulation module. The CC3100BOOST implements the internet stack with a combination of hardware and software components. Software in the LaunchPad preforms system calls to the CC3100BOOST to affect wireless communication. I didn’t use the CC31XXEMUBOOST emulation module because I didn’t want or need to reprogram the CC3100 boosterpack. In this example student use one EK-TM4C123-GXL LaunchPad that fetches weather data from the internet
\ValvanoWareTM4C123
CC3100GetWeather_4C123
CC3100
CC3100_docs
driverlib
inc
utils
To get the getWeather project to run, the first set of steps involve hardware devices:
0) First, you will need to configure a wireless access point as unencrypted, WEP or WPA.
You will need the name of the AP. In the starter project you will notice my AP was called valvano.
You will set these three lines to specify the parameters of the AP.
#define SSID_NAME "valvano" /* Access point name to connect to. */
#define SEC_TYPE SL_SEC_TYPE_WPA
#define PASSKEY "calvin50" /* Password in case of secure AP */
The SEC_TYPE can be SL_SEC_TYPE_OPEN SL_SEC_TYPE_WPA or SL_SEC_TYPE_WEP
1) If you have a Nokia 5110 LCD display, interface it to port A as described in the Nokia5110.c file.
2) If you do not have a Nokia 5110 LCD, it will also output to the UART. The UART transmits to the PC at 115200 bits/sec, no flow control
The system should fetch weather data, the green LED toggles for each received communication. Push SW1 or SW2 to get a weather update.
If it doesn't work, use the debugger to see where it is stuck.
The second set of changes changing "Austin Texas" to your city,
and if you wish you can change "metric" to "imperial"
For more information see Chapter 11 in Embedded Systems: Real-Time Interfacing to ARM Cortex-M Microcontrollers, 2015, ISBN: 978-1463590154, http://users.ece.utexas.edu/~valvano/arm/outline.htm
Jonathan Valvano 9/13/2015
<!--##### README END #####-->
--cpu Cortex-M4.fp
".\rvmdk\board.o"
".\rvmdk\device.o"
".\rvmdk\driver.o"
".\rvmdk\flowcont.o"
".\rvmdk\fs.o"
".\rvmdk\netapp.o"
".\rvmdk\netcfg.o"
".\rvmdk\nonos.o"
".\rvmdk\socket.o"
".\rvmdk\spawn.o"
".\rvmdk\spi.o"
".\rvmdk\starter.o"
".\rvmdk\startup_rvmdk.o"
".\rvmdk\uart.o"
".\rvmdk\uartstdio.o"
".\rvmdk\ustdlib.o"
".\rvmdk\wlan.o"
".\rvmdk\adcswtrigger.o"
".\rvmdk\launchpadswitches.o"
".\rvmdk\st7735.o"
"..\..\..\..\driverlib\rvmdk\driverlib.lib"
--library_type=microlib --strict --scatter "cc31000_starter.sct"
--entry Reset_Handler --summary_stderr --info summarysizes --map --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list ".\rvmdk\cc31000_starter.map" -o .\rvmdk\cc31000_starter.axf
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<html>
<body>
<pre>
<h1>µVision Build Log</h1>
<h2>Project:</h2>
D:\Box\Box Sync\UT6.03x\TM4Cware\C16_getWeather\getWeather.uvproj
Project File Date: 11/20/2015
<h2>Output:</h2>
Build target 'getWeather'
compiling main.c...
linking...
Program Size: Code=13892 RO-data=1824 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Error(s), 0 Warning(s).
Clean started: Project: 'getWeather'
deleting intermediate output files for target 'getWeather'
</pre>
</body>
</html>
ase Done.
Programming Done.
Verify OK.
): warning: #1295-D: Deprecated declaration LED_GreenOff - give arg types
LED_GreenOff();
main.c(257): error: #260-D: explicit type is missing ("int" assumed)
LED_GreenOff();
main.c(257): error: #147: declaration is incompatible with "void LED_GreenOff(void)" (declared at line 96 of "LED.h")
LED_GreenOff();
main.c(258): error: #169: expected a declaration
}
main.c(297): warning: #12-D: parsing restarts here after previous syntax error
retVal = sl_WlanSetMode(ROLE_STA);
main.c(299): error: #77-D: this declaration has no storage class or type specifier
retVal = sl_Stop(0xFF);
main.c(299): error: #59: function call is not allowed in a constant expression
retVal = sl_Stop(0xFF);
main.c(301): error: #77-D: this declaration has no storage class or type specifier
retVal = sl_Start(0, pConfig, 0);
main.c(301): error: #148: variable "retVal" has already been initialized
retVal = sl_Start(0, pConfig, 0);
main.c(301): error: #59: function call is not allowed in a constant expression
retVal = sl_Start(0, pConfig, 0);
main.c(301): error: #20: identifier "pConfig" is undefined
retVal = sl_Start(0, pConfig, 0);
main.c(304): error: #169: expected a declaration
if (ROLE_STA != retVal){
main.c(310): warning: #12-D: parsing restarts here after previous syntax error
configOpt = SL_DEVICE_GENERAL_VERSION;
main.c(311): error: #77-D: this declaration has no storage class or type specifier
configLen = sizeof(ver);
main.c(311): error: #20: identifier "ver" is undefined
configLen = sizeof(ver);
main.c(312): error: #77-D: this declaration has no storage class or type specifier
retVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &configOpt, &configLen, (unsigned char *)(&ver));
main.c(312): error: #148: variable "retVal" has already been initialized
retVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &configOpt, &configLen, (unsigned char *)(&ver));
main.c(312): error: #59: function call is not allowed in a constant expression
retVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &configOpt, &configLen, (unsigned char *)(&ver));
main.c(312): error: #20: identifier "configOpt" is undefined
retVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &configOpt, &configLen, (unsigned char *)(&ver));
main.c(312): error: #44: expression must have pointer type
retVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &configOpt, &configLen, (unsigned char *)(&ver));
main.c(315): error: #77-D: this declaration has no storage class or type specifier
retVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 0, 0, 0, 1), NULL, 0);
main.c(315): error: #148: variable "retVal" has already been initialized
retVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 0, 0, 0, 1), NULL, 0);
main.c(315): error: #59: function call is not allowed in a constant expression
retVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 0, 0, 0, 1), NULL, 0);
main.c(318): error: #77-D: this declaration has no storage class or type specifier
retVal = sl_WlanProfileDel(0xFF);
main.c(318): error: #148: variable "retVal" has already been initialized
retVal = sl_WlanProfileDel(0xFF);
main.c(318): error: #59: function call is not allowed in a constant expression
retVal = sl_WlanProfileDel(0xFF);
main.c(325): error: #77-D: this declaration has no storage class or type specifier
retVal = sl_WlanDisconnect();
main.c(325): error: #148: variable "retVal" has already been initialized
retVal = sl_WlanDisconnect();
main.c(325): error: #59: function call is not allowed in a constant expression
retVal = sl_WlanDisconnect();
main.c(326): error: #169: expected a declaration
if(0 == retVal){
main.c(332): warning: #12-D: parsing restarts here after previous syntax error
retVal = sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE,1,1,&val);
main.c(335): error: #77-D: this declaration has no storage class or type specifier
configOpt = SL_SCAN_POLICY(0);
main.c: 6 warnings, 30 errors
".\rvmdk\getWeather.axf" - 30 Error(s), 6 Warning(s).
Target not created
Load "D:\\Box\\Box Sync\\UT6.03x\\TM4Cware\\C16_getWeather\\rvmdk\\getWeather.axf"
Connecting: Mode=JTAG, Speed=1000000Hz
Erase Done.
Programming Done.
Verify OK.
<html>
<body>
<pre>
<h1>Vision Build Log</h1>
<h2>Project:</h2>
C:\Dropbox\ArmBook\LaunchPad\ValvanoWareTM4C123\CC3100GetWeather_4C123\getWeather.uvproj
Project File Date: 09/23/2015
<h2>Output:</h2>
Build target 'getWeather'
compiling main.c...
linking...
Program Size: Code=13912 RO-data=1812 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Errors, 0 Warning(s).
Load "C:\\Dropbox\\ArmBook\\LaunchPad\\ValvanoWareTM4C123\\CC3100GetWeather_4C123\\rvmdk\\getWeather.axf"
Connecting: Mode=JTAG, Speed=1000000Hz
Erase Done.
Programming Done.
Verify OK.
Build target 'getWeather'
linking...
Program Size: Code=13912 RO-data=1812 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Errors, 0 Warning(s).
Load "C:\\Dropbox\\ArmBook\\LaunchPad\\ValvanoWareTM4C123\\CC3100GetWeather_4C123\\rvmdk\\getWeather.axf"
Connecting: Mode=JTAG, Speed=1000000Hz
Erase Done.
Programming Done.
Verify OK.
Build target 'getWeather'
compiling main.c...
linking...
Program Size: Code=13896 RO-data=1812 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Errors, 0 Warning(s).
Build target 'getWeather'
compiling main.c...
linking...
Program Size: Code=13912 RO-data=1812 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Errors, 0 Warning(s).
Load "C:\\Dropbox\\ArmBook\\LaunchPad\\ValvanoWareTM4C123\\CC3100GetWeather_4C123\\rvmdk\\getWeather.axf"
Connecting: Mode=JTAG, Speed=1000000Hz
Erase Done.
Programming Done.
Verify OK.
Build target 'getWeather'
compiling main.c...
linking...
Program Size: Code=13912 RO-data=1812 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Errors, 0 Warning(s).
Load "C:\\Dropbox\\ArmBook\\LaunchPad\\ValvanoWareTM4C123\\CC3100GetWeather_4C123\\rvmdk\\getWeather.axf"
Connecting: Mode=JTAG, Speed=1000000Hz
Erase Done.
Programming Done.
Verify OK.
Build target 'getWeather'
compiling main.c...
linking...
Program Size: Code=13912 RO-data=1824 RW-data=56 ZI-data=19512
After Build - User command #1: fromelf --bin --output .\rvmdk\cc31000_starter.bin .\rvmdk\cc31000_starter.axf
".\rvmdk\getWeather.axf" - 0 Errors, 0 Warning(s).
<?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="Stellaris In-Circuit Debug Interface" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface">
<instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/stellaris_cortex_m4.xml" id="drivers" xml="stellaris_cortex_m4.xml" xmlpath="drivers"/>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="Tiva TM4C123GH6PM" href="devices/tm4c123gh6pm.xml" id="Tiva TM4C123GH6PM" xml="tm4c123gh6pm.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>
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.
\ No newline at end of file
/******************************************************************************
*
* Default Linker Command file for the Texas Instruments TM4C123GH6PM
*
* This is derived from revision 14351 of the TivaWare Library.
*
*****************************************************************************/
--retain=g_pfnVectors
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x00040000
SRAM (RWX) : origin = 0x20000000, length = 0x00008000
}
/* 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;
<html>
<body>
<pre>
<h1>Vision Build Log</h1>
<h2>Project:</h2>
D:\Dropbox\apn176\apntex_176\MySetup\Labware\Lab10_TrafficLight\Lab10.uvproj
Project File Date: 02/10/2014
<h2>Output:</h2>
Build target 'Lab10'
assembling startup.s...
compiling TableTrafficLight.c...
linking...
Program Size: Code=3588 RO-data=14296 RW-data=68 ZI-data=1756
".\Lab10.axf" - 0 Error(s), 0 Warning(s).
Clean started: Project: 'Lab10'
deleting intermediate output files for target 'Lab10'
</pre>
</body>
</html>
<html>
<body>
<pre>
<h1>Vision Build Log</h1>
<h2>Project:</h2>
C:\Users\Mark\Dropbox\EdX\TM4Cware\Lab10_TrafficLight\Lab10 (Jonathan Valvano's conflicted copy 2013-12-06).uvproj
Project File Date: 01/13/2014
<h2>Output:</h2>
*** Creating Trace Output File 'Lab10.tra' Ok.
### Preparing for ADS-LD.
### Creating ADS-LD Command Line
### List of Objects: adding '"startup.o"'
### List of Objects: adding '"systick.o"'
### List of Objects: adding '"tabletrafficlight.o"'
### List of Objects: adding '"texas.o"'
### ADS-LD Command completed:
--cpu Cortex-M4 "startup.o" "systick.o" "tabletrafficlight.o" "texas.o"
--ro-base 0x00000000 --entry 0x00000000 --rw-base 0x20000000 --entry Reset_Handler --first __Vectors --strict --summary_stderr --info summarysizes --map --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list ".\Lab10.map" -o Lab10.axf### Preparing Environment (PrepEnvAds)
### ADS-LD Output File: 'Lab10.axf'
### ADS-LD Command File: 'Lab10.lnp'
### Checking for dirty Components...
### Creating CmdFile 'Lab10.lnp', Handle=0x00000994
### Writing '.lnp' file
### ADS-LD Command file 'Lab10.lnp' is ready.
### ADS-LD: About to start ADS-LD Thread.
### ADS-LD: executed with 0 errors
### Updating obj list
### LDADS_file() completed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_opt.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>Lab10</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>16000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>255</CpuCode>
<DllOpt>
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments>-MPU</SimDllArguments>
<SimDlgDllName>DCM.DLL</SimDlgDllName>
<SimDlgDllArguments>-pCM4 -dedXLab10</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments>-MPU</TargetDllArguments>
<TargetDlgDllName>TCM.DLL</TargetDlgDllName>
<TargetDlgDllArguments>-pCM4</TargetDlgDllArguments>
</DllOpt>
<DebugOpt>
<uSim>1</uSim>
<uTrg>0</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>0</tRtrace>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>3</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\lmidk-agdi.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>LAB10_OUTPUT_SEL</Key>
<Name>1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>LAB10_INPUT_SEL</Key>
<Name>2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0TM4C123_32 -FS00 -FL08000)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>Lab5OutputPort</Key>
<Name>1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>Lab5InputPort</Key>
<Name>2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGDARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(3006=496,301,892,648,1)(3004=1052,58,1448,333,1)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name>-T0</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>lmidk-agdi</Key>
<Name>-U-O4622 -O4622 -S3 -FO29</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x400253FC</ItemText>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
</TargetOption>
</Target>
<Group>
<GroupName>Source</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>273</TopLine>
<CurrentLine>277</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\startup.s</PathWithFileName>
<FilenameWithoutPath>startup.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>19</TopLine>
<CurrentLine>37</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\TableTrafficLight.c</PathWithFileName>
<FilenameWithoutPath>TableTrafficLight.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Object code</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>3</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\texas.o</PathWithFileName>
<FilenameWithoutPath>texas.o</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>
// TExaS.h
// Runs on LM4F120/TM4C123
// Periodic timer Timer5A which will interact with debugger and grade the lab
// Periodic timer Timer4A implements analog scope
// It initializes on reset and runs whenever interrupts are enabled
// Jonathan Valvano
// January 15, 2016
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2015
Copyright 2016 by Jonathan W. Valvano, valvano@mail.utexas.edu
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". 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.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
// IMPORTANT: These enumerated types are specific to Lab 10.
enum InputPorts{
SW_PIN_PA432 = 0,
SW_PIN_PB210 = 1,
SW_PIN_PE210 = 4
};
enum OutputPorts{
LED_PIN_PA765432 = 0,
LED_PIN_PB543210 = 1,
LED_PIN_PE543210 = 4
};
enum ScopeModes{
ScopeOff = 0, // no scope needed
ScopeOn = 1 // turn on UART0 and stream analog data from PD3 to TExaSdisplay
};
// ************TExaS_Init*****************
// Initialize grader, triggered by timer 5A
// This needs to be called once
// Inputs: iport input(s) connected to this port
// oport output(s) connected to this port
// scope true if oscilloscope to be implemented (uses UART0 and // Outputs: none
void TExaS_Init(enum InputPorts iport, enum OutputPorts oport, enum ScopeModes scope);
// ************TExaS_Stop*****************
// Stop the transfer
// Inputs: none
// Outputs: none
void TExaS_Stop(void);
// ***** 0. Documentation Section *****
// TableTrafficLight.c for Lab 10
// Runs on LM4F120/TM4C123
// Index implementation of a Moore finite state machine to operate a traffic light.
// Daniel Valvano, Jonathan Valvano
// January 15, 2016
// east/west red light connected to PB5
// east/west yellow light connected to PB4
// east/west green light connected to PB3
// north/south facing red light connected to PB2
// north/south facing yellow light connected to PB1
// north/south facing green light connected to PB0
// pedestrian detector connected to PE2 (1=pedestrian present)
// north/south car detector connected to PE1 (1=car present)
// east/west car detector connected to PE0 (1=car present)
// "walk" light connected to PF3 (built-in green LED)
// "don't walk" light connected to PF1 (built-in red LED)
// ***** 1. Pre-processor Directives Section *****
#include "TExaS.h"
#include "tm4c123gh6pm.h"
// ***** 2. Global Declarations Section *****
// FUNCTION PROTOTYPES: Each subroutine defined
void DisableInterrupts(void); // Disable interrupts
void EnableInterrupts(void); // Enable interrupts
// ***** 3. Subroutines Section *****
int main(void){
TExaS_Init(SW_PIN_PE210, LED_PIN_PB543210,ScopeOff); // activate grader and set system clock to 80 MHz
EnableInterrupts();
while(1){
}
}
<html>
<body>
<pre>
<h1>Vision Build Log</h1>
<h2>Project:</h2>
C:\Dropbox\apn176\apntex_176\MySetup\Labware\Lab11_UART\Lab11.uvproj
Project File Date: 02/11/2014
<h2>Output:</h2>
Build target 'Lab11'
assembling startup.s...
compiling UART.c...
compiling main.c...
linking...
Program Size: Code=2628 RO-data=696 RW-data=44 ZI-data=1764
".\Lab11.axf" - 0 Error(s), 0 Warning(s).
Clean started: Project: 'Lab11'
deleting intermediate output files for target 'Lab11'
</pre>
</body>
</html>
<html>
<body>
<pre>
<h1>Vision Build Log</h1>
<h2>Project:</h2>
D:\My Dropbox\EdX\TM4Cware\Lab11_UART\Lab11.uvproj
Project File Date: 01/12/2014
<h2>Output:</h2>
Build target 'Lab11'
assembling startup.s...
compiling UART.c...
compiling TExaS.c...
compiling main.c...
linking...
Program Size: Code=2960 RO-data=696 RW-data=44 ZI-data=1764
"Lab11.axf" - 0 Error(s), 0 Warning(s).
Load "D:\\My Dropbox\\EdX\\TM4Cware\\Lab11_UART\\Lab11.AXF"
Connecting: Mode=JTAG, Speed=1000000Hz
Erase Done.
Programming Done.
Verify OK.
*** Creating Trace Output File 'Lab11.tra' Ok.
### Preparing for ADS-LD.
### Creating ADS-LD Command Line
### List of Objects: adding '"startup.o"'
### List of Objects: adding '"uart.o"'
### List of Objects: adding '"texas.o"'
### List of Objects: adding '"main.o"'
### ADS-LD Command completed:
--cpu Cortex-M4 "startup.o" "uart.o" "texas.o" "main.o" --ro-base 0x00000000 --entry 0x00000000 --rw-base 0x20000000 --entry Reset_Handler --first __Vectors --strict --summary_stderr --info summarysizes --map --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list ".\Lab11.map" -o Lab11.axf### Preparing Environment (PrepEnvAds)
### ADS-LD Output File: 'Lab11.axf'
### ADS-LD Command File: 'Lab11.lnp'
### Checking for dirty Components...
### Creating CmdFile 'Lab11.lnp', Handle=0x00000470
### Writing '.lnp' file
### ADS-LD Command file 'Lab11.lnp' is ready.
### ADS-LD: About to start ADS-LD Thread.
### ADS-LD: executed with 0 errors
### Updating obj list
### LDADS_file() completed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_opt.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>Lab11</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>16000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>255</CpuCode>
<DllOpt>
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments>-MPU</SimDllArguments>
<SimDlgDllName>DCM.DLL</SimDlgDllName>
<SimDlgDllArguments>-pCM4 -dedXLab11</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments>-MPU</TargetDllArguments>
<TargetDlgDllName>TCM.DLL</TargetDlgDllName>
<TargetDlgDllArguments>-pCM4</TargetDlgDllArguments>
</DllOpt>
<DebugOpt>
<uSim>1</uSim>
<uTrg>0</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>0</tRtrace>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>3</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\lmidk-agdi.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0TM4C123_32 -FS00 -FL08000)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGDARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)(3004=1139,168,1535,524,1)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name>-T0</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>lmidk-agdi</Key>
<Name>-U-O4622 -O4622 -S3 -FO29</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x400253FC</ItemText>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>1</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
</TargetOption>
</Target>
<Group>
<GroupName>Source</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>263</TopLine>
<CurrentLine>277</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\startup.s</PathWithFileName>
<FilenameWithoutPath>startup.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>55</TopLine>
<CurrentLine>61</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\UART.c</PathWithFileName>
<FilenameWithoutPath>UART.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>1</TopLine>
<CurrentLine>18</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Object code</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>3</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\texas.o</PathWithFileName>
<FilenameWithoutPath>texas.o</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>
// Grader.h
// Runs on LM4F120/TM4C123
// Periodic timer Timer5A which will interact with debugger and grade the lab
// It initializes on reset and runs whenever interrupts are enabled
// Jonathan Valvano
// January 15, 2016
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2015
Copyright 2016 by Jonathan W. Valvano, valvano@mail.utexas.edu
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". 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.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
// ************TExaS_Init*****************
// Initialize grader, triggered by timer 5A
// This needs to be called once
// Inputs: none
// Outputs: none
void TExaS_Init(void);
// ************TExaS_Stop*****************
// Stop the transfer
// Inputs: none
// Outputs: none
void TExaS_Stop(void);
// UART.c
// Runs on TM4C123 or LM4F120
// Lab 11 involves switching this from UART1 to UART0.
// switching from PC5,PC4 to PA1,PA0
// Daniel Valvano
// December 29, 2014
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2014
Copyright 2015 by Jonathan W. Valvano, valvano@mail.utexas.edu
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". 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.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
// this connection occurs in the USB debugging cable
// U0Rx (PA0) connected to serial port on PC
// U0Tx (PA1) connected to serial port on PC
// Ground connected ground in the USB cable
#include "tm4c123gh6pm.h"
#include "UART.h"
//------------UART_Init------------
// Initialize the UART for 115200 baud rate (assuming 80 MHz UART clock),
// 8 bit word length, no parity bits, one stop bit, FIFOs enabled
// Input: none
// Output: none
void UART_Init(void){
// as part of Lab 11, modify this program to use UART0 instead of UART1
// switching from PC5,PC4 to PA1,PA0
SYSCTL_RCGC1_R |= SYSCTL_RCGC1_UART0; // activate UART0
SYSCTL_RCGC2_R |= SYSCTL_RCGC2_GPIOA; // activate port A
UART0_CTL_R &= ~UART_CTL_UARTEN; // disable UART
UART0_IBRD_R = 43; // IBRD = int(80,000,000 / (16 * 115200)) = int(43.402778)
UART0_FBRD_R = 26; // FBRD = round(0.402778 * 64) = 26
// 8 bit word length (no parity bits, one stop bit, FIFOs)
UART0_LCRH_R = (UART_LCRH_WLEN_8|UART_LCRH_FEN);
UART0_CTL_R |= UART_CTL_UARTEN; // enable UART
GPIO_PORTA_AFSEL_R |= 0x03; // enable alt funct on PA1,PA0
GPIO_PORTA_DEN_R |= 0x03; // enable digital I/O on PA1,PA0
// configure PA1,PA0 as UART0
GPIO_PORTA_PCTL_R = (GPIO_PORTA_PCTL_R&0xFFFFFF00)+0x00000011;
GPIO_PORTA_AMSEL_R &= ~0x03; // disable analog functionality on PA1,PA0
}
//------------UART_InChar------------
// Wait for new serial port input
// Input: none
// Output: ASCII code for key typed
unsigned char UART_InChar(void){
// as part of Lab 11, modify this program to use UART0 instead of UART1
while((UART0_FR_R&UART_FR_RXFE) != 0);
return((unsigned char)(UART0_DR_R&0xFF));
}
//------------UART_InCharNonBlocking------------
// Get oldest serial port input and return immediately
// if there is no data.
// Input: none
// Output: ASCII code for key typed or 0 if no character
unsigned char UART_InCharNonBlocking(void){
// as part of Lab 11, modify this program to use UART0 instead of UART1
if((UART0_FR_R&UART_FR_RXFE) == 0){
return((unsigned char)(UART0_DR_R&0xFF));
} else{
return 0;
}
}
//------------UART_OutChar------------
// Output 8-bit to serial port
// Input: letter is an 8-bit ASCII character to be transferred
// Output: none
void UART_OutChar(unsigned char data){
// as part of Lab 11, modify this program to use UART0 instead of UART1
while((UART0_FR_R&UART_FR_TXFF) != 0);
UART0_DR_R = data;
}
//------------UART_InUDec------------
// InUDec accepts ASCII input in unsigned decimal format
// and converts to a 32-bit unsigned number
// valid range is 0 to 4294967295 (2^32-1)
// Input: none
// Output: 32-bit unsigned number
// If you enter a number above 4294967295, it will return an incorrect value
// Backspace will remove last digit typed
unsigned long UART_InUDec(void){
unsigned long number=0, length=0;
char character;
character = UART_InChar();
while(character != CR){ // accepts until <enter> is typed
// The next line checks that the input is a digit, 0-9.
// If the character is not 0-9, it is ignored and not echoed
if((character>='0') && (character<='9')) {
number = 10*number+(character-'0'); // this line overflows if above 4294967295
length++;
UART_OutChar(character);
}
// If the input is a backspace, then the return number is
// changed and a backspace is outputted to the screen
else if((character==BS) && length){
number /= 10;
length--;
UART_OutChar(character);
}
character = UART_InChar();
}
return number;
}
//------------UART_OutString------------
// Output String (NULL termination)
// Input: pointer to a NULL-terminated string to be transferred
// Output: none
void UART_OutString(unsigned char buffer[]){
// as part of Lab 11 implement this function
}
unsigned char String[10];
//-----------------------UART_ConvertUDec-----------------------
// Converts a 32-bit number in unsigned decimal format
// Input: 32-bit number to be transferred
// Output: store the conversion in global variable String[10]
// Fixed format 4 digits, one space after, null termination
// Examples
// 4 to " 4 "
// 31 to " 31 "
// 102 to " 102 "
// 2210 to "2210 "
//10000 to "**** " any value larger than 9999 converted to "**** "
void UART_ConvertUDec(unsigned long n){
// as part of Lab 11 implement this function
}
//-----------------------UART_OutUDec-----------------------
// Output a 32-bit number in unsigned decimal format
// Input: 32-bit number to be transferred
// Output: none
// Fixed format 4 digits, one space after, null termination
void UART_OutUDec(unsigned long n){
UART_ConvertUDec(n); // convert using your function
UART_OutString(String); // output using your function
}
//-----------------------UART_ConvertDistance-----------------------
// Converts a 32-bit distance into an ASCII string
// Input: 32-bit number to be converted (resolution 0.001cm)
// Output: store the conversion in global variable String[10]
// Fixed format 1 digit, point, 3 digits, space, units, null termination
// Examples
// 4 to "0.004 cm"
// 31 to "0.031 cm"
// 102 to "0.102 cm"
// 2210 to "2.210 cm"
//10000 to "*.*** cm" any value larger than 9999 converted to "*.*** cm"
void UART_ConvertDistance(unsigned long n){
// as part of Lab 11 implement this function
}
//-----------------------UART_OutDistance-----------------------
// Output a 32-bit number in unsigned decimal fixed-point format
// Input: 32-bit number to be transferred (resolution 0.001cm)
// Output: none
// Fixed format 1 digit, point, 3 digits, space, units, null termination
void UART_OutDistance(unsigned long n){
UART_ConvertDistance(n); // convert using your function
UART_OutString(String); // output using your function
}
// UART.h
// Runs on TM4C123 or LM4F120
// Lab 11 involves switching this from UART1 to UART0.
// switching from PC5,PC4 to PA1,PA0
// Daniel Valvano
// December 29, 2014
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2014
Copyright 2015 by Jonathan W. Valvano, valvano@mail.utexas.edu
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". 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.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
// this connection occurs in the USB debugging cable
// U0Rx (PA0) connected to serial port on PC
// U0Tx (PA1) connected to serial port on PC
// Ground connected ground in the USB cable
// standard ASCII symbols
#define CR 0x0D
#define LF 0x0A
#define BS 0x08
#define ESC 0x1B
#define SP 0x20
#define DEL 0x7F
//------------UART_Init------------
// Initialize the UART for 115200 baud rate (assuming 80 MHz clock),
// 8 bit word length, no parity bits, one stop bit, FIFOs enabled
// Input: none
// Output: none
void UART_Init(void);
//------------UART_InChar------------
// Wait for new serial port input
// Input: none
// Output: ASCII code for key typed
unsigned char UART_InChar(void);
//------------UART_InCharNonBlocking------------
// Get oldest serial port input and return immediately
// if there is no data.
// Input: none
// Output: ASCII code for key typed or 0 if no character
unsigned char UART_InCharNonBlocking(void);
//------------UART_OutChar------------
// Output 8-bit to serial port
// Input: letter is an 8-bit ASCII character to be transferred
// Output: none
void UART_OutChar(unsigned char data);
//------------UART_InUDec------------
// InUDec accepts ASCII input in unsigned decimal format
// and converts to a 32-bit unsigned number
// valid range is 0 to 4294967295 (2^32-1)
// Input: none
// Output: 32-bit unsigned number
// If you enter a number above 4294967295, it will return an incorrect value
// Backspace will remove last digit typed
unsigned long UART_InUDec(void);
//------------UART_OutString------------
// Output String (NULL termination)
// Input: pointer to a NULL-terminated string to be transferred
// Output: none
void UART_OutString(unsigned char buffer[]);
//-----------------------UART_ConvertUDec-----------------------
// Converts a 32-bit number in unsigned decimal format
// Input: 32-bit number to be transferred
// Output: store the conversion in global variable String[10]
// Fixed format 4 digits, one space after, null termination
// Examples
// 4 to " 4 "
// 31 to " 31 "
// 102 to " 102 "
// 2210 to "2210 "
//10000 to "**** " any value larger than 9999 converted to "**** "
void UART_ConvertUDec(unsigned long n);
//-----------------------UART_OutUDec-----------------------
// Output a 32-bit number in unsigned decimal format
// Input: 32-bit number to be transferred
// Output: none
// Fixed format 4 digits, one space after, null termination
void UART_OutUDec(unsigned long n);
//-----------------------UART_ConvertDistance-----------------------
// Converts a 32-bit distance into an ASCII string
// Input: 32-bit number to be converted (resolution 0.001cm)
// Output: store the conversion in global variable String[10]
// Fixed format 1 digit, point, 3 digits, space, units, null termination
// Examples
// 4 to "0.004 cm"
// 31 to "0.031 cm"
// 102 to "0.102 cm"
// 2210 to "2.210 cm"
//10000 to "*.*** cm" any value larger than 9999 converted to "*.*** cm"
void UART_ConvertDistance(unsigned long n);
//-----------------------UART_OutDistance-----------------------
// Output a 32-bit number in unsigned decimal fixed-point format
// Input: 32-bit number to be transferred (resolution 0.001cm)
// Output: none
// Fixed format 1 digit, point, 3 digits, space, units, null termination
void UART_OutDistance(unsigned long n);
// main.c
// Runs on LM4F120/TM4C123
// Test main for Lab 11
// January 15, 2016
// this connection occurs in the USB debugging cable
// U0Rx (PA0) connected to serial port on PC
// U0Tx (PA1) connected to serial port on PC
// Ground connected ground in the USB cable
#include "UART.h"
#include "TExaS.h"
void EnableInterrupts(void); // Enable interrupts
// do not edit this main
// your job is to implement the UART_OutUDec UART_OutDistance functions
int main(void){ unsigned long n;
TExaS_Init(); // initialize grader, set system clock to 80 MHz
UART_Init(); // initialize UART
EnableInterrupts(); // needed for TExaS
UART_OutString("Running Lab 11");
while(1){
UART_OutString("\n\rInput:");
n = UART_InUDec();
UART_OutString(" UART_OutUDec = ");
UART_OutUDec(n); // your function
UART_OutString(", UART_OutDistance ~ ");
UART_OutDistance(n); // your function
}
}
<html>
<body>
<pre>
<h1>Vision Build Log</h1>
<h2>Project:</h2>
C:\Dropbox\apn176\apntex_176\MySetup\Labware\Lab12_TuningFork\Lab12.uvproj
Project File Date: 03/12/2014
<h2>Output:</h2>
</pre>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment