diff options
author | root <root@lab.panaceas.james.local> | 2013-10-10 23:09:05 +0100 |
---|---|---|
committer | root <root@lab.panaceas.james.local> | 2013-10-10 23:09:05 +0100 |
commit | 31ca140f04a6c3188376ed8230f345824f86a313 (patch) | |
tree | 26d203c357b91439c61733d6b1f19fc26cc742e0 /software | |
parent | bb923959acd3b3fd516460f0b1357b30befa7874 (diff) | |
download | pong-31ca140f04a6c3188376ed8230f345824f86a313.tar.gz pong-31ca140f04a6c3188376ed8230f345824f86a313.tar.bz2 pong-31ca140f04a6c3188376ed8230f345824f86a313.zip |
first working makefile
Diffstat (limited to 'software')
-rw-r--r-- | software/Makefile | 60 | ||||
-rw-r--r-- | software/pong3/.cproject | 60 | ||||
-rw-r--r-- | software/pong3/pong3.c | 141 | ||||
-rw-r--r-- | software/pong3_bsp/.cproject | 48 | ||||
-rw-r--r-- | software/pong3_bsp/settings.bsp | 4 | ||||
-rwxr-xr-x | software/wrap.sh | 11 |
6 files changed, 206 insertions, 118 deletions
diff --git a/software/Makefile b/software/Makefile new file mode 100644 index 0000000..13116c7 --- /dev/null +++ b/software/Makefile @@ -0,0 +1,60 @@ +# +# + +ELFDIR=../software/pong3 +BSPDIR=../software/pong3_bsp +ELF=pong3.elf + +SOPCINFO=../my_sys.sopcinfo +SOF=../pong3.sof + +run: load_elf.stamp + ./wrap.sh nios2-terminal + +flash: load_sof.stamp sof.flash elf.flash ${BSPDIR}/system.h + BASE=` grep EPCS_FLASH_CONTROLLER_0_BASE ${BSPDIR}/system.h | awk '{print $$3}' ` && \ + ./wrap.sh nios2-flash-programmer sof.flash --base=$${BASE} --epcs --accept-bad-sysid --device=1 --instance=0 --program --verbose && \ + ./wrap.sh nios2-flash-programmer elf.flash --base=$${BASE} --epcs --accept-bad-sysid --device=1 --instance=0 --program --verbose -g + +sof.flash: ${SOF} + ./wrap.sh sof2flash --input=$< --output=$@ --epcs --verbose + +elf.flash: ${ELFDIR}/${ELF} sof.flash + ./wrap.sh elf2flash --input=${ELFDIR}/${ELF} --output=$@ --epcs --after=sof.flash --verbose + + + + + + + +load_elf.stamp:load_sof.stamp ${ELFDIR}/${ELF} + ./wrap.sh nios2-download ${ELFDIR}/${ELF} -g + +load_sof.stamp: ${SOF} + ./wrap.sh quartus_pgm -m JTAG -o 'p;../pong3.sof' + +${ELFDIR}/${ELF}: ${BSPDIR}/libhal_bsp.a + ./wrap.sh ${MAKE} -C ${ELFDIR} + + +${BSPDIR}/libhal_bsp.a:${BSPDIR}/system.h + ./wrap.sh ${MAKE} -C ${BSPDIR} + +${BSPDIR}/system.h:${SOPCINFO} + rm -f $@ + (cd ${BSPDIR} && ${PWD}/wrap.sh ./create-this-bsp ) + + +clean: + ./wrap.sh ${MAKE} -C ${BSPDIR} clean + ./wrap.sh ${MAKE} -C ${ELFDIR} clean + /bin/rm -f sof.flash elf.flash + /bin/rm -rf ${BSPDIR}/drivers ${BSPDIR}/HAL ${BSPDIR}/linker.h ${BSPDIR}/linker.x ${BSPDIR}/system.h ${BSPDIR}/summary.html ${BSPDIR}/public.mk ${BSPDIR}/mem_init.mk ${BSPDIR}/memory.gdb ${BSPDIR}/alt_sys_init.c + + + + + + + diff --git a/software/pong3/.cproject b/software/pong3/.cproject index ae6d1bc..f15f89f 100644 --- a/software/pong3/.cproject +++ b/software/pong3/.cproject @@ -3,19 +3,19 @@ <cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> <storageModule moduleId="org.eclipse.cdt.core.settings"> - <buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763"> - <storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763" moduleId="org.eclipse.cdt.core.settings"/> + <buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440"> + <storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440" moduleId="org.eclipse.cdt.core.settings"/> </buildSystem> - <cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763"> + <cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440"> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration buildProperties="" description="" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763" name="Nios II" parent="org.eclipse.cdt.build.core.prefbase.cfg"> - <folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763." name="/" resourcePath=""> - <toolChain id="altera.nios2.linux.gcc4.1592970977" name="Linux Nios II GCC4" superClass="altera.nios2.linux.gcc4"> - <targetPlatform id="altera.nios2.linux.gcc4.988746646" name="Nios II" superClass="altera.nios2.linux.gcc4"/> - <builder buildPath="${workspace_loc://pong3}" id="cdt.managedbuild.target.gnu.builder.base.142418973" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> - <tool id="cdt.managedbuild.tool.gnu.archiver.base.1625897181" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> - <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1933293821" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> - <option id="gnu.cpp.compiler.option.preprocessor.undef.710001009" name="Undefined symbols (-U)" superClass="gnu.cpp.compiler.option.preprocessor.undef" valueType="undefDefinedSymbols"> + <configuration buildProperties="" description="" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440" name="Nios II" parent="org.eclipse.cdt.build.core.prefbase.cfg"> + <folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440." name="/" resourcePath=""> + <toolChain id="altera.nios2.linux.gcc4.848844856" name="Linux Nios II GCC4" superClass="altera.nios2.linux.gcc4"> + <targetPlatform id="altera.nios2.linux.gcc4.910507236" name="Nios II" superClass="altera.nios2.linux.gcc4"/> + <builder buildPath="${workspace_loc://pong3}" id="cdt.managedbuild.target.gnu.builder.base.152967692" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> + <tool id="cdt.managedbuild.tool.gnu.archiver.base.1040914647" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> + <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1419793037" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option id="gnu.cpp.compiler.option.preprocessor.undef.1238194750" name="Undefined symbols (-U)" superClass="gnu.cpp.compiler.option.preprocessor.undef" valueType="undefDefinedSymbols"> <listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__"/> <listOptionValue builtIn="false" value="__FLT_EPSILON__"/> <listOptionValue builtIn="false" value="__DEC64_MANT_DIG__"/> @@ -151,10 +151,10 @@ <listOptionValue builtIn="false" value="__CHAR16_TYPE__"/> <listOptionValue builtIn="false" value="__cplusplus"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.579269023" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.473814365" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> </tool> - <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1403439131" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> - <option id="gnu.c.compiler.option.preprocessor.undef.symbol.1842834456" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol" valueType="undefDefinedSymbols"> + <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.540100236" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> + <option id="gnu.c.compiler.option.preprocessor.undef.symbol.1852800441" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol" valueType="undefDefinedSymbols"> <listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__"/> <listOptionValue builtIn="false" value="__FLT_EPSILON__"/> <listOptionValue builtIn="false" value="__DEC64_MANT_DIG__"/> @@ -282,23 +282,23 @@ <listOptionValue builtIn="false" value="unix"/> <listOptionValue builtIn="false" value="__CHAR16_TYPE__"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1504475877" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.952505848" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> </tool> - <tool id="cdt.managedbuild.tool.gnu.c.linker.base.537533455" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> - <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.230683032" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"> - <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1562487580" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> + <tool id="cdt.managedbuild.tool.gnu.c.linker.base.780339284" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> + <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1093798203" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1769791579" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/> </inputType> </tool> - <tool id="cdt.managedbuild.tool.gnu.assembler.base.664604318" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> - <inputType id="cdt.managedbuild.tool.gnu.assembler.input.455490736" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> + <tool id="cdt.managedbuild.tool.gnu.assembler.base.1967007695" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.938120387" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> </tool> </toolChain> </folderInfo> </configuration> </storageModule> - <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763" moduleId="org.eclipse.cdt.core.settings" name="Nios II"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440" moduleId="org.eclipse.cdt.core.settings" name="Nios II"> <externalSettings/> <extensions> <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/> @@ -313,32 +313,32 @@ </cconfiguration> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <project id="pong3.null.495750362" name="pong3"/> + <project id="pong3.null.1631886421" name="pong3"/> </storageModule> <storageModule moduleId="scannerConfiguration"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> - <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1933293821;cdt.managedbuild.tool.gnu.cpp.compiler.input.579269023"> - <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/> - <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> + <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440.;cdt.managedbuild.tool.gnu.c.compiler.base.540100236;cdt.managedbuild.tool.gnu.c.compiler.input.952505848"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> + <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> <buildOutputProvider> <openAction enabled="true" filePath=""/> <parser enabled="true"/> </buildOutputProvider> <scannerInfoProvider id="specsFile"> - <runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.cpp"" command="nios2-elf-g++" useDefault="true"/> + <runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="nios2-elf-gcc" useDefault="true"/> <parser enabled="true"/> </scannerInfoProvider> </profile> </scannerConfigBuildInfo> - <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1609840763.;cdt.managedbuild.tool.gnu.c.compiler.base.1403439131;cdt.managedbuild.tool.gnu.c.compiler.input.1504475877"> - <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> - <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> + <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1741772440.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1419793037;cdt.managedbuild.tool.gnu.cpp.compiler.input.473814365"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/> + <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> <buildOutputProvider> <openAction enabled="true" filePath=""/> <parser enabled="true"/> </buildOutputProvider> <scannerInfoProvider id="specsFile"> - <runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="nios2-elf-gcc" useDefault="true"/> + <runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.cpp"" command="nios2-elf-g++" useDefault="true"/> <parser enabled="true"/> </scannerInfoProvider> </profile> diff --git a/software/pong3/pong3.c b/software/pong3/pong3.c index 63ae56c..0e88ac8 100644 --- a/software/pong3/pong3.c +++ b/software/pong3/pong3.c @@ -13,59 +13,12 @@ gpu_write (unsigned int reg, unsigned int data) IOWR (GPU_0_BASE, reg << 2, data); } -static int -find_intersection (int x, int y, int xd, int yd, int t) -{ - - // super lazy - we should use the power of MATHS - - while (x != t) - { - x += xd; - y += yd; - - if (y < 0) - y = 0; - if (y > 479) - y = 479; - if ((y == 479) || (y == 0)) - yd = -yd; - - if ((x == 639) || (x == 0)) - xd = -xd; - } - - return y; -} - -static int -dir (int a, int b) -{ - if (a > b) - return 1; - if (a < b) - return -1; - return 0; -} - -static void -move_bat (int *b, int db) -{ - - *b += dir (db, *b); - if (*b < 20) - *b = 20; - if (*b > 459) - *b = 459; - -} - static void load_sprite (void) { // RRR GGG BBB // set the sprite color 111 010 000 - orange - gpu_write (4, 0x01D0); + gpu_write (5, 0x01D0); // squirt the bromium logo into the sprite gpu_write (0x10, 0x00C0); @@ -86,6 +39,60 @@ load_sprite (void) gpu_write (0x1f, 0x00C0); } + +static int +dir (int a, int b) +{ + if (a > b) + return 1; + if (a < b) + return -1; + return 0; +} + +static void +move_bat (int *b, int db) +{ + *b += dir (db, *b); +} + +static int +squish (int *v, int min, int max) +{ + if (*v < min) + { + *v = min; + return 1; + } + if (*v >= max) + { + *v = max - 1; + return 1; + } + return 0; +} + +static int +find_intersection (int x, int y, int xd, int yd, int t) +{ + + // super lazy - we should use the power of MATHS + + while (x != t) + { + x += xd; + y += yd; + + if (squish (&y, 0, 480)) + yd = -yd; + + if (squish (&x, 0, 640)) + xd = -xd; + } + + return y; +} + int main (void) { @@ -117,35 +124,45 @@ main (void) { x += xd; y += yd; - if (y < 0) - y = 0; - if (y > 479) - y = 479; - if ((y == 479) || (y == 0)) + + + if (squish (&y, 0, 480)) yd = -yd; - if ((x == 639) || (x == 0)) + if (squish (&x, 0, 640)) { - xd = -xd; + xd = (rand () % 3) + 1; + if (x) + xd = -xd; yd = rand () % 7; yd -= 3; - dbat0 = find_intersection (x + xd, y + yd, xd, yd, 0); - dbat1 = find_intersection (x + xd, y + yd, xd, yd, 639); + + if (x) + { + dbat0 = find_intersection (x + xd, y + yd, xd, yd, 0); + dbat1 = 480 / 2; + } + else + { + dbat0 = 480 / 2; + + dbat1 = find_intersection (x + xd, y + yd, xd, yd, 639); + } } move_bat (&bat0, dbat0); move_bat (&bat1, dbat1); - gpu_write (0, x); - gpu_write (1, y); + gpu_write (1, x + 0x80); + gpu_write (2, y + 0x80); + gpu_write (3, bat0 + 0x80); + gpu_write (4, bat1 + 0x80); - gpu_write (2, bat0); - gpu_write (3, bat1); + gpu_write (0, 0); msleep (2); } } } -//------------------------------------------------------------------------- diff --git a/software/pong3_bsp/.cproject b/software/pong3_bsp/.cproject index bca629e..aaab98e 100644 --- a/software/pong3_bsp/.cproject +++ b/software/pong3_bsp/.cproject @@ -3,19 +3,19 @@ <cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> <storageModule moduleId="org.eclipse.cdt.core.settings"> - <buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873"> - <storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873" moduleId="org.eclipse.cdt.core.settings"/> + <buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754"> + <storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754" moduleId="org.eclipse.cdt.core.settings"/> </buildSystem> - <cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873"> + <cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754"> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration buildProperties="" description="" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873" name="Nios II" parent="org.eclipse.cdt.build.core.prefbase.cfg"> - <folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873." name="/" resourcePath=""> - <toolChain id="altera.nios2.linux.gcc4.9855396" name="Linux Nios II GCC4" superClass="altera.nios2.linux.gcc4"> - <targetPlatform id="altera.nios2.linux.gcc4.2140129943" name="Nios II" superClass="altera.nios2.linux.gcc4"/> - <builder buildPath="${workspace_loc://pong3_bsp}" id="cdt.managedbuild.target.gnu.builder.base.1474186794" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> - <tool id="cdt.managedbuild.tool.gnu.archiver.base.817937252" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> - <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1813359900" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> - <option id="gnu.cpp.compiler.option.preprocessor.undef.681487502" superClass="gnu.cpp.compiler.option.preprocessor.undef" valueType="undefDefinedSymbols"> + <configuration buildProperties="" description="" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754" name="Nios II" parent="org.eclipse.cdt.build.core.prefbase.cfg"> + <folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754." name="/" resourcePath=""> + <toolChain id="altera.nios2.linux.gcc4.578126036" name="Linux Nios II GCC4" superClass="altera.nios2.linux.gcc4"> + <targetPlatform id="altera.nios2.linux.gcc4.1516993476" name="Nios II" superClass="altera.nios2.linux.gcc4"/> + <builder buildPath="${workspace_loc://pong3_bsp}" id="cdt.managedbuild.target.gnu.builder.base.1752385920" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> + <tool id="cdt.managedbuild.tool.gnu.archiver.base.716497011" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> + <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1037028462" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option id="gnu.cpp.compiler.option.preprocessor.undef.846709354" superClass="gnu.cpp.compiler.option.preprocessor.undef" valueType="undefDefinedSymbols"> <listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__"/> <listOptionValue builtIn="false" value="__FLT_EPSILON__"/> <listOptionValue builtIn="false" value="__DEC64_MANT_DIG__"/> @@ -151,10 +151,10 @@ <listOptionValue builtIn="false" value="__CHAR16_TYPE__"/> <listOptionValue builtIn="false" value="__cplusplus"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1182153276" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1585848206" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> </tool> - <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.437673634" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> - <option id="gnu.c.compiler.option.preprocessor.undef.symbol.1800356526" superClass="gnu.c.compiler.option.preprocessor.undef.symbol" valueType="undefDefinedSymbols"> + <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.801049722" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> + <option id="gnu.c.compiler.option.preprocessor.undef.symbol.139423711" superClass="gnu.c.compiler.option.preprocessor.undef.symbol" valueType="undefDefinedSymbols"> <listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__"/> <listOptionValue builtIn="false" value="__FLT_EPSILON__"/> <listOptionValue builtIn="false" value="__DEC64_MANT_DIG__"/> @@ -282,23 +282,23 @@ <listOptionValue builtIn="false" value="unix"/> <listOptionValue builtIn="false" value="__CHAR16_TYPE__"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2106556578" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.556327539" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> </tool> - <tool id="cdt.managedbuild.tool.gnu.c.linker.base.582362953" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> - <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.682475739" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"> - <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.208725282" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> + <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1531131981" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> + <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.893346218" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1294537006" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/> </inputType> </tool> - <tool id="cdt.managedbuild.tool.gnu.assembler.base.746360663" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> - <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1493526707" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> + <tool id="cdt.managedbuild.tool.gnu.assembler.base.189505706" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1775744136" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> </tool> </toolChain> </folderInfo> </configuration> </storageModule> - <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873" moduleId="org.eclipse.cdt.core.settings" name="Nios II"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754" moduleId="org.eclipse.cdt.core.settings" name="Nios II"> <externalSettings/> <extensions> <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/> @@ -313,12 +313,12 @@ </cconfiguration> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <project id="pong3_bsp.null.637440566" name="pong3_bsp"/> + <project id="pong3_bsp.null.649544993" name="pong3_bsp"/> </storageModule> <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> <storageModule moduleId="scannerConfiguration"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> - <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873.;cdt.managedbuild.tool.gnu.c.compiler.base.437673634;cdt.managedbuild.tool.gnu.c.compiler.input.2106556578"> + <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754.;cdt.managedbuild.tool.gnu.c.compiler.base.801049722;cdt.managedbuild.tool.gnu.c.compiler.input.556327539"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> <buildOutputProvider> @@ -331,7 +331,7 @@ </scannerInfoProvider> </profile> </scannerConfigBuildInfo> - <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1018767873.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1813359900;cdt.managedbuild.tool.gnu.cpp.compiler.input.1182153276"> + <scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754;preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.245290754.;cdt.managedbuild.tool.gnu.cpp.compiler.base.1037028462;cdt.managedbuild.tool.gnu.cpp.compiler.input.1585848206"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/> <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> <buildOutputProvider> diff --git a/software/pong3_bsp/settings.bsp b/software/pong3_bsp/settings.bsp index e567b80..6bafac0 100644 --- a/software/pong3_bsp/settings.bsp +++ b/software/pong3_bsp/settings.bsp @@ -2,8 +2,8 @@ <sch:Settings xmlns:sch="http://www.altera.com/embeddedsw/bsp/schema"> <BspType>hal</BspType> <BspVersion>default</BspVersion> - <BspGeneratedTimeStamp>Oct 10, 2013 11:49:08 AM</BspGeneratedTimeStamp> - <BspGeneratedUnixTimeStamp>1381402148374</BspGeneratedUnixTimeStamp> + <BspGeneratedTimeStamp>Oct 10, 2013 11:06:28 PM</BspGeneratedTimeStamp> + <BspGeneratedUnixTimeStamp>1381442788161</BspGeneratedUnixTimeStamp> <BspGeneratedLocation>/home/root/projects/altera/pong3/software/pong3_bsp</BspGeneratedLocation> <BspSettingsFile>./settings.bsp</BspSettingsFile> <SopcDesignFile>../../my_sys.sopcinfo</SopcDesignFile> diff --git a/software/wrap.sh b/software/wrap.sh new file mode 100755 index 0000000..4caed0f --- /dev/null +++ b/software/wrap.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +AD=/software/apps/altera/quartus_ii_13.0sp1 +LL=linux +QUARTUS_ROOTDIR="${AD}/quartus" +PATH="${AD}/quartus/bin:${AD}/nios2eds/sdk2/bin:${AD}/nios2eds/bin:${AD}/nios2eds/bin/gnu/H-i686-pc-linux-gnu/bin:${PATH}" +LD_LIBRARY_PATH="${AD}/quartus/${LL}:${LD_LIBRARY_PATH}" + +export LD_LIBRARY_PATH PATH QUARTUS_ROOTDIR + +"$@" |