lab 3 setup

This commit is contained in:
Trevor Barnes
2019-10-01 16:05:43 -05:00
parent 32dc2af089
commit c5042a621f
25 changed files with 2767 additions and 1893 deletions

12
.gitignore vendored
View File

@@ -1,8 +1,8 @@
\lab2barnestr\lab2barnestr Debug.cfg
\lab2barnestr\LinkerScript.ld
\lab2barnestr\NUCLEO-F446RE.xml
\lab2barnestr\.settings\**
\**\lab2barnestr Debug.cfg
\**\LinkerScript.ld
\**\NUCLEO-F446RE.xml
\**\.settings\**
\.metadata
\lab2barnestr\lab2barnestr.bin
\lab2barnestr\lab2barnestr.elf
\**\lab2barnestr.bin
\**\lab2barnestr.elf
\lab2barnestr\output.map

View File

@@ -2241,3 +2241,6 @@ Error erasing flash with vFlashErase packet
java.lang.Exception: Error erasing flash with vFlashErase packet
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
!ENTRY org.eclipse.cdt.core 1 0 2019-10-01 15:49:10.425
!MESSAGE Indexed 'lab3subroutines' (1 sources, 33 headers) in 0.605 sec: 1,056 declarations; 1,872 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

View File

@@ -899,3 +899,66 @@ arm-none-eabi-size "lab2barnestr.elf"
text data bss dec hex filename
1104 1080 1092 3276 ccc lab2barnestr.elf
15:45:01 **** Incremental Build of configuration Debug for project lab2barnestr ****
make all
make: Nothing to be done for 'all'.
16:03:06 **** Build of configuration Debug for project lab3subroutines ****
make all
Building file: ../startup/startup_stm32.s
Invoking: MCU GCC Assembler
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o "startup/startup_stm32.o" "../startup/startup_stm32.s"
Finished building: ../startup/startup_stm32.s
Building file: ../startup/sysmem.c
Invoking: MCU GCC Compiler
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32 -DSTM32F4 -DSTM32F446RETx -DNUCLEO_F446RE -DDEBUG -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"startup/sysmem.d" -MT"startup/sysmem.o" -o "startup/sysmem.o" "../startup/sysmem.c"
Finished building: ../startup/sysmem.c
Building file: ../src/gpio.s
Invoking: MCU GCC Assembler
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o "src/gpio.o" "../src/gpio.s"
Finished building: ../src/gpio.s
Building file: ../src/led.s
Invoking: MCU GCC Assembler
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o "src/led.o" "../src/led.s"
Finished building: ../src/led.s
Building file: ../src/main.s
Invoking: MCU GCC Assembler
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o "src/main.o" "../src/main.s"
Finished building: ../src/main.s
Building target: lab3subroutines.elf
Invoking: MCU GCC Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T"C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\LinkerScript.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "lab3subroutines.elf" @"objects.list" -lm
startup/startup_stm32.o: In function `LoopFillZerobss':
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug/../startup/startup_stm32.s:78: undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
make: *** [lab3subroutines.elf] Error 1
makefile:34: recipe for target 'lab3subroutines.elf' failed
16:03:55 **** Incremental Build of configuration Debug for project lab3subroutines ****
make all
Building file: ../src/main.s
Invoking: MCU GCC Assembler
C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\Debug
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o "src/main.o" "../src/main.s"
Finished building: ../src/main.s
Building target: lab3subroutines.elf
Invoking: MCU GCC Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T"C:\Users\barnestr\Documents\CE2801\workspace\lab3subroutines\LinkerScript.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "lab3subroutines.elf" @"objects.list" -lm
Finished building target: lab3subroutines.elf
make --no-print-directory post-build
Generating binary and Printing size information:
arm-none-eabi-objcopy -O binary "lab3subroutines.elf" "lab3subroutines.bin"
arm-none-eabi-size "lab3subroutines.elf"
text data bss dec hex filename
972 1080 1092 3144 c48 lab3subroutines.elf

View File

@@ -1,23 +1,6 @@
15:20:49 **** Incremental Build of configuration Debug for project lab2barnestr ****
15:45:01 **** Incremental Build of configuration Debug for project lab2barnestr ****
make all
Building file: ../src/main.s
Invoking: MCU GCC Assembler
C:\Users\barnestr\Documents\CE2801\workspace\lab2barnestr\Debug
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o "src/main.o" "../src/main.s"
Finished building: ../src/main.s
make: Nothing to be done for 'all'.
Building target: lab2barnestr.elf
Invoking: MCU GCC Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T"C:\Users\barnestr\Documents\CE2801\workspace\lab2barnestr\LinkerScript.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "lab2barnestr.elf" @"objects.list" -lm
Finished building target: lab2barnestr.elf
make --no-print-directory post-build
Generating binary and Printing size information:
arm-none-eabi-objcopy -O binary "lab2barnestr.elf" "lab2barnestr.bin"
arm-none-eabi-size "lab2barnestr.elf"
text data bss dec hex filename
1104 1080 1092 3276 ccc lab2barnestr.elf
15:20:51 Build Finished (took 2s.165ms)
15:45:02 Build Finished (took 1s.110ms)

View File

@@ -3,3 +3,5 @@ properties/lab1.fr.ac6.managedbuild.target.gnu.cross.exe.1192971440/fr.ac6.manag
properties/lab1.fr.ac6.managedbuild.target.gnu.cross.exe.1192971440/fr.ac6.managedbuild.config.gnu.cross.exe.release.925933083=fr.ac6.managedbuild.tool.gnu.archiver.1025348339\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.compiler.835265781\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.498742630\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.assembler.exe.release.1772758848\=rebuildState\\\=true\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.assembler.576856215\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.linker.95359918\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.linker.844916587\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.toolchain.gnu.cross.exe.release.564071875\=rebuildState\\\=true\\r\\n\r\n
properties/lab2barnestr.fr.ac6.managedbuild.target.gnu.cross.exe.1174025590/fr.ac6.managedbuild.config.gnu.cross.exe.debug.11763558=fr.ac6.managedbuild.config.gnu.cross.exe.debug.11763558\=rcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.assembler.1746477406\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.631093406\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.linker.128116748\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.linker.298219195\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.690883611\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.archiver.686065332\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.compiler.2058797713\=rebuildState\\\=false\\r\\n\r\n
properties/lab2barnestr.fr.ac6.managedbuild.target.gnu.cross.exe.1174025590/fr.ac6.managedbuild.config.gnu.cross.exe.release.140736848=fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.307366098\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.linker.1951970545\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.assembler.99227971\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.archiver.601562494\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.toolchain.gnu.cross.exe.release.1293047718\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.compiler.1483905831\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1958708202\=rebuildState\\\=true\\r\\n\r\n
properties/lab3subroutines.fr.ac6.managedbuild.target.gnu.cross.exe.1768735855/fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004=fr.ac6.managedbuild.tool.gnu.archiver.1417545457\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.assembler.692591045\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.linker.2095043366\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.481196454\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.compiler.475685930\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004\=rcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1653233822\=rebuildState\\\=false\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.linker.932312095\=rebuildState\\\=false\\r\\n\r\n
properties/lab3subroutines.fr.ac6.managedbuild.target.gnu.cross.exe.1768735855/fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564=fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1663753544\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.assembler.1496240951\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.compiler.299769065\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.toolchain.gnu.cross.exe.release.568133727\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.c.linker.1835544768\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.archiver.534290351\=rebuildState\\\=true\\r\\n\r\nfr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1801216189\=rebuildState\\\=true\\r\\n\r\n

View File

@@ -4,4 +4,4 @@ configDescList=org.eclipse.launchbar.core.descriptorType.default\:lab1 Debug,org
eclipse.preferences.version=1
org.eclipse.launchbar.core.descriptorType.default\:lab1\ Debug/activeLaunchMode=run
org.eclipse.launchbar.core.descriptorType.default\:lab1\ Debug/activeLaunchTarget=org.eclipse.launchbar.core.launchTargetType.local\:Local
org.eclipse.launchbar.core.descriptorType.default\:lab2barnestr\ Debug/activeLaunchMode=debug
org.eclipse.launchbar.core.descriptorType.default\:lab2barnestr\ Debug/activeLaunchMode=run

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,3 @@
#
#Wed Sep 25 14:59:33 CDT 2019
task-tag-projects-already-scanned=lab2barnestr,RemoteSystemsTempFiles
#Tue Oct 01 15:50:39 CDT 2019
task-tag-projects-already-scanned=lab3subroutines,RemoteSystemsTempFiles

141
lab3subroutines/.cproject Normal file
View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot;; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1653233822" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.42481488" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" value="STM32F446RETx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1939478000" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" value="fr.ac6.managedbuild.option.gnu.cross.fpu.fpv4-sp-d16" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.82252159" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.579145314" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" value="NUCLEO-F446RE" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.1112072581" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/lab3subroutines}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.814970721" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.475685930" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1285611326" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option id="gnu.c.compiler.option.debugging.level.1082373316" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.25697932" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32"/>
<listOptionValue builtIn="false" value="STM32F4"/>
<listOptionValue builtIn="false" value="STM32F446RETx"/>
<listOptionValue builtIn="false" value="NUCLEO_F446RE"/>
<listOptionValue builtIn="false" value="DEBUG"/>
</option>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.679826773" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.937917801" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.481196454" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.398832437" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option id="gnu.cpp.compiler.option.debugging.level.1454662964" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.2095043366" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker">
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1260873844" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.932312095" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1417545457" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.692591045" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1395741315" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.107638071" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564" name="Release" parent="fr.ac6.managedbuild.config.gnu.cross.exe.release" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot;; arm-none-eabi-size -B &quot;${BuildArtifactFileName}&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.release.568133727" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.release">
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1526456896" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" value="STM32F446RETx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.161606014" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" value="fr.ac6.managedbuild.option.gnu.cross.fpu.fpv4-sp-d16" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1829330626" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.836951468" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" value="NUCLEO-F446RE" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.664703909" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/lab3subroutines}/Release" id="fr.ac6.managedbuild.builder.gnu.cross.1986843509" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.299769065" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1880284259" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.most" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.548117637" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1262532295" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32"/>
<listOptionValue builtIn="false" value="STM32F4"/>
<listOptionValue builtIn="false" value="STM32F446RETx"/>
<listOptionValue builtIn="false" value="NUCLEO_F446RE"/>
</option>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1235391604" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1060453556" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1801216189" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1633141025" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.442759700" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1835544768" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker">
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.2086437613" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1663753544" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.534290351" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1496240951" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1261542227" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1017786240" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="lab3subroutines.fr.ac6.managedbuild.target.gnu.cross.exe.1768735855" name="Executable" projectType="fr.ac6.managedbuild.target.gnu.cross.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004;fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.475685930;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.679826773">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564;fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.299769065;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1235391604">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>

1
lab3subroutines/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/Debug/

28
lab3subroutines/.project Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lab3subroutines</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>fr.ac6.mcu.ide.core.MCUProjectNature</nature>
<nature>fr.ac6.mcu.ide.core.MCUSingleCoreProjectNature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.768449004" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1700254419450938845" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1249662564" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1700254419450938845" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>

View File

@@ -0,0 +1,202 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Author : Auto-generated by Ac6 System Workbench
**
** Abstract : Linker script for STM32F446RETx Device from STM32F4 series
** 128Kbytes RAM
** 512Kbytes ROM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed “as is,” without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** <h2><center>&copy; COPYRIGHT(c) 2019 Ac6</center></h2>
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
** 1. Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** 3. Neither the name of Ac6 nor the names of its contributors
** may be used to endorse or promote products derived from this software
** without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
*****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = 0x20020000; /* end of RAM */
_Min_Heap_Size = 0; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 512K
}
/* Sections */
SECTIONS
{
/* The startup code into ROM memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >ROM
/* The program code and other data into ROM memory */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >ROM
/* Constant data into ROM memory*/
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >ROM
.ARM.extab : {
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >ROM
.ARM : {
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} >ROM
.preinit_array :
{
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >ROM
.init_array :
{
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >ROM
.fini_array :
{
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >ROM
/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections into RAM memory */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> ROM
/* Uninitialized data section into RAM memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM
/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM
/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE targetDefinitions [
<!ELEMENT targetDefinitions (board)>
<!ELEMENT board (name, dbgIF+, dbgDEV, mcuId)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT dbgIF (#PCDATA)>
<!ELEMENT dbgDEV (#PCDATA)>
<!ELEMENT mcuId (#PCDATA)>
<!ATTLIST board id CDATA #REQUIRED>
]>
<targetDefinitions>
<board id="nucleo-f446re">
<name>NUCLEO-F446RE</name>
<dbgIF>JTAG</dbgIF>
<dbgIF>SWD</dbgIF>
<dbgDEV>ST-Link</dbgDEV>
<mcuId>stm32f446retx</mcuId>
</board>
</targetDefinitions>

View File

@@ -0,0 +1,9 @@
# gpio.s
# Trevor Barnes
# CE2801-031
# Description: A file to handle the GPIO behavior of the Dev Board
.syntax unified
.cpu cortex-m4
.thumb
.section .text

25
lab3subroutines/src/led.s Normal file
View File

@@ -0,0 +1,25 @@
# led.s
# Trevor Barnes
# CE2801-031
# Description: A file for handling the LED pins on the Dev Board
# Lights are on PB5-PB15 except PB11
.syntax unified
.cpu cortex-m4
.thumb
.section .text
# Base RCC
.equ RCC_BASE, 0x40023800
# GPIOB Enable Register
.equ RCC_AHB1ENR, 0x30
# GPIOB Enable
.equ RCC_GPIOBEN, 1<<1
# Base GPIOB Location
.equ GPIOB_BASE, 0x40020400
# GPIO Mode Register
.equ GPIO_MODER, 0x00
# GPIO Output Data Register
.equ GPIO_ODR, 0x14

View File

@@ -0,0 +1,15 @@
# main.s
# Trevor Barnes
# CE2801-031
# Lab 3: Subroutines
# Description:
.syntax unified
.cpu cortex-m4
.thumb
.section .text
.global main
main:

View File

@@ -0,0 +1,246 @@
/**
******************************************************************************
* @file startup_stm32.s
* @author Ac6
* @version V1.0.0
* @date 12-June-2014
******************************************************************************
*/
.syntax unified
.cpu cortex-m4
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
.equ BootRAM, 0xF1E0F85F
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
CopyDataInit:
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4
LoopCopyDataInit:
ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
str r3, [r2]
adds r2, r2, #4
LoopFillZerobss:
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
LoopForever:
b LoopForever
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
*
* @param None
* @retval : None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******************************************************************************
*
* The minimal vector table for a Cortex-M. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******************************************************************************/
.weak NMI_Handler
.thumb_set NMI_Handler,Default_Handler
.weak HardFault_Handler
.thumb_set HardFault_Handler,Default_Handler
.weak MemManage_Handler
.thumb_set MemManage_Handler,Default_Handler
.weak BusFault_Handler
.thumb_set BusFault_Handler,Default_Handler
.weak UsageFault_Handler
.thumb_set UsageFault_Handler,Default_Handler
.weak SVC_Handler
.thumb_set SVC_Handler,Default_Handler
.weak DebugMon_Handler
.thumb_set DebugMon_Handler,Default_Handler
.weak PendSV_Handler
.thumb_set PendSV_Handler,Default_Handler
.weak SysTick_Handler
.thumb_set SysTick_Handler,Default_Handler
.weak SystemInit
/************************ (C) COPYRIGHT Ac6 *****END OF FILE****/

View File

@@ -0,0 +1,82 @@
/**
*****************************************************************************
**
** File : sysmem.c
**
** Author : Ac6
**
** Abstract : System Workbench Minimal System Memory calls file
**
** For more information about which c-functions
** need which of these lowlevel functions
** please consult the Newlib libc-manual
**
** Environment : System Workbench for MCU
**
** Distribution: The file is distributed “as is,” without any warranty
** of any kind.
**
*****************************************************************************
**
** <h2><center>&copy; COPYRIGHT(c) 2014 Ac6</center></h2>
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
** 1. Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** 3. Neither the name of Ac6 nor the names of its contributors
** may be used to endorse or promote products derived from this software
** without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
*****************************************************************************
*/
/* Includes */
#include <errno.h>
#include <stdio.h>
/* Variables */
extern int errno;
register char * stack_ptr asm("sp");
/* Functions */
/**
_sbrk
Increase program data space. Malloc and related functions depend on this
**/
caddr_t _sbrk(int incr)
{
extern char end asm("end");
static char *heap_end;
char *prev_heap_end;
if (heap_end == 0)
heap_end = &end;
prev_heap_end = heap_end;
if (heap_end + incr > stack_ptr)
{
errno = ENOMEM;
return (caddr_t) -1;
}
heap_end += incr;
return (caddr_t) prev_heap_end;
}