summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FreedomStudio/E51FPGA/vectored_interrupts/.cproject220
-rw-r--r--FreedomStudio/E51FPGA/vectored_interrupts/.gitignore1
-rw-r--r--FreedomStudio/E51FPGA/vectored_interrupts/.project233
-rw-r--r--FreedomStudio/E51FPGA/vectored_interrupts/sifive-coreplexip-e51-arty.cfg31
-rw-r--r--bsp/env/coreplexip-e31-arty/init.c13
-rw-r--r--bsp/env/coreplexip-e31-arty/platform.h5
-rw-r--r--bsp/env/ventry.S319
-rw-r--r--software/vectored_interrupts/Makefile10
-rwxr-xr-xsoftware/vectored_interrupts/vectored_interruptsbin0 -> 188880 bytes
-rw-r--r--software/vectored_interrupts/vectored_interrupts.c216
10 files changed, 1046 insertions, 2 deletions
diff --git a/FreedomStudio/E51FPGA/vectored_interrupts/.cproject b/FreedomStudio/E51FPGA/vectored_interrupts/.cproject
new file mode 100644
index 0000000..c50fa56
--- /dev/null
+++ b/FreedomStudio/E51FPGA/vectored_interrupts/.cproject
@@ -0,0 +1,220 @@
+<?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="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1419430722">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1419430722" 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 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="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1419430722" name="Debug" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug">
+ <folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1419430722." name="/" resourcePath="">
+ <toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.debug.1407212463" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.debug">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.1442629066" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting.1304654652" name="Create extended listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting" useByScannerDiscovery="false"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize.952377303" name="Print size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.1145706094" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" useByScannerDiscovery="true" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.debug" valueType="enumerated"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.120899886" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" useByScannerDiscovery="true" value="false" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.1496840810" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" useByScannerDiscovery="true" value="false" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.1808248879" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" useByScannerDiscovery="true" value="false" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.1701706933" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" useByScannerDiscovery="true" value="false" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.745111521" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level" useByScannerDiscovery="true" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.max" valueType="enumerated"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1611143071" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format" useByScannerDiscovery="true"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.1877960829" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" useByScannerDiscovery="false" value="RISC-V GCC/Newlib" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix.762982118" name="Prefix" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix" useByScannerDiscovery="false" value="riscv64-unknown-elf-" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c.762197847" name="C compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c" useByScannerDiscovery="false" value="gcc" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp.388455619" name="C++ compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp" useByScannerDiscovery="false" value="g++" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar.951147889" name="Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar" useByScannerDiscovery="false" value="ar" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy.883015188" name="Hex/Bin converter" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy" useByScannerDiscovery="false" value="objcopy" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump.1115241876" name="Listing generator" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump" useByScannerDiscovery="false" value="objdump" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size.1484910155" name="Size command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size" useByScannerDiscovery="false" value="size" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make.1965023351" name="Build command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make" useByScannerDiscovery="false" value="make" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm.1524666999" name="Remove command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm" useByScannerDiscovery="false" value="rm" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.base.1788482879" name="Architecture" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.base" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.arch.rv64i" valueType="enumerated"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.multiply.1035081321" name="Multiply extension (RVM)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.multiply" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic.632559401" name="Atomic extension (RVA)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed.1722118225" name="Compressed extension (RVC)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.abi.integer.281117582" name="Integer ABI" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.abi.integer" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.abi.lp64" valueType="enumerated"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.1122876700" name="Code model" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.any" valueType="enumerated"/>
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.2059749159" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/coreplexip_welcome}/Debug" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.964786236" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1772574500" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.1451354185" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths.2050116277" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths" useByScannerDiscovery="true" valueType="includePath">
+ <listOptionValue builtIn="false" value="../../../../bsp/include"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/env"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/env/coreplexip-e51-arty"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/drivers"/>
+ <listOptionValue builtIn="false" value="../bsp/drivers"/>
+ <listOptionValue builtIn="false" value="../bsp/env"/>
+ <listOptionValue builtIn="false" value="../bsp/env/coreplexip-e51-arty"/>
+ <listOptionValue builtIn="false" value="../bsp/include"/>
+ </option>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.other.1801720442" name="Other assembler flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.other" useByScannerDiscovery="false" value="-c" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.asmlisting.452480405" name="Generate assembler listing (-Wa,-adhlns=&quot;$@.lst&quot;)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.asmlisting" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.31099272" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.424460842" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs.1682056018" name="Defined symbols (-D)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="VECT_IRQ"/>
+ </option>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths.798701398" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
+ <listOptionValue builtIn="false" value="../bsp/drivers"/>
+ <listOptionValue builtIn="false" value="../bsp/env"/>
+ <listOptionValue builtIn="false" value="../bsp/env/coreplexip-e51-arty"/>
+ <listOptionValue builtIn="false" value="../bsp/include"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/include"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/env"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/env/coreplexip-e51-arty"/>
+ <listOptionValue builtIn="false" value="../../../../bsp/drivers"/>
+ </option>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.other.2042911660" name="Other compiler flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.other" useByScannerDiscovery="true" value="-include sys/cdefs.h -fno-builtin-printf -c" valueType="string"/>
+ <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.1695943366" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler.1929533144" name="GNU RISC-V Cross C++ Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.289860176" name="GNU RISC-V Cross C Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections.829017513" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.nostart.411410557" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.nostart" useByScannerDiscovery="false" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.libs.1839746398" name="Libraries (-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.libs" useByScannerDiscovery="false" valueType="libs">
+ <listOptionValue builtIn="false" value="c"/>
+ <listOptionValue builtIn="false" value="wrap-E51FPGA"/>
+ </option>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.paths.1780520059" name="Library search path (-L)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.paths" useByScannerDiscovery="false" valueType="libPaths">
+ <listOptionValue builtIn="false" value="../../wrap-E51FPGA/Debug"/>
+ <listOptionValue builtIn="false" value="../"/>
+ </option>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.other.724386459" name="Other linker flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.other" useByScannerDiscovery="false" value="-Wl,--start-group -Wl,--end-group -Wl,--wrap=malloc -Wl,--wrap=free -Wl,--wrap=open -Wl,--wrap=lseek -Wl,--wrap=read -Wl,--wrap=write -Wl,--wrap=fstat -Wl,--wrap=stat -Wl,--wrap=close -Wl,--wrap=link -Wl,--wrap=unlink -Wl,--wrap=execve -Wl,--wrap=fork -Wl,--wrap=getpid -Wl,--wrap=kill -Wl,--wrap=wait -Wl,--wrap=isatty -Wl,--wrap=times -Wl,--wrap=sbrk -Wl,--wrap=_exit" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.scriptfile.1308651449" name="Script files (-T)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/bsp/env/coreplexip-e51-arty/flash.lds}&quot;"/>
+ </option>
+ <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.1622617219" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker.308259056" name="GNU RISC-V Cross C++ Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections.1728896073" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver.1440702077" name="GNU RISC-V Cross Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash.72955671" name="GNU RISC-V Cross Create Flash Image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting.896585596" name="GNU RISC-V Cross Create Listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source.1085159845" name="Display source (--source|-S)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders.1809323208" name="Display all headers (--all-headers|-x)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle.1876163022" name="Demangle names (--demangle|-C)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers.197772274" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide.2070658666" name="Wide lines (--wide|-w)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide" value="true" valueType="boolean"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize.1974544044" name="GNU RISC-V Cross Print Size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format.1826132396" name="Size format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format" useByScannerDiscovery="false"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.188392491">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.188392491" 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 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="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.188392491" name="Release" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release">
+ <folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.188392491." name="/" resourcePath="">
+ <toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release.798161331" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.417446835" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting.1743854251" name="Create extended listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize.1631722448" name="Print size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.1683678794" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.size" valueType="enumerated"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.1641052347" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.336648016" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.558797525" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.2037007232" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.1742776144" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1933889928" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.2063832146" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" value="RISC-V GCC/Newlib" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix.381172939" name="Prefix" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix" value="riscv64-unknown-elf-" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c.965139584" name="C compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c" value="gcc" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp.165778736" name="C++ compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp" value="g++" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar.1877651524" name="Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar" value="ar" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy.1312454454" name="Hex/Bin converter" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy" value="objcopy" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump.1539636938" name="Listing generator" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump" value="objdump" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size.744988053" name="Size command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size" value="size" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make.198003765" name="Build command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make" value="make" valueType="string"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm.190439479" name="Remove command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm" value="rm" valueType="string"/>
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1087126443" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/coreplexip_welcome}/Release" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1100639240" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1852055175" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.684576923" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
+ <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.732504559" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.743554394" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
+ <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.2132640858" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler.351634096" name="GNU RISC-V Cross C++ Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.1633934157" name="GNU RISC-V Cross C Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections.1696261404" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections" value="true" valueType="boolean"/>
+ <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.1361926988" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker.2097010512" name="GNU RISC-V Cross C++ Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections.446955466" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver.1446800331" name="GNU RISC-V Cross Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash.917780362" name="GNU RISC-V Cross Create Flash Image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash"/>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting.1881705446" name="GNU RISC-V Cross Create Listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source.453203469" name="Display source (--source|-S)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders.511548754" name="Display all headers (--all-headers|-x)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle.1318187086" name="Demangle names (--demangle|-C)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers.1829288149" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers" value="true" valueType="boolean"/>
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide.663740155" name="Wide lines (--wide|-w)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide" value="true" valueType="boolean"/>
+ </tool>
+ <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize.1315189209" name="GNU RISC-V Cross Print Size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize">
+ <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format.1728208687" name="Size format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="coreplexip_welcome.ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf.84799689" name="Executable" projectType="ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.188392491;ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.188392491.;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.743554394;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.2132640858">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1419430722;ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1419430722.;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.424460842;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.1695943366">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Debug">
+ <resource resourceType="PROJECT" workspacePath="/coreplexip_welcome"/>
+ </configuration>
+ <configuration configurationName="Release">
+ <resource resourceType="PROJECT" workspacePath="/coreplexip_welcome"/>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
+</cproject>
diff --git a/FreedomStudio/E51FPGA/vectored_interrupts/.gitignore b/FreedomStudio/E51FPGA/vectored_interrupts/.gitignore
new file mode 100644
index 0000000..3df573f
--- /dev/null
+++ b/FreedomStudio/E51FPGA/vectored_interrupts/.gitignore
@@ -0,0 +1 @@
+/Debug/
diff --git a/FreedomStudio/E51FPGA/vectored_interrupts/.project b/FreedomStudio/E51FPGA/vectored_interrupts/.project
new file mode 100644
index 0000000..22e0667
--- /dev/null
+++ b/FreedomStudio/E51FPGA/vectored_interrupts/.project
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>vectored_interrupts</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>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>bsp</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>vectored_interrupts.c</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/software/vectored_interrupts/vectored_interrupts.c</locationURI>
+ </link>
+ <link>
+ <name>bsp/.DS_Store</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/.DS_Store</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/env</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/include</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/.DS_Store</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/drivers/.DS_Store</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/fe300prci</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/plic</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/.DS_Store</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/.DS_Store</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-arty.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/coreplexip-arty.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-e51-arty</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/encoding.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/encoding.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/hifive1.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/hifive1.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/start.S</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/start.S</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/ventry.S</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/ventry.S</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/.DS_Store</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/.DS_Store</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/fe300prci/fe300prci_driver.c</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/drivers/fe300prci/fe300prci_driver.c</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/fe300prci/fe300prci_driver.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/drivers/fe300prci/fe300prci_driver.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/plic/plic_driver.c</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/drivers/plic/plic_driver.c</locationURI>
+ </link>
+ <link>
+ <name>bsp/drivers/plic/plic_driver.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/drivers/plic/plic_driver.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-e51-arty/flash.lds</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/coreplexip-e51-arty/flash.lds</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-e51-arty/init.c</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/coreplexip-e51-arty/init.c</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-e51-arty/openocd.cfg</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/coreplexip-e51-arty/openocd.cfg</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-e51-arty/platform.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/coreplexip-e51-arty/platform.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/env/coreplexip-e51-arty/scratchpad.lds</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/env/coreplexip-e51-arty/scratchpad.lds</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/bits.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/bits.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/const.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/const.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices</name>
+ <type>2</type>
+ <locationURI>virtual:/virtual</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/sections.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/sections.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/smp.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/smp.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/aon.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/aon.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/clint.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/clint.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/gpio.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/gpio.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/otp.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/otp.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/plic.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/plic.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/prci.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/prci.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/pwm.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/pwm.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/spi.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/spi.h</locationURI>
+ </link>
+ <link>
+ <name>bsp/include/sifive/devices/uart.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/bsp/include/sifive/devices/uart.h</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
diff --git a/FreedomStudio/E51FPGA/vectored_interrupts/sifive-coreplexip-e51-arty.cfg b/FreedomStudio/E51FPGA/vectored_interrupts/sifive-coreplexip-e51-arty.cfg
new file mode 100644
index 0000000..8b382dc
--- /dev/null
+++ b/FreedomStudio/E51FPGA/vectored_interrupts/sifive-coreplexip-e51-arty.cfg
@@ -0,0 +1,31 @@
+# JTAG adapter setup
+adapter_khz 10000
+
+interface ftdi
+ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
+ftdi_vid_pid 0x15ba 0x002a
+
+ftdi_layout_init 0x0808 0x0a1b
+ftdi_layout_signal nSRST -oe 0x0200
+#ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
+ftdi_layout_signal LED -data 0x0800
+
+set _CHIPNAME riscv
+jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000001
+
+set _TARGETNAME $_CHIPNAME.cpu
+
+target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
+$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
+
+# Un-comment these two flash lines if you have a SPI flash and want to write
+# it.
+flash bank spi0 fespi 0x40000000 0 0 0 $_TARGETNAME.0 0x20004000
+init
+if {[ info exists pulse_srst]} {
+ ftdi_set_signal nSRST 0
+ ftdi_set_signal nSRST z
+}
+halt
+flash protect 0 64 last off
+echo "Ready for Remote Connections"
diff --git a/bsp/env/coreplexip-e31-arty/init.c b/bsp/env/coreplexip-e31-arty/init.c
index 84ae09e..888f04f 100644
--- a/bsp/env/coreplexip-e31-arty/init.c
+++ b/bsp/env/coreplexip-e31-arty/init.c
@@ -10,8 +10,14 @@
#define XSTR(x) #x
#define STR(x) XSTR(x)
+#ifndef VECT_IRQ
+ #define TRAP_ENTRY trap_entry
+#else
+ #define TRAP_ENTRY vtrap_entry
+#endif
+
extern int main(int argc, char** argv);
-extern void trap_entry();
+extern void TRAP_ENTRY();
static unsigned long get_cpu_freq()
{
@@ -57,6 +63,7 @@ typedef void (*my_interrupt_function_ptr_t) (void);
extern my_interrupt_function_ptr_t localISR[];
#endif
+#ifndef VECT_IRQ
uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc)
{
if (0){
@@ -81,6 +88,7 @@ uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc)
}
return epc;
}
+#endif
void _init()
{
@@ -89,7 +97,8 @@ void _init()
puts("core freq at " STR(CPU_FREQ) " Hz\n");
- write_csr(mtvec, &trap_entry);
+ write_csr(mtvec, ((unsigned long)&TRAP_ENTRY | MTVEC_VECTORED));
+
#endif
}
diff --git a/bsp/env/coreplexip-e31-arty/platform.h b/bsp/env/coreplexip-e31-arty/platform.h
index 42c8887..307a0c6 100644
--- a/bsp/env/coreplexip-e31-arty/platform.h
+++ b/bsp/env/coreplexip-e31-arty/platform.h
@@ -13,6 +13,11 @@
#define MCAUSE_CAUSE 0x7FFFFFFFFFFFFFFFUL
#endif
+#ifdef VECT_IRQ
+ #define MTVEC_VECTORED 0x01
+#else
+ #define MTVEC_VECTORED 0x00
+#endif
#define IRQ_M_LOCAL 16
#define MIP_MLIP(x) (1 << (IRQ_M_LOCAL + x))
diff --git a/bsp/env/ventry.S b/bsp/env/ventry.S
new file mode 100644
index 0000000..9c2f118
--- /dev/null
+++ b/bsp/env/ventry.S
@@ -0,0 +1,319 @@
+// See LICENSE for license details
+
+#ifndef VENTRY_S
+#define VENTRY_S
+
+#include "encoding.h"
+#include "sifive/bits.h"
+
+.macro TRAP_ENTRY
+ addi sp, sp, -32*REGBYTES
+
+ STORE x1, 1*REGBYTES(sp)
+ STORE x2, 2*REGBYTES(sp)
+ STORE x3, 3*REGBYTES(sp)
+ STORE x4, 4*REGBYTES(sp)
+ STORE x5, 5*REGBYTES(sp)
+ STORE x6, 6*REGBYTES(sp)
+ STORE x7, 7*REGBYTES(sp)
+ STORE x8, 8*REGBYTES(sp)
+ STORE x9, 9*REGBYTES(sp)
+ STORE x10, 10*REGBYTES(sp)
+ STORE x11, 11*REGBYTES(sp)
+ STORE x12, 12*REGBYTES(sp)
+ STORE x13, 13*REGBYTES(sp)
+ STORE x14, 14*REGBYTES(sp)
+ STORE x15, 15*REGBYTES(sp)
+ STORE x16, 16*REGBYTES(sp)
+ STORE x17, 17*REGBYTES(sp)
+ STORE x18, 18*REGBYTES(sp)
+ STORE x19, 19*REGBYTES(sp)
+ STORE x20, 20*REGBYTES(sp)
+ STORE x21, 21*REGBYTES(sp)
+ STORE x22, 22*REGBYTES(sp)
+ STORE x23, 23*REGBYTES(sp)
+ STORE x24, 24*REGBYTES(sp)
+ STORE x25, 25*REGBYTES(sp)
+ STORE x26, 26*REGBYTES(sp)
+ STORE x27, 27*REGBYTES(sp)
+ STORE x28, 28*REGBYTES(sp)
+ STORE x29, 29*REGBYTES(sp)
+ STORE x30, 30*REGBYTES(sp)
+ STORE x31, 31*REGBYTES(sp)
+.endm
+
+# Remain in M-mode after mret
+ li t0, MSTATUS_MPP
+ csrs mstatus, t0
+
+.macro TRAP_EXIT
+ LOAD x1, 1*REGBYTES(sp)
+ LOAD x2, 2*REGBYTES(sp)
+ LOAD x3, 3*REGBYTES(sp)
+ LOAD x4, 4*REGBYTES(sp)
+ LOAD x5, 5*REGBYTES(sp)
+ LOAD x6, 6*REGBYTES(sp)
+ LOAD x7, 7*REGBYTES(sp)
+ LOAD x8, 8*REGBYTES(sp)
+ LOAD x9, 9*REGBYTES(sp)
+ LOAD x10, 10*REGBYTES(sp)
+ LOAD x11, 11*REGBYTES(sp)
+ LOAD x12, 12*REGBYTES(sp)
+ LOAD x13, 13*REGBYTES(sp)
+ LOAD x14, 14*REGBYTES(sp)
+ LOAD x15, 15*REGBYTES(sp)
+ LOAD x16, 16*REGBYTES(sp)
+ LOAD x17, 17*REGBYTES(sp)
+ LOAD x18, 18*REGBYTES(sp)
+ LOAD x19, 19*REGBYTES(sp)
+ LOAD x20, 20*REGBYTES(sp)
+ LOAD x21, 21*REGBYTES(sp)
+ LOAD x22, 22*REGBYTES(sp)
+ LOAD x23, 23*REGBYTES(sp)
+ LOAD x24, 24*REGBYTES(sp)
+ LOAD x25, 25*REGBYTES(sp)
+ LOAD x26, 26*REGBYTES(sp)
+ LOAD x27, 27*REGBYTES(sp)
+ LOAD x28, 28*REGBYTES(sp)
+ LOAD x29, 29*REGBYTES(sp)
+ LOAD x30, 30*REGBYTES(sp)
+ LOAD x31, 31*REGBYTES(sp)
+
+ addi sp, sp, 32*REGBYTES
+ mret
+.endm
+
+#Vector table for E31/E51
+
+ .section .text.entry
+ .align 8
+ .global vtrap_entry
+vtrap_entry:
+ j sync_trap
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j vmsi_Handler
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j vmti_Handler
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j vmei_Handler
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j reserved
+ .align 2
+ j vlip_Handler0
+ .align 2
+ j vlip_Handler1
+ .align 2
+ j vlip_Handler2
+ .align 2
+ j vlip_Handler3
+ .align 2
+ j vlip_Handler4
+ .align 2
+ .align 2
+ j vlip_Handler5
+ .align 2
+ j vlip_Handler6
+ .align 2
+ j vlip_Handler7
+ .align 2
+ j vlip_Handler8
+ .align 2
+ j vlip_Handler9
+ .align 2
+ j vlip_Handler10
+ .align 2
+ j vlip_Handler11
+ .align 2
+ j vlip_Handler12
+ .align 2
+ j vlip_Handler13
+ .align 2
+ j vlip_Handler14
+ .align 2
+ j vlip_Handler15
+
+#synchronous trap
+sync_trap:
+ TRAP_ENTRY
+ csrr a0, mcause
+ csrr a1, mepc
+ mv a2, sp
+ jal handle_sync_trap
+ csrw mepc, a0
+ TRAP_EXIT
+
+#Machine Software Interrupt
+vmsi_Handler:
+ TRAP_ENTRY
+ jal reserved
+ TRAP_EXIT
+
+#Machine Timer Interrupt
+vmti_Handler:
+ TRAP_ENTRY
+ jal handle_m_time_interrupt
+ TRAP_EXIT
+
+#Machine External Interrupt
+vmei_Handler:
+ TRAP_ENTRY
+ jal handle_m_external_interrupt
+ TRAP_EXIT
+
+#LIP0
+vlip_Handler0:
+ TRAP_ENTRY
+ jal handle_local_interrupt0
+ TRAP_EXIT
+
+#LIP1
+vlip_Handler1:
+ TRAP_ENTRY
+ jal handle_local_interrupt1
+ TRAP_EXIT
+
+#LIP2
+vlip_Handler2:
+ TRAP_ENTRY
+ jal handle_local_interrupt2
+ TRAP_EXIT
+
+#LIP3
+vlip_Handler3:
+ TRAP_ENTRY
+ jal handle_local_interrupt3
+ TRAP_EXIT
+
+#LIP4
+vlip_Handler4:
+ TRAP_ENTRY
+ jal handle_local_interrupt4
+ TRAP_EXIT
+
+#LIP5
+vlip_Handler5:
+ TRAP_ENTRY
+ jal handle_local_interrupt5
+ TRAP_EXIT
+
+#LIP6
+vlip_Handler6:
+ TRAP_ENTRY
+ jal handle_local_interrupt6
+ TRAP_EXIT
+
+#LIP7
+vlip_Handler7:
+ TRAP_ENTRY
+ jal handle_local_interrupt7
+ TRAP_EXIT
+
+#LIP8
+vlip_Handler8:
+ TRAP_ENTRY
+ jal handle_local_interrupt8
+ TRAP_EXIT
+
+#LIP9
+vlip_Handler9:
+ TRAP_ENTRY
+ jal handle_local_interrupt9
+ TRAP_EXIT
+
+#LIP10
+vlip_Handler10:
+ TRAP_ENTRY
+ jal handle_local_interrupt10
+ TRAP_EXIT
+
+#LIP11
+vlip_Handler11:
+ TRAP_ENTRY
+ jal handle_local_interrupt11
+ TRAP_EXIT
+
+#LIP12
+vlip_Handler12:
+ TRAP_ENTRY
+ jal handle_local_interrupt12
+ TRAP_EXIT
+
+#LIP13
+vlip_Handler13:
+ TRAP_ENTRY
+ jal handle_local_interrupt13
+ TRAP_EXIT
+
+#LIP14
+vlip_Handler14:
+ TRAP_ENTRY
+ jal handle_local_interrupt14
+ TRAP_EXIT
+
+#LIP15
+vlip_Handler15:
+ TRAP_ENTRY
+ jal handle_local_interrupt15
+ TRAP_EXIT
+
+#unimplemented ISRs trap here
+.weak reserved
+reserved:
+.weak handle_local_interrupt0
+handle_local_interrupt0:
+.weak handle_local_interrupt1
+handle_local_interrupt1:
+.weak handle_local_interrupt2
+handle_local_interrupt2:
+.weak handle_local_interrupt3
+handle_local_interrupt3:
+.weak handle_local_interrupt4
+handle_local_interrupt4:
+.weak handle_local_interrupt5
+handle_local_interrupt5:
+.weak handle_local_interrupt6
+handle_local_interrupt6:
+.weak handle_local_interrupt7
+handle_local_interrupt7:
+.weak handle_local_interrupt8
+handle_local_interrupt8:
+.weak handle_local_interrupt9
+handle_local_interrupt9:
+.weak handle_local_interrupt10
+handle_local_interrupt10:
+.weak handle_local_interrupt11
+handle_local_interrupt11:
+.weak handle_local_interrupt12
+handle_local_interrupt12:
+.weak handle_local_interrupt13
+handle_local_interrupt13:
+.weak handle_local_interrupt14
+handle_local_interrupt14:
+.weak handle_local_interrupt15
+handle_local_interrupt15:
+1:
+ j 1b
+
+#endif
diff --git a/software/vectored_interrupts/Makefile b/software/vectored_interrupts/Makefile
new file mode 100644
index 0000000..4365038
--- /dev/null
+++ b/software/vectored_interrupts/Makefile
@@ -0,0 +1,10 @@
+TARGET = vectored_interrupts
+CFLAGS += -O2 -fno-builtin-printf -DVECT_IRQ
+
+BSP_BASE = ../../bsp
+
+ASM_SRCS += $(ENV_DIR)/ventry.S
+C_SRCS += vectored_interrupts.c
+C_SRCS += $(BSP_BASE)/drivers/plic/plic_driver.c
+
+include $(BSP_BASE)/env/common.mk
diff --git a/software/vectored_interrupts/vectored_interrupts b/software/vectored_interrupts/vectored_interrupts
new file mode 100755
index 0000000..fd85e7e
--- /dev/null
+++ b/software/vectored_interrupts/vectored_interrupts
Binary files differ
diff --git a/software/vectored_interrupts/vectored_interrupts.c b/software/vectored_interrupts/vectored_interrupts.c
new file mode 100644
index 0000000..61eee5e
--- /dev/null
+++ b/software/vectored_interrupts/vectored_interrupts.c
@@ -0,0 +1,216 @@
+// See LICENSE for license details.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "platform.h"
+#include <string.h>
+#include "plic/plic_driver.h"
+#include "encoding.h"
+#include <unistd.h>
+
+#ifndef _SIFIVE_COREPLEXIP_ARTY_H
+#error 'global_interrupts' demo only supported for Coreplex IP Eval Kits
+#endif
+
+// Global Instance data for the PLIC
+// for use by the PLIC Driver.
+plic_instance_t g_plic;
+
+// Structures for registering different interrupt handlers
+// for different parts of the application.
+typedef void (*interrupt_function_ptr_t) (void);
+//array of function pointers which contains the PLIC
+//interrupt handlers
+interrupt_function_ptr_t g_ext_interrupt_handlers[PLIC_NUM_INTERRUPTS];
+
+const char * instructions_msg = " \
+\n\
+ SIFIVE, INC.\n\
+E31/E51 Coreplex IP Eval Kit 'vectored_interrupts' demo. \n\
+\n\
+This demo demonstrates Vectored Interrupts capabilities of\n\
+the E31/E51 Coreplex. The vector table is defined in \n\
+bsp/env/ventry.S \n\
+Button 0 is a global external interrupt routed to the PLIC.\n\
+Button 1 is a local interrupt.\n\
+\n";
+
+void print_instructions() {
+
+ write (STDOUT_FILENO, instructions_msg, strlen(instructions_msg));
+
+}
+
+void set_timer() {
+
+ volatile uint64_t * mtime = (uint64_t*) (CLINT_CTRL_ADDR + CLINT_MTIME);
+ volatile uint64_t * mtimecmp = (uint64_t*) (CLINT_CTRL_ADDR + CLINT_MTIMECMP);
+ uint64_t now = *mtime;
+ uint64_t then = now + 1*RTC_FREQ;
+ *mtimecmp = then;
+
+ set_csr(mie, MIP_MTIP);
+}
+
+/*Entry Point for Machine Timer Interrupt Handler*/
+/*called from bsp/env/ventry.s */
+void handle_m_time_interrupt(){
+ static uint32_t onoff=1;
+
+ clear_csr(mie, MIP_MTIP);
+
+ // Set Green LED
+ if(onoff) {
+ GPIO_REG(GPIO_OUTPUT_VAL) |= (0x1 << GREEN_LED_OFFSET) ;
+ onoff=0;
+ }else {
+ GPIO_REG(GPIO_OUTPUT_VAL) &= ~((0x1 << GREEN_LED_OFFSET)) ;
+ onoff=1;
+ }
+ set_timer();
+
+ //re-enable button1 irq
+ set_csr(mie, MIP_MLIP(LOCAL_INT_BTN_1));
+
+}
+
+/*Synchronous Trap Handler*/
+/*called from bsp/env/ventry.s */
+void handle_sync_trap(uintptr_t mcause, uintptr_t epc ) {
+ write(1, "vUnhandled Trap:\n", 16);
+ _exit(1 + mcause);
+}
+
+/*Entry Point for PLIC Interrupt Handler*/
+/*called from bsp/env/ventry.s */
+void handle_m_external_interrupt(){
+ printf("In PLIC handler\n");
+ plic_source int_num = PLIC_claim_interrupt(&g_plic);
+ if ((int_num >=1 ) && (int_num < PLIC_NUM_INTERRUPTS)) {
+ g_ext_interrupt_handlers[int_num]();
+ }
+ else {
+ exit(1 + (uintptr_t) int_num);
+ }
+ PLIC_complete_interrupt(&g_plic, int_num);
+}
+
+//default empty PLIC handler
+void invalid_global_isr() {
+ printf("Unexpected global interrupt!\n");
+}
+
+/* b1 global interrupt isr */
+/*called from handle_m_external_interrupt */
+void button_0_handler() {
+ static uint32_t onoff=1;
+ // Set Green LED
+
+ printf("In Button 0 handler\n");
+
+ if(onoff) {
+ GPIO_REG(GPIO_OUTPUT_VAL) |= (0x1 << BLUE_LED_OFFSET) ;
+ onoff=0;
+ }else {
+ GPIO_REG(GPIO_OUTPUT_VAL) &= ~((0x1 << BLUE_LED_OFFSET)) ;
+ onoff=1;
+ }
+
+ //clear irq - interrupt pending register is write 1 to clear
+ GPIO_REG(GPIO_FALL_IP) |= (1<<BUTTON_0_OFFSET);
+}
+
+/*b1 local vectored irq handler */
+/*called from bsp/env/ventry.s */
+void handle_local_interrupt5() {
+ static uint32_t onoff=1;
+ // Set Green LED
+
+ printf("In Button 1 handler\n");
+
+ if(onoff) {
+ GPIO_REG(GPIO_OUTPUT_VAL) |= (0x1 << RED_LED_OFFSET) ;
+ onoff=0;
+ }else {
+ GPIO_REG(GPIO_OUTPUT_VAL) &= ~((0x1 << RED_LED_OFFSET)) ;
+ onoff=1;
+ }
+
+ //debounce by turing off until next timer tick
+ clear_csr(mie, MIP_MLIP(LOCAL_INT_BTN_1));
+}
+
+/*configures Button0 as a global gpio irq*/
+void b0_irq_init() {
+
+ //dissable hw io function
+ GPIO_REG(GPIO_IOF_EN ) &= ~(1 << BUTTON_0_OFFSET);
+
+ //set to input
+ GPIO_REG(GPIO_INPUT_EN) |= (1<<BUTTON_0_OFFSET);
+ GPIO_REG(GPIO_PULLUP_EN) |= (1<<BUTTON_0_OFFSET);
+
+ //set to interrupt on falling edge
+ GPIO_REG(GPIO_FALL_IE) |= (1<<BUTTON_0_OFFSET);
+
+ PLIC_init(&g_plic,
+ PLIC_CTRL_ADDR,
+ PLIC_NUM_INTERRUPTS,
+ PLIC_NUM_PRIORITIES);
+
+ PLIC_enable_interrupt (&g_plic, INT_DEVICE_BUTTON_0);
+ PLIC_set_priority(&g_plic, INT_DEVICE_BUTTON_0, 2);
+ g_ext_interrupt_handlers[INT_DEVICE_BUTTON_0] = button_0_handler;
+}
+
+/*configures Button1 as a local interrupt*/
+void b1_irq_init() {
+
+ //enable the interrupt
+ set_csr(mie, MIP_MLIP(LOCAL_INT_BTN_1));
+
+}
+
+/*turn down the brightness, and configure GPIO */
+void led_init() {
+ // Make sure people aren't blinded by LEDs connected here.
+ PWM0_REG(PWM_CMP0) = 0xFE;
+ PWM0_REG(PWM_CMP1) = 0xFF;
+ PWM0_REG(PWM_CMP2) = 0xFF;
+ PWM0_REG(PWM_CMP3) = 0xFF;
+ // Set up RGB LEDs for a visual.
+ GPIO_REG(GPIO_OUTPUT_EN) |= ((0x1<< RED_LED_OFFSET)| (0x1<< GREEN_LED_OFFSET)| (0x1<< BLUE_LED_OFFSET));
+ GPIO_REG(GPIO_OUTPUT_VAL) &= ~((0x1<< RED_LED_OFFSET) | (0x1<< GREEN_LED_OFFSET) | (0x1<< BLUE_LED_OFFSET));
+
+}
+
+int main(int argc, char **argv)
+{
+ //setup default global interrupt handler
+ for (int gisr = 0; gisr < PLIC_NUM_INTERRUPTS; gisr++){
+ g_ext_interrupt_handlers[PLIC_NUM_INTERRUPTS] = invalid_global_isr;
+ }
+
+ print_instructions();
+
+ led_init();
+ b0_irq_init();
+ b1_irq_init();
+
+ // Set up machine timer interrupt.
+ set_timer();
+
+ // Enable Global (PLIC) interrupts.
+ set_csr(mie, MIP_MEIP);
+
+ // Enable all interrupts
+ set_csr(mstatus, MSTATUS_MIE);
+
+
+ while(1){
+ asm volatile ("wfi");
+ }
+
+ return 0;
+
+}