├── README.md ├── c ├── Makefile ├── logibonelib.c ├── logilib.h └── logipilib.c ├── init_logibone ├── data.eeprom ├── init_eeprom.sh └── mk_logibone_eeprom.c ├── install_logibone.sh ├── install_logipi.sh ├── old ├── beaglebone_old │ ├── Makefile │ ├── README │ ├── addr_mux_logibone.sh │ ├── addr_mux_logibone.sh~ │ ├── addr_mux_mark1.sh │ ├── i2c-dev.h │ ├── logi_loader │ ├── logibone.dts │ ├── logibone.dts~ │ ├── serial_fpga_loader.c │ ├── serial_fpga_loader.c~ │ ├── setup_device-tree.sh │ ├── setup_device-tree.sh~ │ └── uEnv.txt ├── logibone_loader │ ├── install.sh │ ├── logi_loader │ └── user_space │ │ ├── Makefile │ │ └── serial_fpga_loader.c ├── logipi_loader │ ├── Makefile │ ├── README │ └── serial_fpga_loader.c ├── mark1 │ └── Mark1_DragDrop_Config │ │ ├── .metadata │ │ ├── .lock │ │ ├── .log │ │ ├── .plugins │ │ │ ├── org.eclipse.cdt.core │ │ │ │ ├── .log │ │ │ │ ├── CMSISv1p30_LPC13xx.1357656274838.pdom │ │ │ │ ├── Mark1_DragDrop_Config.1359509432808.pdom │ │ │ │ ├── TEST_IO.1357659651478.pdom │ │ │ │ ├── gpio.1358208095637.pdom │ │ │ │ ├── i2cslave.1357764580079.pdom │ │ │ │ ├── language.settings.xml │ │ │ │ └── shareddefaults.xml │ │ │ ├── org.eclipse.cdt.dsf.ui │ │ │ │ └── dialog_settings.xml │ │ │ ├── org.eclipse.cdt.make.core │ │ │ │ ├── .log │ │ │ │ ├── CMSISv1p30_LPC13xx.sc │ │ │ │ ├── Mark1_DragDrop_Config.sc │ │ │ │ ├── specs.c │ │ │ │ └── specs.cpp │ │ │ ├── org.eclipse.cdt.ui │ │ │ │ ├── CMSISv1p30_LPC13xx.build.log │ │ │ │ ├── Mark1_DragDrop_Config.build.log │ │ │ │ ├── TEST_IO.build.log │ │ │ │ ├── dialog_settings.xml │ │ │ │ ├── global-build.log │ │ │ │ ├── gpio.build.log │ │ │ │ ├── i2cslave.build.log │ │ │ │ └── usbmsd_rom.build.log │ │ │ ├── org.eclipse.core.resources │ │ │ │ ├── .history │ │ │ │ │ ├── 1 │ │ │ │ │ │ └── e0bf11f6097e00121be59c12d13b22d1 │ │ │ │ │ ├── 3 │ │ │ │ │ │ └── a0a06a97057e00121be59c12d13b22d1 │ │ │ │ │ ├── 4 │ │ │ │ │ │ └── d0df4158037e00121be59c12d13b22d1 │ │ │ │ │ ├── 5 │ │ │ │ │ │ └── 10e159040d7e00121be59c12d13b22d1 │ │ │ │ │ ├── 8 │ │ │ │ │ │ └── 9092c971087e00121be59c12d13b22d1 │ │ │ │ │ ├── 10 │ │ │ │ │ │ └── 60f1a597047e00121be59c12d13b22d1 │ │ │ │ │ ├── 11 │ │ │ │ │ │ ├── 5029a5e50c7e00121be59c12d13b22d1 │ │ │ │ │ │ └── 9096a1297992001215f8ff44a4a11b7f │ │ │ │ │ ├── 18 │ │ │ │ │ │ └── f0a2501e0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 21 │ │ │ │ │ │ └── 1070974d067e00121be59c12d13b22d1 │ │ │ │ │ ├── 25 │ │ │ │ │ │ └── f0f9612d7992001215f8ff44a4a11b7f │ │ │ │ │ ├── 26 │ │ │ │ │ │ └── b014191d077e00121be59c12d13b22d1 │ │ │ │ │ ├── 32 │ │ │ │ │ │ └── a01bd84e7992001215f8ff44a4a11b7f │ │ │ │ │ ├── 40 │ │ │ │ │ │ └── d0e3e323057e00121be59c12d13b22d1 │ │ │ │ │ ├── 44 │ │ │ │ │ │ └── 30b8c4040a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 45 │ │ │ │ │ │ ├── c0f195850c7e00121be59c12d13b22d1 │ │ │ │ │ │ └── d0b64ab00c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 47 │ │ │ │ │ │ └── 804216377992001215f8ff44a4a11b7f │ │ │ │ │ ├── 49 │ │ │ │ │ │ └── 40ee5c61067e00121be59c12d13b22d1 │ │ │ │ │ ├── 50 │ │ │ │ │ │ └── c07a95ed0c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 51 │ │ │ │ │ │ └── b09f8a00047e00121be59c12d13b22d1 │ │ │ │ │ ├── 54 │ │ │ │ │ │ └── a00f53d8037e00121be59c12d13b22d1 │ │ │ │ │ ├── 55 │ │ │ │ │ │ └── 8026b1a0f57d00121be59c12d13b22d1 │ │ │ │ │ ├── 59 │ │ │ │ │ │ └── 50c7292a0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 61 │ │ │ │ │ │ └── 90589d4f0e7e00121be59c12d13b22d1 │ │ │ │ │ ├── 62 │ │ │ │ │ │ ├── 5003a262047e00121be59c12d13b22d1 │ │ │ │ │ │ └── 9051712b017e00121be59c12d13b22d1 │ │ │ │ │ ├── 63 │ │ │ │ │ │ └── e00f94da0c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 64 │ │ │ │ │ │ ├── 50f24d3e7992001215f8ff44a4a11b7f │ │ │ │ │ │ └── 80371310047e00121be59c12d13b22d1 │ │ │ │ │ ├── 65 │ │ │ │ │ │ └── c0bbd47c0c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 66 │ │ │ │ │ │ └── 90618cdf0d7e00121be59c12d13b22d1 │ │ │ │ │ ├── 67 │ │ │ │ │ │ └── 40e14f447992001215f8ff44a4a11b7f │ │ │ │ │ ├── 69 │ │ │ │ │ │ └── 904d00fb0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 74 │ │ │ │ │ │ └── 004daf940c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 80 │ │ │ │ │ │ ├── 00722c5e0a7e00121be59c12d13b22d1 │ │ │ │ │ │ └── 60ec06db007e00121be59c12d13b22d1 │ │ │ │ │ ├── 81 │ │ │ │ │ │ └── c02c03db097e00121be59c12d13b22d1 │ │ │ │ │ ├── 84 │ │ │ │ │ │ ├── 0053f550047e00121be59c12d13b22d1 │ │ │ │ │ │ └── 20dd9cef047e00121be59c12d13b22d1 │ │ │ │ │ ├── 85 │ │ │ │ │ │ └── 5026881e0d7e00121be59c12d13b22d1 │ │ │ │ │ ├── 87 │ │ │ │ │ │ └── e09289367992001215f8ff44a4a11b7f │ │ │ │ │ ├── 88 │ │ │ │ │ │ └── 90704346047e00121be59c12d13b22d1 │ │ │ │ │ ├── 89 │ │ │ │ │ │ └── 507a8e800a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 90 │ │ │ │ │ │ └── 90d23e58037e00121be59c12d13b22d1 │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── 9059ba1d0e7e00121be59c12d13b22d1 │ │ │ │ │ ├── 94 │ │ │ │ │ │ └── 30f6eec5037e00121be59c12d13b22d1 │ │ │ │ │ ├── 95 │ │ │ │ │ │ └── c0abe0c4097e00121be59c12d13b22d1 │ │ │ │ │ ├── 1a │ │ │ │ │ │ └── 801b2a83047e00121be59c12d13b22d1 │ │ │ │ │ ├── 1f │ │ │ │ │ │ └── 501ba1700c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 2a │ │ │ │ │ │ └── 00c30af8047e00121be59c12d13b22d1 │ │ │ │ │ ├── 2f │ │ │ │ │ │ └── c0c214390e7e00121be59c12d13b22d1 │ │ │ │ │ ├── 3c │ │ │ │ │ │ ├── b023a88f0a7e00121be59c12d13b22d1 │ │ │ │ │ │ └── d03791f6037e00121be59c12d13b22d1 │ │ │ │ │ ├── 3d │ │ │ │ │ │ ├── 10334381047e00121be59c12d13b22d1 │ │ │ │ │ │ ├── a0db881a017e00121be59c12d13b22d1 │ │ │ │ │ │ └── b097f5780a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 3e │ │ │ │ │ │ └── 10389b990c7e00121be59c12d13b22d1 │ │ │ │ │ ├── 4b │ │ │ │ │ │ └── 4017fbae0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 4c │ │ │ │ │ │ └── d088499c047e00121be59c12d13b22d1 │ │ │ │ │ ├── 4d │ │ │ │ │ │ └── 002cb413047e00121be59c12d13b22d1 │ │ │ │ │ ├── 5c │ │ │ │ │ │ └── a040a4dd0d7e00121be59c12d13b22d1 │ │ │ │ │ ├── 5e │ │ │ │ │ │ └── c0ff22700e7e00121be59c12d13b22d1 │ │ │ │ │ ├── 6b │ │ │ │ │ │ └── e0ad2a990a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 6d │ │ │ │ │ │ └── c0b036370a7e00121be59c12d13b22d1 │ │ │ │ │ ├── 8b │ │ │ │ │ │ └── 505e516c0e7e00121be59c12d13b22d1 │ │ │ │ │ ├── a0 │ │ │ │ │ │ └── b0e8bf090e7e00121be59c12d13b22d1 │ │ │ │ │ ├── a1 │ │ │ │ │ │ └── 40060e1d097e00121be59c12d13b22d1 │ │ │ │ │ ├── a3 │ │ │ │ │ │ └── 400ad3eb0c7e00121be59c12d13b22d1 │ │ │ │ │ ├── a6 │ │ │ │ │ │ └── c0d0a4a3057e00121be59c12d13b22d1 │ │ │ │ │ ├── a7 │ │ │ │ │ │ └── d0a78dfd0d7e00121be59c12d13b22d1 │ │ │ │ │ ├── a9 │ │ │ │ │ │ ├── 10b68f0c047e00121be59c12d13b22d1 │ │ │ │ │ │ └── 40212de3087e00121be59c12d13b22d1 │ │ │ │ │ ├── aa │ │ │ │ │ │ ├── 7098172d0a7e00121be59c12d13b22d1 │ │ │ │ │ │ └── d0e2ede00c7e00121be59c12d13b22d1 │ │ │ │ │ ├── ae │ │ │ │ │ │ └── 5018c02e0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── af │ │ │ │ │ │ └── 10eda442047e00121be59c12d13b22d1 │ │ │ │ │ ├── b0 │ │ │ │ │ │ └── 4068b4b60c7e00121be59c12d13b22d1 │ │ │ │ │ ├── b5 │ │ │ │ │ │ └── 00325f86087e00121be59c12d13b22d1 │ │ │ │ │ ├── b6 │ │ │ │ │ │ ├── a01c4feafc7d00121be59c12d13b22d1 │ │ │ │ │ │ └── d0157354097e00121be59c12d13b22d1 │ │ │ │ │ ├── ba │ │ │ │ │ │ └── 509555190d7e00121be59c12d13b22d1 │ │ │ │ │ ├── be │ │ │ │ │ │ └── 600a6054067e00121be59c12d13b22d1 │ │ │ │ │ ├── bf │ │ │ │ │ │ └── 508fa52d047e00121be59c12d13b22d1 │ │ │ │ │ ├── c4 │ │ │ │ │ │ └── 50ab4fdaf57d00121be59c12d13b22d1 │ │ │ │ │ ├── c5 │ │ │ │ │ │ ├── 5017cc7a087e00121be59c12d13b22d1 │ │ │ │ │ │ ├── 7008baef0c7e00121be59c12d13b22d1 │ │ │ │ │ │ └── d01914be097e00121be59c12d13b22d1 │ │ │ │ │ ├── c6 │ │ │ │ │ │ ├── 40cbdc3b7992001215f8ff44a4a11b7f │ │ │ │ │ │ └── 80db3646067e00121be59c12d13b22d1 │ │ │ │ │ ├── c7 │ │ │ │ │ │ ├── 001eedf6047e00121be59c12d13b22d1 │ │ │ │ │ │ └── 30f314c1087e00121be59c12d13b22d1 │ │ │ │ │ ├── c8 │ │ │ │ │ │ └── d04bb1e0087e00121be59c12d13b22d1 │ │ │ │ │ ├── ca │ │ │ │ │ │ ├── 60ad511c047e00121be59c12d13b22d1 │ │ │ │ │ │ └── e05831740a7e00121be59c12d13b22d1 │ │ │ │ │ ├── cb │ │ │ │ │ │ └── d07646ea0c7e00121be59c12d13b22d1 │ │ │ │ │ ├── cd │ │ │ │ │ │ ├── 50b441a70a7e00121be59c12d13b22d1 │ │ │ │ │ │ └── 6065db600a7e00121be59c12d13b22d1 │ │ │ │ │ ├── ce │ │ │ │ │ │ └── 4083ffda097e00121be59c12d13b22d1 │ │ │ │ │ ├── d1 │ │ │ │ │ │ └── a00474d0f57d00121be59c12d13b22d1 │ │ │ │ │ ├── d2 │ │ │ │ │ │ └── f09e4458037e00121be59c12d13b22d1 │ │ │ │ │ ├── d6 │ │ │ │ │ │ └── f00e54590a7e00121be59c12d13b22d1 │ │ │ │ │ ├── e4 │ │ │ │ │ │ ├── 301d87740e7e00121be59c12d13b22d1 │ │ │ │ │ │ └── f0452dd5007e00121be59c12d13b22d1 │ │ │ │ │ ├── ea │ │ │ │ │ │ ├── 608865f60d7e00121be59c12d13b22d1 │ │ │ │ │ │ └── 60a8ea91047e00121be59c12d13b22d1 │ │ │ │ │ ├── ec │ │ │ │ │ │ └── 20e6cdc10c7e00121be59c12d13b22d1 │ │ │ │ │ ├── ed │ │ │ │ │ │ └── f0b765cb0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── f2 │ │ │ │ │ │ └── 00baeb450c7e00121be59c12d13b22d1 │ │ │ │ │ ├── f3 │ │ │ │ │ │ └── 606373130d7e00121be59c12d13b22d1 │ │ │ │ │ ├── f5 │ │ │ │ │ │ └── 50ddeaa20a7e00121be59c12d13b22d1 │ │ │ │ │ ├── f8 │ │ │ │ │ │ └── f04736cf0a7e00121be59c12d13b22d1 │ │ │ │ │ ├── fa │ │ │ │ │ │ └── 60060a6a0e7e00121be59c12d13b22d1 │ │ │ │ │ └── fe │ │ │ │ │ │ ├── 209714b30a7e00121be59c12d13b22d1 │ │ │ │ │ │ └── f028e62e7992001215f8ff44a4a11b7f │ │ │ │ ├── .projects │ │ │ │ │ ├── CMSISv1p30_LPC13xx │ │ │ │ │ │ ├── .indexes │ │ │ │ │ │ │ ├── e4 │ │ │ │ │ │ │ │ └── properties.index │ │ │ │ │ │ │ └── properties.index │ │ │ │ │ │ ├── .markers.snap │ │ │ │ │ │ └── .syncinfo.snap │ │ │ │ │ └── Mark1_DragDrop_Config │ │ │ │ │ │ ├── .indexes │ │ │ │ │ │ ├── de │ │ │ │ │ │ │ ├── history.index │ │ │ │ │ │ │ └── properties.index │ │ │ │ │ │ ├── e4 │ │ │ │ │ │ │ ├── history.index │ │ │ │ │ │ │ └── properties.index │ │ │ │ │ │ └── properties.index │ │ │ │ │ │ ├── .markers.snap │ │ │ │ │ │ └── .syncinfo.snap │ │ │ │ ├── .root │ │ │ │ │ ├── .indexes │ │ │ │ │ │ ├── history.version │ │ │ │ │ │ ├── properties.index │ │ │ │ │ │ └── properties.version │ │ │ │ │ ├── .markers.snap │ │ │ │ │ └── 25.tree │ │ │ │ ├── .safetable │ │ │ │ │ └── org.eclipse.core.resources │ │ │ │ └── .snap │ │ │ ├── org.eclipse.core.runtime │ │ │ │ └── .settings │ │ │ │ │ ├── org.eclipse.cdt.core.prj-CMSISv1p30_LPC13xx.prefs │ │ │ │ │ ├── org.eclipse.cdt.core.prj-Mark1_DragDrop_Config.prefs │ │ │ │ │ ├── org.eclipse.cdt.debug.core.prefs │ │ │ │ │ ├── org.eclipse.cdt.dsf.ui.prefs │ │ │ │ │ ├── org.eclipse.cdt.managedbuilder.core.prefs │ │ │ │ │ ├── org.eclipse.cdt.ui.prefs │ │ │ │ │ ├── org.eclipse.core.resources.prefs │ │ │ │ │ ├── org.eclipse.debug.core.prefs │ │ │ │ │ ├── org.eclipse.debug.ui.prefs │ │ │ │ │ ├── org.eclipse.ui.browser.prefs │ │ │ │ │ ├── org.eclipse.ui.editors.prefs │ │ │ │ │ ├── org.eclipse.ui.ide.prefs │ │ │ │ │ └── org.eclipse.ui.workbench.prefs │ │ │ ├── org.eclipse.debug.core │ │ │ │ └── .launches │ │ │ │ │ ├── Mark1_DragDrop_Config Debug.launch │ │ │ │ │ ├── TEST_IO Debug.launch │ │ │ │ │ └── i2cslave Debug.launch │ │ │ ├── org.eclipse.debug.ui │ │ │ │ ├── dialog_settings.xml │ │ │ │ └── launchConfigurationHistory.xml │ │ │ ├── org.eclipse.e4.workbench │ │ │ │ └── workbench.xmi │ │ │ ├── org.eclipse.ltk.core.refactoring │ │ │ │ └── .refactorings │ │ │ │ │ └── .workspace │ │ │ │ │ └── 2013 │ │ │ │ │ ├── 1 │ │ │ │ │ ├── 2 │ │ │ │ │ │ ├── refactorings.history │ │ │ │ │ │ └── refactorings.index │ │ │ │ │ └── 5 │ │ │ │ │ │ ├── refactorings.history │ │ │ │ │ │ └── refactorings.index │ │ │ │ │ └── 2 │ │ │ │ │ └── 8 │ │ │ │ │ ├── refactorings.history │ │ │ │ │ └── refactorings.index │ │ │ ├── org.eclipse.ltk.ui.refactoring │ │ │ │ └── dialog_settings.xml │ │ │ ├── org.eclipse.ui.editors │ │ │ │ └── dialog_settings.xml │ │ │ ├── org.eclipse.ui.ide │ │ │ │ └── dialog_settings.xml │ │ │ ├── org.eclipse.ui.workbench.texteditor │ │ │ │ └── dialog_settings.xml │ │ │ └── org.eclipse.ui.workbench │ │ │ │ ├── dialog_settings.xml │ │ │ │ └── workingsets.xml │ │ └── version.ini │ │ ├── CMSISv1p30_LPC13xx │ │ ├── .cproject │ │ ├── .project │ │ ├── Debug │ │ │ ├── libCMSISv1p30_LPC13xx.a │ │ │ ├── makefile │ │ │ ├── objects.mk │ │ │ ├── sources.mk │ │ │ └── src │ │ │ │ ├── core_cm3.d │ │ │ │ ├── core_cm3.o │ │ │ │ ├── subdir.mk │ │ │ │ ├── system_LPC13xx.d │ │ │ │ └── system_LPC13xx.o │ │ ├── cmsis_readme.txt │ │ ├── docs │ │ │ ├── CMSIS changes.htm │ │ │ ├── CMSIS debug support.htm │ │ │ ├── CMSIS_Core.htm │ │ │ └── License.doc │ │ ├── inc │ │ │ ├── LPC13xx.h │ │ │ ├── core_cm3.h │ │ │ └── system_LPC13xx.h │ │ └── src │ │ │ ├── core_cm3.c │ │ │ └── system_LPC13xx.c │ │ └── Mark1_DragDrop_Config │ │ ├── .cproject │ │ ├── .project │ │ ├── Debug │ │ ├── Mark1_DragDrop_Config.axf │ │ ├── Mark1_DragDrop_Config.map │ │ ├── blink_led_130321.bin │ │ ├── firmware.bin │ │ ├── makefile │ │ ├── objects.mk │ │ ├── sources.mk │ │ ├── src │ │ │ ├── BoardSupport.d │ │ │ ├── BoardSupport.o │ │ │ ├── ButtonDetect.d │ │ │ ├── ButtonDetect.o │ │ │ ├── FLASH.d │ │ │ ├── FLASH.o │ │ │ ├── FPGA_Config.d │ │ │ ├── FPGA_Config.o │ │ │ ├── System.d │ │ │ ├── System.o │ │ │ ├── Timers.d │ │ │ ├── Timers.o │ │ │ ├── chan fat fs │ │ │ │ ├── diskio.d │ │ │ │ ├── diskio.o │ │ │ │ ├── ff.d │ │ │ │ ├── ff.o │ │ │ │ ├── option │ │ │ │ │ ├── ccsbcs.d │ │ │ │ │ ├── ccsbcs.o │ │ │ │ │ └── subdir.mk │ │ │ │ └── subdir.mk │ │ │ ├── cr_startup_lpc13.d │ │ │ ├── cr_startup_lpc13.o │ │ │ ├── i2cslave.d │ │ │ ├── i2cslave.o │ │ │ ├── main.d │ │ │ ├── main.o │ │ │ ├── msccallback.d │ │ │ ├── msccallback.o │ │ │ ├── subdir.mk │ │ │ ├── usbdesc.d │ │ │ └── usbdesc.o │ │ └── usbmsd_rom.map │ │ ├── inc │ │ ├── BoardSupport.h │ │ ├── ButtonDetect.h │ │ ├── DataTypes.h │ │ ├── FLASH.h │ │ ├── FPGA_Config.h │ │ ├── System.h │ │ ├── Timers.h │ │ ├── compiler.h │ │ ├── config.h │ │ ├── i2cslave.h │ │ ├── msccallback.h │ │ ├── mscuser.h │ │ ├── rom_drivers.h │ │ ├── type.h │ │ ├── usb.h │ │ └── usbdesc.h │ │ ├── ld │ │ ├── usb_buffer.ld │ │ ├── usb_buffer_lib.ld │ │ └── usb_buffer_mem.ld │ │ └── src │ │ ├── BoardSupport.c │ │ ├── ButtonDetect.c │ │ ├── FLASH.c │ │ ├── FPGA_Config.c │ │ ├── System.c │ │ ├── Timers.c │ │ ├── __Previews │ │ └── i2cslave.cPreview │ │ ├── chan fat fs │ │ ├── 00readme.txt │ │ ├── diskio.c │ │ ├── diskio.h │ │ ├── ff.c │ │ ├── ff.h │ │ ├── ffconf.h │ │ ├── integer.h │ │ └── option │ │ │ ├── ccsbcs.c │ │ │ └── syscall.c.eli │ │ ├── cr_startup_lpc13.c │ │ ├── i2cslave.c │ │ ├── main.c │ │ ├── msccallback.c │ │ ├── usbdesc.c │ │ └── usbmemrom_main.c.bak └── rpi_old │ ├── Makefile │ ├── i2c_loader.h │ ├── rpi_loader │ ├── rpi_loader.cpp │ ├── rpi_loader.o │ ├── smbus.c │ ├── smbus.h │ └── smbus.o ├── python ├── logi_hal.py ├── logibone │ ├── logi.c │ └── setup.py ├── logipi │ ├── logi.c │ └── setup.py └── old │ ├── mark1-rpi.c │ └── mark1_rpi.py ├── unified_loader ├── Makefile ├── README ├── bit_bang_loader.c ├── bit_bang_loader.h ├── i2c_loader.c ├── i2c_loader.h ├── logi_loader.c └── logi_loader.h └── wishbone_utils ├── Makefile └── wb_utils.c /README.md: -------------------------------------------------------------------------------- 1 | Logi-tools 2 | ========== 3 | 4 | Software tools (loader, libraries) to be installed on the host platform (logipi/logibone). 5 | 6 | 7 | LOGI-BONE Instructions 8 | 9 | To install the logi-bone tools, run install_logibone as sudo. This will flash the cape eeprom, install the loader, compile the communication library and setup the python library 10 | 11 | 12 | LOGI-PI Instructions 13 | 14 | To install the logi-pi tools, run install_logipi as sudo. This will install the loader, compile the communication library and install the python library. 15 | 16 | For PI2 owners using the LOGIPI R1.1, you'll need to re-compile the loader using the following procedure (in logi-tools): 17 | 18 | cd unified_loader 19 | 20 | make clean 21 | 22 | make logipi_loader PI_VER=PI2 23 | 24 | sudo make install 25 | 26 | To enable SPI on latest raspbian distro, edit /boot/config.txt (as sudo) and add : 27 | 28 | dtparam=spi=on 29 | 30 | To enable I2C on latest raspbian distro, edit /boot/config.txt (as sudo )and add : 31 | 32 | dtparam=i2c_arm=on 33 | 34 | to the file. 35 | 36 | also edit /etc/modules (as sudo) and add the line : 37 | 38 | i2c-dev 39 | -------------------------------------------------------------------------------- /c/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -Wall -Werror -fpic -fsigned-char 3 | 4 | all : logipilib.o logibonelib.o 5 | 6 | clean: 7 | rm -f *.a *.o 8 | 9 | install_logipi : liblogipi.so 10 | mv liblogipi.so /usr/lib/liblogi.so 11 | cp logilib.h /usr/include 12 | 13 | install_logibone : liblogibone.so 14 | mv liblogibone.so /usr/lib/liblogi.so 15 | cp logilib.h /usr/include 16 | 17 | logipilib.o: logipilib.c 18 | $(CC) -c $(CFLAGS) logipilib.c 19 | 20 | logibonelib.o: logibonelib.c 21 | $(CC) -c $(CFLAGS) logibonelib.c 22 | 23 | liblogibone.so : logibonelib.o 24 | $(CC) -shared -o liblogibone.so logibonelib.o 25 | 26 | liblogipi.so : logipilib.o 27 | $(CC) -shared -o liblogipi.so logipilib.o 28 | 29 | -------------------------------------------------------------------------------- /c/logibonelib.c: -------------------------------------------------------------------------------- 1 | #include "logilib.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | int fd ; 15 | 16 | int logi_open(){ 17 | fd = open("/dev/logibone_mem", O_RDWR | O_SYNC); 18 | if(fd < 0){ 19 | printf("Failed to open /dev/logibone_mem"); 20 | return -1 ; 21 | } 22 | 23 | return 1 ; 24 | } 25 | 26 | void logi_close(){ 27 | close(fd); 28 | } 29 | 30 | int logi_write(unsigned char * buffer, unsigned int length, unsigned int address){ 31 | int count = 0 ; 32 | if(fd == 0){ 33 | if(logi_open() < 0) return -1; 34 | } 35 | count = pwrite(fd, buffer, length, address); 36 | return count ; 37 | } 38 | int logi_read(unsigned char * buffer, unsigned int length, unsigned int address){ 39 | int count = 0 ; 40 | if(fd == 0){ 41 | if(logi_open() < 0) return -1; 42 | } 43 | count = pread(fd, buffer, length, address); 44 | return count ; 45 | } 46 | 47 | -------------------------------------------------------------------------------- /c/logilib.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGILIB_H 2 | #define LOGILIB_H 3 | 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | int logi_open(void); 9 | void logi_close(void); 10 | 11 | int logi_write(unsigned char * buffer, unsigned int length, unsigned int address); 12 | int logi_read(unsigned char * buffer, unsigned int length, unsigned int address); 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /c/logipilib.c: -------------------------------------------------------------------------------- 1 | #include "logilib.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #define WR0(a, i) ((a >> 6) & 0x0FF) 17 | #define WR1(a, i) (((a << 2) & 0xFC) | (i << 1)) 18 | 19 | #define RD0(a, i) ((a >> 6) & 0x0FF) 20 | #define RD1(a, i) (((a << 2) & 0xFC) | 0x01 | (i << 1)) 21 | 22 | int fd ; 23 | static const char * device = "/dev/spidev0.0"; 24 | static unsigned int mode = 0 ; 25 | static unsigned int bits = 8 ; 26 | static unsigned long speed = 16000000UL ; 27 | static unsigned int delay = 0; 28 | 29 | static unsigned char com_buffer [4096] ; 30 | 31 | 32 | int spi_transfer(unsigned char * send_buffer, unsigned char * receive_buffer, unsigned int size); 33 | 34 | int logi_open(void){ 35 | int ret ; 36 | fd = open(device, O_RDWR); 37 | if (fd < 0){ 38 | printf("can't open device\n"); 39 | return -1 ; 40 | } 41 | 42 | ret = ioctl(fd, SPI_IOC_WR_MODE, &mode); 43 | if (ret == -1){ 44 | printf("can't set spi mode \n"); 45 | return -1 ; 46 | } 47 | 48 | ret = ioctl(fd, SPI_IOC_RD_MODE, &mode); 49 | if (ret == -1){ 50 | printf("can't get spi mode \n "); 51 | return -1 ; 52 | } 53 | 54 | /* 55 | * bits per word 56 | */ 57 | ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits); 58 | if (ret == -1){ 59 | printf("can't set bits per word \n"); 60 | return -1 ; 61 | } 62 | 63 | ret = ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits); 64 | if (ret == -1){ 65 | printf("can't get bits per word \n"); 66 | return -1 ; 67 | } 68 | 69 | /* 70 | * max speed hz 71 | */ 72 | ret = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &speed); 73 | if (ret == -1){ 74 | printf("can't set max speed hz \n"); 75 | return -1 ; 76 | } 77 | 78 | ret = ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed); 79 | if (ret == -1){ 80 | printf("can't get max speed hz \n"); 81 | return -1 ; 82 | } 83 | 84 | return 1; 85 | } 86 | 87 | void logi_close(void){ 88 | close(fd); 89 | } 90 | 91 | int spi_transfer(unsigned char * send_buffer, unsigned char * receive_buffer, unsigned int size) 92 | { 93 | int ret ; 94 | struct spi_ioc_transfer tr = { 95 | .tx_buf = (unsigned long)send_buffer, 96 | .rx_buf = (unsigned long)receive_buffer, 97 | .len = size, 98 | .delay_usecs = delay, 99 | .speed_hz = speed, 100 | .bits_per_word = bits, 101 | }; 102 | 103 | ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); 104 | if (ret < 1){ 105 | printf("can't send spi message \n"); 106 | return -1 ; 107 | } 108 | return 0; 109 | } 110 | 111 | int logipi_write(unsigned int add, unsigned char * data, unsigned int size, unsigned char inc){ 112 | com_buffer[0] = WR0(add, inc) ; 113 | com_buffer[1] = WR1(add, inc) ; 114 | memcpy(&com_buffer[2], data, size); 115 | return spi_transfer(com_buffer, com_buffer , (size + 2)); 116 | } 117 | 118 | 119 | int logipi_read(unsigned int add, unsigned char * data, unsigned int size, unsigned char inc){ 120 | int ret ; 121 | com_buffer[0] = RD0(add, inc) ; 122 | com_buffer[1] = RD1(add, inc) ; 123 | ret = spi_transfer(com_buffer, com_buffer , (size + 2)); 124 | memcpy(data, &com_buffer[2], size); 125 | return ret ; 126 | } 127 | 128 | 129 | int logi_write(unsigned char * buffer, unsigned int length, unsigned int address){ 130 | unsigned int tr_size = 0 ; 131 | int count = 0 ; 132 | if(fd == 0){ 133 | logi_open(); 134 | } 135 | while(count < length){ 136 | tr_size = (length-count) < 4094 ? (length-count) : 4094 ; 137 | if(logipi_write(((address+count)), &buffer[count], tr_size, 1) < 0) return 0; 138 | count = count + tr_size ; 139 | } 140 | 141 | return count ; 142 | } 143 | int logi_read(unsigned char * buffer, unsigned int length, unsigned int address){ 144 | unsigned int tr_size = 0; 145 | int count = 0 ; 146 | if(fd == 0){ 147 | logi_open(); 148 | } 149 | while(count < length){ 150 | tr_size = (length-count) < 4094 ? (length-count) : 4094 ; 151 | if(logipi_read(((address+count)), &buffer[count], tr_size, 1) < 0) return 0 ; 152 | count = count + tr_size ; 153 | } 154 | return count ; 155 | } 156 | -------------------------------------------------------------------------------- /init_logibone/data.eeprom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/init_logibone/data.eeprom -------------------------------------------------------------------------------- /init_logibone/init_eeprom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo i2cset -y 1 0x24 0x03 0xBF 4 | sudo i2cset -y 1 0x24 0x01 0x00 5 | cat data.eeprom > /sys/bus/i2c/drivers/at24/2-0054/eeprom 6 | -------------------------------------------------------------------------------- /install_logibone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR=`pwd` 4 | 5 | sudo apt-get update 6 | 7 | echo "Settin up cape eeprom ID ..............." 8 | cd init_logibone 9 | sudo ./init_eeprom.sh 10 | cd ${SCRIPT_DIR} 11 | 12 | echo "Installing dependencies..............." 13 | sudo apt-get install gcc make git 14 | 15 | echo "Installing logi_loader..............." 16 | cd unified_loader 17 | make logibone_loader 18 | sudo make install 19 | cd ${SCRIPT_DIR} 20 | 21 | echo "Installing python support..............." 22 | sudo apt-get install python-dev 23 | cd python/logibone 24 | python2 setup.py build 25 | sudo python2 setup.py install 26 | cd ${SCRIPT_DIR} 27 | 28 | echo "Installing logi C library..............." 29 | cd c 30 | sudo make install_logibone 31 | cd ${SCRIPT_DIR} 32 | 33 | -------------------------------------------------------------------------------- /install_logipi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR=`pwd` 4 | 5 | sudo apt-get update 6 | 7 | echo "Enable SPI" 8 | sed -i s,blacklist spi-bcm2708,#blacklist spi-bcm2708,g /etc/modprobe.d/raspi-blacklist.conf 9 | modprobe spi-bcm2708 10 | modprobe spidev 11 | 12 | echo "Install dependencies" 13 | sudo apt-get install gcc make git 14 | 15 | echo "Install logi_loader" 16 | cd unified_loader 17 | make logipi_loader 18 | sudo make install 19 | cd ${SCRIPT_DIR} 20 | 21 | echo "Install python support" 22 | sudo apt-get install python-dev 23 | cd python/logipi 24 | python2 setup.py build 25 | sudo python2 setup.py install 26 | cd ${SCRIPT_DIR} 27 | 28 | echo "Install logi C library" 29 | cd c 30 | sudo make install_logipi 31 | 32 | -------------------------------------------------------------------------------- /old/beaglebone_old/Makefile: -------------------------------------------------------------------------------- 1 | #Compiler to use 2 | CC=gcc 3 | #Compiler Flags 4 | CFLAGS=-c -fsigned-char #-Wall 5 | #Linker Flags 6 | LDFLAGS= #-lrt 7 | 8 | all: logi_loader 9 | 10 | logi_loader: serial_fpga_loader.o 11 | $(CC) -o logi_loader serial_fpga_loader.o 12 | 13 | serial_fpga_loader.o: serial_fpga_loader.c 14 | $(CC) $(CFLAGS) serial_fpga_loader.c 15 | 16 | install: logi_loader 17 | install logi_loader /usr/bin 18 | clean: 19 | rm -rf *o serial_loader 20 | -------------------------------------------------------------------------------- /old/beaglebone_old/README: -------------------------------------------------------------------------------- 1 | The logi-loader tool acts as a serial loader for the logibone Mark-1 board when plugged into the 2 | beaglebone expansion port. 3 | Usage: 4 | logi_loader .bit 5 | 6 | The tool can only be executed after running the mux setting script for your board (logibone or mark1). 7 | 8 | Install: 9 | 10 | execute the "make" command in the folder 11 | execute the "make install" command as root user to copy the tool to /usr/bin 12 | 13 | -------------------------------------------------------------------------------- /old/beaglebone_old/logi_loader: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/beaglebone_old/logi_loader -------------------------------------------------------------------------------- /old/beaglebone_old/setup_device-tree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dtc -O dtb -o BB-BONE-LOGIBONE-00A1.dtbo -b 0 -@ BB-BONE-LOGIBONE-00A1.dts 3 | sudo cp BB-BONE-LOGIBONE-00A1.dtbo /lib/firmware 4 | sudo sh -c "echo BB-BONE-LOGIBONE:00A1 > /sys/devices/bone_capemgr.9/slots " 5 | -------------------------------------------------------------------------------- /old/beaglebone_old/setup_device-tree.sh~: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dtc -O dtb -o BB-BONE-LOGIBONE-00A1.dtbo -b 0 -@ BB-BONE-LOGIBONE-00A1.dts 3 | sudo sh -c "echo BB-BONE-LOGIBONE:00A1 > /sys/devices/bone_capemgr.9/slots " 4 | -------------------------------------------------------------------------------- /old/beaglebone_old/uEnv.txt: -------------------------------------------------------------------------------- 1 | kernel_file=zImage 2 | initrd_file=uInitrd 3 | initrd_high=0xffffffff 4 | fdt_high=0xffffffff 5 | 6 | console=ttyO0,115200n8 7 | gpmcreg=mw.b 0x50000050 0x10 1 8 | 9 | mmcreset=mmc dev 1; mmc rstn 1; gpio set 52 10 | 11 | mmcroot=/dev/mmcblk0p2 ro 12 | mmcrootfstype=ext4 rootwait fixrtc 13 | 14 | loadkernel=load mmc ${mmcdev}:${mmcpart} 0x80200000 ${kernel_file} 15 | loadinitrd=load mmc ${mmcdev}:${mmcpart} 0x81000000 ${initrd_file}; setenv initrd_size ${filesize} 16 | loadfdt=load mmc ${mmcdev}:${mmcpart} 0x815f0000 /dtbs/${fdtfile} 17 | 18 | boot_classic=run loadkernel; run loadinitrd 19 | boot_ftd=run loadkernel; run loadinitrd; run loadfdt 20 | 21 | video_args=setenv video 22 | device_args=run video_args; run expansion_args; run mmcargs 23 | mmcargs=setenv bootargs console=${console} ${optargs} ${video} root=${mmcroot} rootfstype=${mmcrootfstype} ${expansion} 24 | 25 | optargs=capemgr.disable_partno=BB-BONE-EMMC-2G,BB-BONELT-HDMI,BB-BONELT-HDMIN 26 | expansion_args=setenv expansion ip=${ip_method} 27 | #Classic Board File Boot: 28 | #uenvcmd=run boot_classic; run device_args; bootz 0x80200000 0x81000000:${initrd_size} 29 | #New Device Tree Boot: 30 | uenvcmd=run mmcreset; run gpmcreg; run boot_ftd; run device_args; bootz 0x80200000 0x81000000:${initrd_size} 0x815f0000 31 | 32 | -------------------------------------------------------------------------------- /old/logibone_loader/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp logi_loader /usr/bin 4 | chmod 777 /usr/bin/logi_loader 5 | -------------------------------------------------------------------------------- /old/logibone_loader/logi_loader: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dd if=$1 of=/dev/logibone bs=4M 4 | -------------------------------------------------------------------------------- /old/logibone_loader/user_space/Makefile: -------------------------------------------------------------------------------- 1 | #Compiler to use 2 | CC=gcc 3 | #Compiler Flags 4 | CFLAGS=-c -fsigned-char #-Wall 5 | #Linker Flags 6 | LDFLAGS= #-lrt 7 | 8 | all: logi_loader 9 | 10 | logi_loader: serial_fpga_loader.o 11 | $(CC) -o logi_loader serial_fpga_loader.o 12 | 13 | serial_fpga_loader.o: serial_fpga_loader.c 14 | $(CC) $(CFLAGS) serial_fpga_loader.c 15 | 16 | install: logi_loader 17 | install logi_loader /usr/bin 18 | clean: 19 | rm -rf *o logi_loader 20 | -------------------------------------------------------------------------------- /old/logipi_loader/Makefile: -------------------------------------------------------------------------------- 1 | #Compiler to use 2 | CC=gcc 3 | #Compiler Flags 4 | CFLAGS=-c -fsigned-char #-Wall 5 | #Linker Flags 6 | LDFLAGS= #-lrt 7 | 8 | #version flag 9 | PI_VER ?= B 10 | 11 | all: logi_loader 12 | 13 | logi_loader: serial_fpga_loader.o 14 | $(CC) -o logi_loader serial_fpga_loader.o 15 | 16 | serial_fpga_loader.o: serial_fpga_loader.c 17 | $(CC) $(CFLAGS) -D$(PI_VER) serial_fpga_loader.c 18 | 19 | install: logi_loader 20 | install logi_loader /usr/bin 21 | clean: 22 | rm -rf *o logi_loader 23 | -------------------------------------------------------------------------------- /old/logipi_loader/README: -------------------------------------------------------------------------------- 1 | The logi-loader tool acts as a serial loader for the logibone Mark-1 board when plugged into the 2 | beaglebone expansion port. 3 | Usage: 4 | logi_loader .bit 5 | 6 | The tool can only be executed after running the mux setting script for your board (logibone or mark1). 7 | 8 | Install: 9 | 10 | execute the "make" command in the folder 11 | execute the "make install" command as root user to copy the tool to /usr/bin 12 | 13 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.lock -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/.log: -------------------------------------------------------------------------------- 1 | *** SESSION Jan 08, 2013 07:44:06.23 ------------------------------------------- 2 | *** SESSION Jan 08, 2013 08:38:31.05 ------------------------------------------- 3 | *** SESSION Jan 08, 2013 08:52:08.02 ------------------------------------------- 4 | *** SESSION Jan 08, 2013 08:56:46.93 ------------------------------------------- 5 | *** SESSION Jan 08, 2013 10:24:30.63 ------------------------------------------- 6 | *** SESSION Jan 08, 2013 12:32:31.67 ------------------------------------------- 7 | *** SESSION Jan 08, 2013 14:12:09.85 ------------------------------------------- 8 | *** SESSION Jan 09, 2013 12:56:35.76 ------------------------------------------- 9 | *** SESSION Jan 11, 2013 09:11:50.24 ------------------------------------------- 10 | *** SESSION Jan 11, 2013 09:48:57.10 ------------------------------------------- 11 | *** SESSION Jan 11, 2013 10:26:16.62 ------------------------------------------- 12 | *** SESSION Jan 11, 2013 11:33:20.41 ------------------------------------------- 13 | *** SESSION Jan 11, 2013 14:33:57.16 ------------------------------------------- 14 | *** SESSION Jan 12, 2013 11:20:47.47 ------------------------------------------- 15 | *** SESSION Jan 14, 2013 16:39:19.09 ------------------------------------------- 16 | *** SESSION Jan 16, 2013 14:43:18.52 ------------------------------------------- 17 | *** SESSION Jan 17, 2013 11:30:11.49 ------------------------------------------- 18 | *** SESSION Jan 29, 2013 18:20:55.94 ------------------------------------------- 19 | *** SESSION Jan 29, 2013 18:22:28.86 ------------------------------------------- 20 | *** SESSION Jan 29, 2013 18:25:47.93 ------------------------------------------- 21 | *** SESSION Jan 29, 2013 18:30:10.43 ------------------------------------------- 22 | *** SESSION Jan 29, 2013 18:38:27.65 ------------------------------------------- 23 | *** SESSION Jan 29, 2013 18:42:54.99 ------------------------------------------- 24 | *** SESSION Jan 29, 2013 18:46:46.77 ------------------------------------------- 25 | *** SESSION Feb 23, 2013 13:11:24.04 ------------------------------------------- 26 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/CMSISv1p30_LPC13xx.1357656274838.pdom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/CMSISv1p30_LPC13xx.1357656274838.pdom -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/Mark1_DragDrop_Config.1359509432808.pdom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/Mark1_DragDrop_Config.1359509432808.pdom -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/TEST_IO.1357659651478.pdom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/TEST_IO.1357659651478.pdom -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/gpio.1358208095637.pdom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/gpio.1358208095637.pdom -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/i2cslave.1357764580079.pdom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/i2cslave.1357764580079.pdom -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.dsf.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.make.core/.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.make.core/.log -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/CMSISv1p30_LPC13xx.build.log: -------------------------------------------------------------------------------- 1 | 16:47:30 **** Incremental Build of configuration Debug for project CMSISv1p30_LPC13xx **** 2 | make all 3 | make: Nothing to be done for `all'. 4 | 5 | 16:47:30 Build Finished (took 92ms) 6 | 7 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/Mark1_DragDrop_Config.build.log: -------------------------------------------------------------------------------- 1 | 16:47:31 **** Incremental Build of configuration Debug for project Mark1_DragDrop_Config **** 2 | make all 3 | Building file: ../src/main.c 4 | Invoking: MCU C Compiler 5 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs\option" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c" 6 | ../src/main.c:126:5: warning: "/*" within comment [-Wcomment] 7 | ../src/main.c:143:5: warning: "/*" within comment [-Wcomment] 8 | ../src/main.c:153:5: warning: "/*" within comment [-Wcomment] 9 | Finished building: ../src/main.c 10 | 11 | Building target: Mark1_DragDrop_Config.axf 12 | Invoking: MCU Linker 13 | arm-none-eabi-gcc -nostdlib -L"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\Debug" -Xlinker --gc-sections -Xlinker -Map=Mark1_DragDrop_Config.map -mcpu=cortex-m3 -mthumb -T ../ld/usb_buffer.ld -o "Mark1_DragDrop_Config.axf" ./src/chan\ fat\ fs/option/ccsbcs.o ./src/chan\ fat\ fs/diskio.o ./src/chan\ fat\ fs/ff.o ./src/BoardSupport.o ./src/ButtonDetect.o ./src/FLASH.o ./src/FPGA_Config.o ./src/System.o ./src/Timers.o ./src/cr_startup_lpc13.o ./src/i2cslave.o ./src/main.o ./src/msccallback.o ./src/usbdesc.o -lCMSISv1p30_LPC13xx 14 | Finished building target: Mark1_DragDrop_Config.axf 15 | 16 | make --no-print-directory post-build 17 | Performing post-build steps 18 | arm-none-eabi-size Mark1_DragDrop_Config.axf; arm-none-eabi-objcopy -O binary Mark1_DragDrop_Config.axf Mark1_DragDrop_Config.bin; checksum Mark1_DragDrop_Config.bin; 19 | text data bss dec hex filename 20 | 4332 8 716 5056 13c0 Mark1_DragDrop_Config.axf 21 | 22 | 23 | 16:47:33 Build Finished (took 1s.524ms) 24 | 25 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/TEST_IO.build.log: -------------------------------------------------------------------------------- 1 | 19:09:45 **** Incremental Build of configuration Debug for project TEST_IO **** 2 | make all 3 | Building file: ../src/main.c 4 | Invoking: MCU C Compiler 5 | arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv1p30_LPC13xx -I"D:\My Documents\Dropbox\Prj\Valent\LOGI-FAMILY\Mark1\SRC\MCU\RA1_2_new5\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c" 6 | ../src/main.c: In function 'main': 7 | Finished building: ../src/main.c 8 | ../src/main.c:42:23: warning: unused variable 'pb_val2' [-Wunused-variable] 9 | 10 | ../src/main.c:40:11: warning: unused variable 'port2' [-Wunused-variable] 11 | ../src/main.c:39:63: warning: unused variable 'temp6' [-Wunused-variable] 12 | ../src/main.c:39:52: warning: unused variable 'temp5' [-Wunused-variable] 13 | ../src/main.c:39:41: warning: unused variable 'temp4' [-Wunused-variable] 14 | ../src/main.c:39:31: warning: unused variable 'temp3' [-Wunused-variable] 15 | ../src/main.c:39:21: warning: variable 'temp2' set but not used [-Wunused-but-set-variable] 16 | ../src/main.c:38:11: warning: unused variable 'del' [-Wunused-variable] 17 | Building target: TEST_IO.axf 18 | Invoking: MCU Linker 19 | arm-none-eabi-gcc -nostdlib -L"D:\My Documents\Dropbox\Prj\Valent\LOGI-FAMILY\Mark1\SRC\MCU\RA1_2_new5\CMSISv1p30_LPC13xx\Debug" -Xlinker -Map="TEST_IO.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "TEST_IO_Debug.ld" -o "TEST_IO.axf" ./src/cr_startup_lpc13.o ./src/main.o -lCMSISv1p30_LPC13xx 20 | Finished building target: TEST_IO.axf 21 | 22 | make --no-print-directory post-build 23 | Performing post-build steps 24 | arm-none-eabi-size "TEST_IO.axf"; # arm-none-eabi-objcopy -O binary "TEST_IO.axf" "TEST_IO.bin" ; checksum -p LPC1343 -d "TEST_IO.bin"; 25 | text data bss dec hex filename 26 | 1628 0 0 1628 65c TEST_IO.axf 27 | 28 | 29 | 19:09:46 Build Finished (took 603ms) 30 | 31 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 7 | 8 |
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log: -------------------------------------------------------------------------------- 1 | 16:47:30 **** Incremental Build of configuration Debug for project CMSISv1p30_LPC13xx **** 2 | make all 3 | make: Nothing to be done for `all'. 4 | 16:47:31 **** Incremental Build of configuration Debug for project Mark1_DragDrop_Config **** 5 | make all 6 | Building file: ../src/main.c 7 | Invoking: MCU C Compiler 8 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs\option" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c" 9 | ../src/main.c:126:5: warning: "/*" within comment [-Wcomment] 10 | ../src/main.c:143:5: warning: "/*" within comment [-Wcomment] 11 | ../src/main.c:153:5: warning: "/*" within comment [-Wcomment] 12 | Finished building: ../src/main.c 13 | 14 | Building target: Mark1_DragDrop_Config.axf 15 | Invoking: MCU Linker 16 | arm-none-eabi-gcc -nostdlib -L"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\Debug" -Xlinker --gc-sections -Xlinker -Map=Mark1_DragDrop_Config.map -mcpu=cortex-m3 -mthumb -T ../ld/usb_buffer.ld -o "Mark1_DragDrop_Config.axf" ./src/chan\ fat\ fs/option/ccsbcs.o ./src/chan\ fat\ fs/diskio.o ./src/chan\ fat\ fs/ff.o ./src/BoardSupport.o ./src/ButtonDetect.o ./src/FLASH.o ./src/FPGA_Config.o ./src/System.o ./src/Timers.o ./src/cr_startup_lpc13.o ./src/i2cslave.o ./src/main.o ./src/msccallback.o ./src/usbdesc.o -lCMSISv1p30_LPC13xx 17 | Finished building target: Mark1_DragDrop_Config.axf 18 | 19 | make --no-print-directory post-build 20 | Performing post-build steps 21 | arm-none-eabi-size Mark1_DragDrop_Config.axf; arm-none-eabi-objcopy -O binary Mark1_DragDrop_Config.axf Mark1_DragDrop_Config.bin; checksum Mark1_DragDrop_Config.bin; 22 | text data bss dec hex filename 23 | 4332 8 716 5056 13c0 Mark1_DragDrop_Config.axf 24 | 25 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/gpio.build.log: -------------------------------------------------------------------------------- 1 | 17:01:57 **** Build of configuration Debug for project gpio **** 2 | make all 3 | Building file: ../src/cr_startup_lpc13.c 4 | Invoking: MCU C Compiler 5 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\My Documents\Dropbox\Prj\Valent\LOGI-FAMILY\Mark1\SRC\MCU\RA1_2_new5\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/cr_startup_lpc13.d" -MT"src/cr_startup_lpc13.d" -o "src/cr_startup_lpc13.o" "../src/cr_startup_lpc13.c" 6 | ../src/cr_startup_lpc13.c:110:10: warning: taking address of expression of type 'void' [enabled by default] 7 | Finished building: ../src/cr_startup_lpc13.c 8 | 9 | Building file: ../src/gpio.c 10 | Invoking: MCU C Compiler 11 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\My Documents\Dropbox\Prj\Valent\LOGI-FAMILY\Mark1\SRC\MCU\RA1_2_new5\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/gpio.d" -MT"src/gpio.d" -o "src/gpio.o" "../src/gpio.c" 12 | Finished building: ../src/gpio.c 13 | 14 | Building file: ../src/gpiotest.c 15 | Invoking: MCU C Compiler 16 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\My Documents\Dropbox\Prj\Valent\LOGI-FAMILY\Mark1\SRC\MCU\RA1_2_new5\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/gpiotest.d" -MT"src/gpiotest.d" -o "src/gpiotest.o" "../src/gpiotest.c" 17 | Finished building: ../src/gpiotest.c 18 | 19 | Building target: gpio.axf 20 | Invoking: MCU Linker 21 | arm-none-eabi-gcc -nostdlib -L"D:\My Documents\Dropbox\Prj\Valent\LOGI-FAMILY\Mark1\SRC\MCU\RA1_2_new5\CMSISv1p30_LPC13xx\Debug" -Xlinker --gc-sections -Xlinker -Map=gpio.map -mcpu=cortex-m3 -mthumb -T "gpio_Debug.ld" -o "gpio.axf" ./src/cr_startup_lpc13.o ./src/gpio.o ./src/gpiotest.o -lCMSISv1p30_LPC13xx 22 | Finished building target: gpio.axf 23 | 24 | make --no-print-directory post-build 25 | Performing post-build steps 26 | arm-none-eabi-size gpio.axf; # arm-none-eabi-objcopy -O ihex gpio.axf gpio.hex ; 27 | text data bss dec hex filename 28 | 3160 0 0 3160 c58 gpio.axf 29 | 30 | 31 | 17:01:58 Build Finished (took 961ms) 32 | 33 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/i2cslave.build.log: -------------------------------------------------------------------------------- 1 | 09:34:31 **** Incremental Build of configuration Debug for project i2cslave **** 2 | make all 3 | make: Nothing to be done for `all'. 4 | 5 | 09:34:31 Build Finished (took 142ms) 6 | 7 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.cdt.ui/usbmsd_rom.build.log: -------------------------------------------------------------------------------- 1 | 18:26:42 **** Clean-only build of configuration Debug for project usbmsd_rom **** 2 | make clean 3 | rm -rf ./src/chan\ fat\ fs/option/ccsbcs.o ./src/chan\ fat\ fs/diskio.o ./src/chan\ fat\ fs/ff.o ./src/BoardSupport.o ./src/ButtonDetect.o ./src/FLASH.o ./src/FPGA_Config.o ./src/System.o ./src/Timers.o ./src/cr_startup_lpc13.o ./src/i2c_mark1.o ./src/i2cslave.o ./src/main.o ./src/msccallback.o ./src/usbdesc.o ./src/chan\ fat\ fs/option/ccsbcs.d ./src/chan\ fat\ fs/diskio.d ./src/chan\ fat\ fs/ff.d ./src/BoardSupport.d ./src/ButtonDetect.d ./src/FLASH.d ./src/FPGA_Config.d ./src/System.d ./src/Timers.d ./src/cr_startup_lpc13.d ./src/i2c_mark1.d ./src/i2cslave.d ./src/main.d ./src/msccallback.d ./src/usbdesc.d usbmsd_rom.axf 4 | 5 | 6 | 18:26:43 Build Finished (took 643ms) 7 | 8 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/18/f0a2501e0a7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | //updating code for PCB version RA1.2 - main changes in pin definitions 2 | #include "System.h" 3 | 4 | 5 | extern volatile uint8_t i2c_cmd_rx; 6 | extern volatile uint8_t i2c_nack_rx; 7 | 8 | 9 | //test pio1_5 test point as input 10 | #define T4_LOC (1<<5) //P1_5 11 | 12 | 13 | //MAIN******** 14 | int main (void) 15 | { 16 | InitGPIO(); //initialize the GPIO pins 17 | SysTick_Config(SystemCoreClock/1000); //setup timer tick - Interrupt found in system.c to handle system flags etc. tasks should be called from while loop. 18 | 19 | //SETUP I2C PERIPHS - NEEDS SETUP BEFORE INITUSB_MSC - CAUSED A LOCKUP WHEN PLACED AFTER. 20 | Init_i2c_buf(); //Debug I2c. clear the buffer 21 | I2CSlaveInit(); //initialize the i2c drivers - all i2c transaction happen in i2cslave.c interrupt. There is a state machine there. 22 | 23 | InitTimers(); //SETUP SYSTEM TIMERS 24 | InitButtonDetectAll(); //SETUP BUTTON DEBOUNCE structures 25 | 26 | //THESE FUNCTIONS ARE FOR THE MARK-1 USB, FLASH, LOAD CONFIG.BIT 27 | InitFLASH(); //init flash memory. 28 | InitUSB_MSC(); //init usb mass storage device drivers 29 | StartDel(); //init startup delay 30 | //SETUP FILE SYSTEM 31 | f_mount(0,&MyFileSystem); //mount file system for reading config.bit file form MSD 32 | 33 | 34 | #ifdef USE_DRAG_DROP_BISTREAM_STARTUP 35 | 36 | if(!) 37 | //THESE FUNCTIONS ARE FOR THE MARK-1 USB, FLASH, LOAD CONFIG.BIT 38 | InitFLASH(); //init flash memory. 39 | InitUSB_MSC(); //init usb mass storage device drivers 40 | StartDel(); //init startup delay 41 | //SETUP FILE SYSTEM 42 | f_mount(0,&MyFileSystem); //mount file system for reading config.bit file form MSD 43 | FPGA_Config("config.bit"); //check to see if there is a "config.bit" file if so load it into FPGA. Note this needs to go into while loop 44 | // to check for new config file loaded and reload to FPGA. This is why there currently needs to be a power cycle 45 | // in order for new file to be loaded into fpga. 46 | #endif 47 | 48 | LED1_OFF; 49 | LED0_OFF; 50 | 51 | while(1) 52 | { 53 | 54 | // WILL ADD IN A BASIC TASK HANDLER THAT IS NOT RUN IN THE SYSTEM IRQ 55 | Basic_Tasks(); 56 | 57 | 58 | //MAIN FRONT END TASKS 59 | if(i2c_cmd_rx){ 60 | I2C_process_task(); 61 | } 62 | 63 | 64 | 65 | 66 | 67 | }//while 68 | }//main 69 | 70 | 71 | void Basic_Tasks(){ 72 | 73 | //TimerTest(); 74 | //PROCESS NON TIMING CRITICAL TASKS 75 | if( !TimerIsOn(timer_pb) ) 76 | { 77 | ButtonProcessAll(); //process the push button state machines 78 | TimerStart(timer_pb, TIME_PB0); //restart the timer 79 | } 80 | 81 | //use timers to keep track of when to process. 82 | 83 | } 84 | 85 | 86 | 87 | 88 | // ***************************************************************************** 89 | void debug_master_sense( void){ 90 | uint8_t temp = 0; 91 | 92 | //setup the pin manually 93 | LPC_GPIO2->DIR &= ~(1<<10); //INPUT 94 | //LPC_IOCON->PIO2_10 = 0x00; //disable pullup/down hyst, open drain 95 | 96 | temp = LPC_GPIO2->DATA & (1<<10); 97 | if( temp == 1 ){ 98 | LED0_ON; 99 | } 100 | else if( temp == 0 ){ 101 | LED0_OFF; 102 | } 103 | 104 | } 105 | 106 | 107 | //MAIN STATE MACHINE. NOT NEEDED YET 108 | /* 109 | switch (SystemState) { 110 | case STATE_SYS_STARTUP: 111 | // ANY TASKS TO RUN AT STARTUP 112 | TransitionToState(STATE_LPC_LOADER); //GO TO LPC LOADER STATE 113 | break; 114 | case STATE_LPC_LOADER: 115 | // running with LPC as loader 116 | // * Add code , if push button then reload config.bit 117 | // * Check I2C commands - if change states as necessary 118 | 119 | /*if(MASTER_SENSE_STATE){ //NOT WORKING!!! 120 | TransitionToState(STATE_MASTER_LOADER); 121 | }*/ 122 | //CHECK FOR I2C COMMANDS 123 | /* 124 | if(i2c_cmd_rx){ 125 | I2C_process_cmd(); 126 | i2c_cmd_rx = 0; 127 | } 128 | if(i2c_nack_rx){ 129 | i2c_nack_rx = 0; 130 | } 131 | 132 | break; 133 | case STATE_MASTER_LOADER: 134 | // running in slave mode, with a master loading the fpga 135 | //CHECK FOR I2C COMMANDS 136 | /* 137 | if(i2c_cmd_rx){ 138 | I2C_process_cmd(); 139 | i2c_cmd_rx = 0; 140 | } 141 | if(i2c_nack_rx){ 142 | i2c_nack_rx = 0; 143 | } 144 | 145 | 146 | /*if(!MASTER_SENSE_STATE){ //NOT WORKING!!! 147 | TransitionToState(STATE_MASTER_LOADER); 148 | } 149 | break; 150 | default: 151 | TransitionToState(STATE_SYS_STARTUP); //go startup 152 | break; 153 | } 154 | */ 155 | 156 | 157 | 158 | //EOF 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/2f/c0c214390e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "i2c_mark1.h" 19 | #include "Timers.h" 20 | #include "ButtonDetect.h" 21 | 22 | 23 | //SYSTEM FUNCTIONALITY DEFINES 24 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 25 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 26 | 27 | #define STATE_SYS_STARTUP 0 28 | #define STATE_LPC_LOADER 1 29 | #define STATE_MASTER_LOADER 2 30 | 31 | 32 | #define LED_ALWAYS_OFF 0 33 | #define LED_ALWAYS_ON 0xFFFF 34 | 35 | void InitUSB_MSC(); 36 | void SetLED_BlinkRate(uint16_t BR); 37 | void InitSystemStateMachine( void); 38 | void TransitionToState(uint8_t NextState); 39 | 40 | extern volatile uint32_t StartupDelay; 41 | extern volatile uint8_t SystemState; 42 | extern FATFS MyFileSystem; 43 | 44 | #endif 45 | //EOF 46 | 47 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a0db881a017e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __I2C_H 3 | #define __I2C_H 4 | 5 | extern volatile uint8_t i2c_cmd_rx; 6 | extern volatile uint8_t i2c_nack_rx; 7 | extern volatile uint8_t i2c_lpc_configure; //flag - configure fpga with lpc 8 | extern volatile uint8_t i2c_lpc_mode; 9 | extern volatile uint8_t i2c_passive_mode; 10 | 11 | 12 | #define I2C_RD_BUF_SIZE 8 13 | #define I2C_WR_BUF_SIZE 8 14 | 15 | 16 | //#define I2C_SLAVE_ADDR 0X70 //bits 7:1 are the 7 bit slave address. bit 0 is a control bit. 17 | #define I2C_SLAVE_ADDR 0X70 //7 BIT SLAVE ADDRESS 18 | 19 | 20 | #define FAST_MODE_PLUS 0 21 | 22 | #define I2CMASTER 0 23 | 24 | #define BUFSIZE 6 25 | #define MAX_TIMEOUT 0x00FFFFFF 26 | 27 | 28 | #define READ_WRITE 0x01 29 | 30 | #define RD_BIT 0x01 31 | 32 | #define I2C_IDLE 0 33 | #define I2C_STARTED 1 34 | #define I2C_RESTARTED 2 35 | #define I2C_REPEATED_START 3 36 | #define DATA_ACK 4 37 | #define DATA_NACK 5 38 | #define I2C_WR_STARTED 6 39 | #define I2C_RD_STARTED 7 40 | 41 | #define I2CONSET_I2EN 0x00000040 /* I2C Control Set Register */ 42 | #define I2CONSET_AA 0x00000004 43 | #define I2CONSET_SI 0x00000008 44 | #define I2CONSET_STO 0x00000010 45 | #define I2CONSET_STA 0x00000020 46 | 47 | #define I2CONCLR_AAC 0x00000004 /* I2C Control clear Register */ 48 | #define I2CONCLR_SIC 0x00000008 49 | #define I2CONCLR_STAC 0x00000020 50 | #define I2CONCLR_I2ENC 0x00000040 51 | 52 | #define I2DAT_I2C 0x00000000 /* I2C Data Reg */ 53 | #define I2ADR_I2C 0x00000000 /* I2C Slave Address Reg */ 54 | 55 | //IT SEEMS DUTY VALUES ARE ONLY USED IN MASTER MODE. ABLE SEND AND RECEIVE COMMANDS AT DIFFERENT RATE IN SLAVE MODE. 56 | #define I2SCLH_SCLH 0x00000180 /* I2C SCL Duty Cycle High Reg */ //VALUE FOR 92.2KHZ 57 | #define I2SCLL_SCLL 0x00000180 /* I2C SCL Duty Cycle Low Reg */ //VALUE FOR 92.2KHZ 58 | 59 | #define I2SCLH_HS_SCLH 0x00000020 /* Fast Plus I2C SCL Duty Cycle High Reg */ //VALUE FOR 92.2KHZ 60 | #define I2SCLL_HS_SCLL 0x00000020 /* Fast Plus I2C SCL Duty Cycle Low Reg */ //VALUE FOR 92.2KHZ 61 | 62 | 63 | extern void I2C_IRQHandler( void ); 64 | extern void I2CSlaveInit( void ); 65 | void Init_i2c_buf( void); 66 | void I2C_process_cmd( void); 67 | 68 | #endif /* end __I2C_H */ 69 | /**************************************************************************** 70 | ** End Of File 71 | *****************************************************************************/ 72 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/55/8026b1a0f57d00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 1 14 | 15 | 16 | 17 | //PROTOTYPES 18 | int8_t FPGA_Config(char * Filename); 19 | uint8_t InitFPGA_Config( void); 20 | 21 | #endif /* FPGA_CONFIG_H_ */ 22 | 23 | //EOF 24 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/5e/c0ff22700e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | //SYSTEM INLCUDES 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "Timers.h" 19 | #include "ButtonDetect.h" 20 | 21 | 22 | //SYSTEM FUNCTIONALITY DEFINES 23 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 24 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 25 | 26 | #define STATE_SYS_STARTUP 0 27 | #define STATE_LPC_LOADER 1 28 | #define STATE_MASTER_LOADER 2 29 | 30 | #define LED_ALWAYS_OFF 0 31 | #define LED_ALWAYS_ON 0xFFFF 32 | 33 | //FUNCTION PROTOTYPES 34 | void InitUSB_MSC(); 35 | void SetLED_BlinkRate(uint16_t BR); 36 | void InitSystemStateMachine( void); 37 | void TransitionToState(uint8_t NextState); 38 | 39 | //EXTERN VARS 40 | extern volatile uint32_t StartupDelay; 41 | extern volatile uint8_t SystemState; 42 | extern FATFS MyFileSystem; 43 | 44 | #endif 45 | //EOF 46 | 47 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/61/90589d4f0e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "Timers.h" 19 | #include "ButtonDetect.h" 20 | 21 | 22 | //SYSTEM FUNCTIONALITY DEFINES 23 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 24 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 25 | 26 | #define STATE_SYS_STARTUP 0 27 | #define STATE_LPC_LOADER 1 28 | #define STATE_MASTER_LOADER 2 29 | 30 | 31 | #define LED_ALWAYS_OFF 0 32 | #define LED_ALWAYS_ON 0xFFFF 33 | 34 | void InitUSB_MSC(); 35 | void SetLED_BlinkRate(uint16_t BR); 36 | void InitSystemStateMachine( void); 37 | void TransitionToState(uint8_t NextState); 38 | 39 | extern volatile uint32_t StartupDelay; 40 | extern volatile uint8_t SystemState; 41 | extern FATFS MyFileSystem; 42 | 43 | #endif 44 | //EOF 45 | 46 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/81/c02c03db097e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "i2c_mark1.h" 19 | #include "Timers.h" 20 | #include "ButtonDetect.h" 21 | 22 | 23 | //SYSTEM FUNCTIONALITY DEFINES 24 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 25 | //#define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 26 | 27 | #define STATE_SYS_STARTUP 0 28 | #define STATE_LPC_LOADER 1 29 | #define STATE_MASTER_LOADER 2 30 | 31 | 32 | #define LED_ALWAYS_OFF 0 33 | #define LED_ALWAYS_ON 0xFFFF 34 | 35 | void InitUSB_MSC(); 36 | void SetLED_BlinkRate(uint16_t BR); 37 | void InitSystemStateMachine( void); 38 | void TransitionToState(uint8_t NextState); 39 | 40 | extern volatile uint32_t StartupDelay; 41 | extern volatile uint8_t SystemState; 42 | extern FATFS MyFileSystem; 43 | 44 | #endif 45 | //EOF 46 | 47 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/8b/505e516c0e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | //SYSTEM INLCUDES 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "Timers.h" 19 | #include "ButtonDetect.h" 20 | 21 | 22 | //SYSTEM FUNCTIONALITY DEFINES 23 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 24 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 25 | 26 | #define STATE_SYS_STARTUP 0 27 | #define STATE_LPC_LOADER 1 28 | #define STATE_MASTER_LOADER 2 29 | 30 | #define LED_ALWAYS_OFF 0 31 | #define LED_ALWAYS_ON 0xFFFF 32 | 33 | //FUNCTION PROTOTYPES 34 | void InitUSB_MSC(); 35 | void SetLED_BlinkRate(uint16_t BR); 36 | void InitSystemStateMachine( void); 37 | void TransitionToState(uint8_t NextState); 38 | 39 | //EXTERNS 40 | extern volatile uint32_t StartupDelay; 41 | extern volatile uint8_t SystemState; 42 | extern FATFS MyFileSystem; 43 | 44 | #endif 45 | //EOF 46 | 47 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/95/c0abe0c4097e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "i2c_mark1.h" 19 | #include "Timers.h" 20 | #include "ButtonDetect.h" 21 | 22 | 23 | //SYSTEM FUNCTIONALITY DEFINES 24 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 25 | //#define USE_DRAG_DROP_BISTREAM //enable drag and drop bitstream functionality 26 | 27 | #define STATE_SYS_STARTUP 0 28 | #define STATE_LPC_LOADER 1 29 | #define STATE_MASTER_LOADER 2 30 | 31 | 32 | #define LED_ALWAYS_OFF 0 33 | #define LED_ALWAYS_ON 0xFFFF 34 | 35 | void InitUSB_MSC(); 36 | void SetLED_BlinkRate(uint16_t BR); 37 | void InitSystemStateMachine( void); 38 | void TransitionToState(uint8_t NextState); 39 | 40 | extern volatile uint32_t StartupDelay; 41 | extern volatile uint8_t SystemState; 42 | extern FATFS MyFileSystem; 43 | 44 | #endif 45 | //EOF 46 | 47 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/a0/b0e8bf090e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #include "System.h" 2 | 3 | //PROTOTYPES 4 | void FPGA_BlastConfigBytes(BYTE *Data,WORD Count); 5 | 6 | //LOCAL VARIABLES 7 | static uint8_t ConfigBuf[256]; //data read from the config file 8 | 9 | /*********************************************************************************** 10 | * DESCRIPTION: send the start config sequence to the FPGA 11 | **********************************************************************************/ 12 | int8_t InitFPGA_Config( void){ 13 | uint32_t i = 0; 14 | 15 | //send the FPGA config initialization sequence 16 | CFG_PROG_B_INACTIVE; //make sure the progb is in inactive state 17 | //We need to make these speed indepedent some day..... 18 | for(i=0;i<10000;i++); //10000/fcy = 48mHZ = 200uS 19 | CFG_PROG_B_ACTIVE; //First Bring the PROG_B low 20 | for(i=0;i<20000;i++); //delay @48Mhz = 400uS 21 | CFG_PROG_B_INACTIVE; //Bring high 22 | 23 | i = 0; 24 | while(CFG_INIT_B_STATE == 0) //wait for INIT_B TO go high 25 | { 26 | i++; 27 | if(i>800000) 28 | { 29 | SetLED_BlinkRate(1000); //set blink rate to fail! 30 | return CONFIG_ERROR_INIT_NOT_HIGH; 31 | } 32 | } 33 | return (CONFIG_OK); 34 | 35 | } 36 | 37 | /*********************************************************************************** 38 | * DESCRIPTION: loads the FPGA with bitfile data 39 | * 40 | **********************************************************************************/ 41 | int8_t FPGA_Config(char * Filename) 42 | { 43 | uint32_t i; 44 | FRESULT FS_Error; 45 | FIL MyFile; 46 | uint32_t BytesRead; 47 | uint8_t Junk = 0; 48 | uint32_t BytesSent = 0; 49 | int8_t status; 50 | 51 | FS_Error = f_open(&MyFile,Filename,FA_READ); //open "config.bit" 52 | 53 | if(FS_Error != FR_OK) //check for error 54 | { 55 | return CONFIG_ERROR_FILE_NOT_FOUND; //could not find the file 56 | } 57 | 58 | SetLED_BlinkRate(25); //set the blink speed - shows status of loading process 59 | 60 | 61 | /* //ADDING SEPERATE FUNCTION CALL - SO THAT I2C COMMANDS CAN ACCESS SEPERATELY 62 | //send the FPGA config initialization sequence 63 | CFG_PROG_B_INACTIVE; //make sure the progb is in inactive state 64 | //We need to make these speed indepedent some day..... 65 | for(i=0;i<10000;i++); //10000/fcy = 48mHZ = 200uS 66 | CFG_PROG_B_ACTIVE; //First Bring the PROG_B low 67 | for(i=0;i<20000;i++); //delay @48Mhz = 400uS 68 | CFG_PROG_B_INACTIVE; //Bring high 69 | i = 0; 70 | while(CFG_INIT_B_STATE == 0) //wait for INIT_B TO go high 71 | { 72 | i++; 73 | if(i>800000) 74 | { 75 | SetLED_BlinkRate(1000); //set blink rate to fail! 76 | return CONFIG_ERROR_INIT_NOT_HIGH; 77 | } 78 | } 79 | */ 80 | 81 | //SEND FPGA CONFIG SETUP COMMAND 82 | status = InitFPGA_Config(); 83 | if(status<0){ 84 | return(status); 85 | } 86 | 87 | //Read and blast until there is nothing left in the file 88 | BytesSent = 0; 89 | do 90 | { 91 | f_read(&MyFile,&ConfigBuf[0],256, &BytesRead); //read 256 bytes in the file * f_read writes the number of bytes read to &BytesRead. Will be less than 256 when done? 92 | FPGA_BlastConfigBytes(&ConfigBuf[0],BytesRead); 93 | BytesSent+=BytesRead; 94 | }while(BytesRead==256); 95 | 96 | f_close(&MyFile); 97 | 98 | for(i=0;i<255;i++) 99 | { 100 | //Keep Sending CCLKs until done goes high 101 | FPGA_BlastConfigBytes(&Junk,1); 102 | if(CFG_DONE_STATE > 0) 103 | { 104 | //Per Configuration Guide, send some extra clocks after config is Done 105 | FPGA_BlastConfigBytes(&Junk,1); 106 | FPGA_BlastConfigBytes(&Junk,1); 107 | FPGA_BlastConfigBytes(&Junk,1); 108 | FPGA_BlastConfigBytes(&Junk,1); 109 | SetLED_BlinkRate(LED_ALWAYS_ON); 110 | return CONFIG_OK; 111 | } 112 | } 113 | 114 | SetLED_BlinkRate(500); 115 | return CONFIG_ERROR_DONE_NOT_HIGH; 116 | } 117 | 118 | /************************************************************************************** 119 | * DESCRIPTION: Bitbang the bitstream data onto the GPIO 120 | * - send n bytes of data 121 | * - individually clocks each bit of data 122 | **************************************************************************************/ 123 | void FPGA_BlastConfigBytes(BYTE *Data,WORD Count) 124 | { 125 | WORD i,j; 126 | BYTE DataOut; 127 | uint8_t Mask; 128 | 129 | 130 | CFG_DIN_INACTIVE; 131 | CFG_CCLK_INACTIVE; 132 | 133 | for(i=0;i0) 141 | CFG_DIN_ACTIVE; 142 | else 143 | CFG_DIN_INACTIVE; 144 | 145 | CFG_CCLK_ACTIVE; 146 | CFG_CCLK_INACTIVE; 147 | 148 | Mask = Mask >> 1; 149 | } 150 | } 151 | } 152 | 153 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/a7/d0a78dfd0d7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 1 14 | 15 | //PROTOTYPES 16 | int8_t FPGA_Config(char * Filename); //main function call for complete lcp fpga config 17 | int8_t InitFPGA_Config( void); 18 | 19 | #endif /* FPGA_CONFIG_H_ */ 20 | 21 | //EOF 22 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/b6/a01c4feafc7d00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __I2C_H 3 | #define __I2C_H 4 | 5 | extern volatile uint8_t i2c_cmd_rx; 6 | extern volatile uint8_t i2c_nack_rx; 7 | extern volatile uint8_t i2c_lpc_configure; //flag - configure fpga with lpc 8 | extern volatile uint8_t i2c_lpc_mode; 9 | extern volatile uint8_t i2c_passive_mode; 10 | 11 | 12 | #define I2C_RD_BUF_SIZE 8 13 | #define I2C_WR_BUF_SIZE 8 14 | 15 | #define I2C_CMD_PASSIVE_MODE 0X01 //command to go into passive mode 16 | #define I2C_CMD_LPC_CFG_MODE 0X02 //command to go have LPC configure the fpga 17 | #define I2C_CMD_DONE 0X03 //did the done bit go high? 18 | #define I2C_CMD_LPC_CONFIGURE 0X04 //reconfigure the fpga 19 | 20 | 21 | 22 | 23 | 24 | //#define I2C_SLAVE_ADDR 0X70 //bits 7:1 are the 7 bit slave address. bit 0 is a control bit. 25 | #define I2C_SLAVE_ADDR 0X70 //7 BIT SLAVE ADDRESS 26 | 27 | 28 | #define FAST_MODE_PLUS 0 29 | 30 | #define I2CMASTER 0 31 | 32 | #define BUFSIZE 6 33 | #define MAX_TIMEOUT 0x00FFFFFF 34 | 35 | 36 | #define READ_WRITE 0x01 37 | 38 | #define RD_BIT 0x01 39 | 40 | #define I2C_IDLE 0 41 | #define I2C_STARTED 1 42 | #define I2C_RESTARTED 2 43 | #define I2C_REPEATED_START 3 44 | #define DATA_ACK 4 45 | #define DATA_NACK 5 46 | #define I2C_WR_STARTED 6 47 | #define I2C_RD_STARTED 7 48 | 49 | #define I2CONSET_I2EN 0x00000040 /* I2C Control Set Register */ 50 | #define I2CONSET_AA 0x00000004 51 | #define I2CONSET_SI 0x00000008 52 | #define I2CONSET_STO 0x00000010 53 | #define I2CONSET_STA 0x00000020 54 | 55 | #define I2CONCLR_AAC 0x00000004 /* I2C Control clear Register */ 56 | #define I2CONCLR_SIC 0x00000008 57 | #define I2CONCLR_STAC 0x00000020 58 | #define I2CONCLR_I2ENC 0x00000040 59 | 60 | #define I2DAT_I2C 0x00000000 /* I2C Data Reg */ 61 | #define I2ADR_I2C 0x00000000 /* I2C Slave Address Reg */ 62 | 63 | //IT SEEMS DUTY VALUES ARE ONLY USED IN MASTER MODE. ABLE SEND AND RECEIVE COMMANDS AT DIFFERENT RATE IN SLAVE MODE. 64 | #define I2SCLH_SCLH 0x00000180 /* I2C SCL Duty Cycle High Reg */ //VALUE FOR 92.2KHZ 65 | #define I2SCLL_SCLL 0x00000180 /* I2C SCL Duty Cycle Low Reg */ //VALUE FOR 92.2KHZ 66 | 67 | #define I2SCLH_HS_SCLH 0x00000020 /* Fast Plus I2C SCL Duty Cycle High Reg */ //VALUE FOR 92.2KHZ 68 | #define I2SCLL_HS_SCLL 0x00000020 /* Fast Plus I2C SCL Duty Cycle Low Reg */ //VALUE FOR 92.2KHZ 69 | 70 | 71 | extern void I2C_IRQHandler( void ); 72 | extern void I2CSlaveInit( void ); 73 | void Init_i2c_buf( void); 74 | void I2C_process_cmd( void); 75 | 76 | #endif /* end __I2C_H */ 77 | /**************************************************************************** 78 | ** End Of File 79 | *****************************************************************************/ 80 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/c4/50ab4fdaf57d00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 1 14 | 15 | //PROTOTYPES 16 | int8_t FPGA_Config(char * Filename); 17 | 18 | #endif /* FPGA_CONFIG_H_ */ 19 | 20 | //EOF 21 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/c6/80db3646067e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_SUPPORT_H 2 | #define _BOARD_SUPPORT_H 3 | 4 | //PIN LOCATION DEFINES 5 | #define LED1_LOC (1<<0) //PIO3_0 6 | #define LED0_LOC (1<<3) //PIO2_3 7 | 8 | #define PB_LOC (1<<1) //PIO0_1 9 | 10 | #define CFG_INIT_B_LOC (1<<7) //PIO0_7 11 | #define CFG_DIN_LOC (1<<2) //PIO3_2 12 | #define CFG_CCLK_LOC (1<<1) //PIO3_1 13 | #define CFG_PROG_B_LOC (1<<9) //PIO1_9 14 | #define CFG_DONE_LOC (1<<8) //PIO1_8 15 | #define CFG_FLASH_RST_LOC (1<<1) //PIO1_1 - used to reset fpga cfg flash if needed - default hiz = input to no conflict 16 | #define CFG_MODE1_LOC (1<<8) //PIO2_8 17 | #define CFG_FLASH_CS_LOC (1<<9) //PIO2_9 - use the control CS pin of the fpga flash chip. - default - hiz = input 18 | #define CFG_MUX_SEL_LOC (1<<2) //PIO2_2 - select the mux inputs for the fpga config - select LPC config or PI/BONE slave conifg - default hiz input, pulled up to default mode = lpc config 19 | 20 | #define FPGA_SUSPEND_LOC (1<<3) //PIO3_3 21 | #define FPGA_CS_LOC (1<<11) //PIO0_11 22 | #define FTDI_RST_LOC (1<<1) //PIO2_1 23 | #define MASTER_SENSE_LOC (1<<10) //PIO2_10 - detect PI/BONE connected 24 | 25 | #define SCL_LOC (1<<4)//PIO0_4 // 26 | #define SDA_LOC (1<<5)//PIO0_5 // 27 | 28 | //PIN USAGE DEFINES 29 | #define PB_ACTIVE (0) //Push buttons active level 30 | #define PB_STATE (LPC_GPIO0->DATA & PB_LOC) //PUSH BUTTON LOGIC LEVEL 31 | 32 | 33 | #define MASTER_SENSE_STATE (LPC_GPIO2->DATA & MASTER_SENSE_LOC) //GET PORTPIN VALUE 34 | 35 | #define FTDI_RST_ACTIVE (LPC_GPIO2->DATA &= ~FTDI_RST_LOC) //LOW 36 | #define FTDI_RST_INACTIVE LPC_GPIO2->DATA |= FTDI_RST_LOC //HIGH 37 | 38 | #define FPGA_CS_ACTIVE (LPC_GPIO0->DATA &= ~FPGA_CS_LOC) //LOW 39 | #define FPGA_CS_INACTIVE (LPC_GPIO0->DATA |= FPGA_CS_LOC) //HIGH 40 | #define FPGA_SUSPEND_ACTIVE (LPC_GPIO3->DATA |= FPGA_SUSPEND_LOC) 41 | #define FPGA_SUSPEND_INACTIVE (LPC_GPIO3->DATA &= ~FPGA_SUSPEND_LOC) 42 | 43 | #define LED1_OFF (LPC_GPIO3->DATA &= ~LED1_LOC) 44 | #define LED1_ON (LPC_GPIO3->DATA |= LED1_LOC) 45 | #define LED1_TOGGLE (LPC_GPIO3->DATA ^= LED1_LOC) 46 | #define LED0_OFF (LPC_GPIO2->DATA &= ~LED0_LOC) 47 | #define LED0_ON (LPC_GPIO2->DATA |= LED0_LOC) 48 | #define LED0_TOGGLE (LPC_GPIO2->DATA ^= LED0_LOC) 49 | 50 | #define CFG_PROG_B_ACTIVE (LPC_GPIO1->DATA &= ~CFG_PROG_B_LOC) //CLEAR the PROG_B_PIN 51 | #define CFG_PROG_B_INACTIVE (LPC_GPIO1->DATA |= CFG_PROG_B_LOC) //SET the PROG_B_PIN 52 | #define CFG_DIN_ACTIVE (LPC_GPIO3->DATA |= CFG_DIN_LOC) 53 | #define CFG_DIN_INACTIVE (LPC_GPIO3->DATA &= ~CFG_DIN_LOC) 54 | #define CFG_CCLK_ACTIVE (LPC_GPIO3->DATA |= CFG_CCLK_LOC) 55 | #define CFG_CCLK_INACTIVE (LPC_GPIO3->DATA &= ~CFG_CCLK_LOC) 56 | #define CFG_DONE_STATE (LPC_GPIO1->DATA & CFG_DONE_LOC) 57 | #define CFG_INIT_B_STATE (LPC_GPIO0->DATA & CFG_INIT_B_LOC) 58 | 59 | #define CFG_FLASH_CS_ACTIVE LPC_GPIO2->DATA &= ~CFG_FLASH_CS_LOC //LOW 60 | #define CFG_FLASH_CS_INACTIVE LPC_GPIO2->DATA |= CFG_FLASH_CS_LOC //HIGH 61 | #define CFG_FLASH_RST_ACTIVE LPC_GPIO1->DATA &= ~CFG_FLASH_RST_LOC //LOW 62 | #define CFG_FLASH_RST_INACTIVE LPC_GPIO1->DATA |= CFG_FLASH_RST_LOC //HIGH 63 | #define CFG_MUX_LPC LPC_GPIO2->DATA |= CFG_MUX_SEL_LOC //HIGH - select LPC as much to configure FPGA 64 | #define CFG_MUX_MASTER LPC_GPIO2->DATA &= ~CFG_MUX_SEL_LOC //LOW - select Pi/Bone as much to configure FPGA 65 | #define CFG_MODE1_MASTER LPC_GPIO2->DATA &= ~CFG_MODE1_LOC //LOW 66 | #define CFG_MODE1_SLAVE LPC_GPIO2->DATA |= CFG_MODE1_LOC //HIGH 67 | 68 | //PROTOTYPES ************************************************ 69 | void InitGPIO(); 70 | void InitGPIO_Passive_Mode( void); 71 | void InitGPIO_LPC_Mode(); 72 | 73 | #endif 74 | 75 | //EOF 76 | 77 | 78 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/d1/a00474d0f57d00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 14 | 15 | //PROTOTYPES 16 | int8_t FPGA_Config(char * Filename); 17 | 18 | #endif /* FPGA_CONFIG_H_ */ 19 | 20 | //EOF 21 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/d2/f09e4458037e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 1 14 | 15 | //PROTOTYPES 16 | int8_t FPGA_Config(char * Filename); 17 | uint8_t InitFPGA_Config( void); 18 | 19 | #endif /* FPGA_CONFIG_H_ */ 20 | 21 | //EOF 22 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/e4/301d87740e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | //SYSTEM INLCUDES 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "Timers.h" 19 | #include "ButtonDetect.h" 20 | 21 | 22 | //SYSTEM FUNCTIONALITY DEFINES 23 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 24 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 25 | 26 | #define STATE_SYS_STARTUP 0 27 | #define STATE_LPC_LOADER 1 28 | #define STATE_MASTER_LOADER 2 29 | 30 | #define LED_ALWAYS_OFF 0 31 | #define LED_ALWAYS_ON 0xFFFF 32 | 33 | //FUNCTION PROTOTYPES 34 | void InitUSB_MSC(); 35 | void SetLED_BlinkRate(uint16_t BR); 36 | void InitSystemStateMachine( void); 37 | void TransitionToState(uint8_t NextState); 38 | 39 | //EXTERN VARS FOR SYSTEM 40 | extern volatile uint32_t StartupDelay; 41 | extern volatile uint8_t SystemState; 42 | extern FATFS MyFileSystem; 43 | 44 | #endif 45 | //EOF 46 | 47 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/ea/608865f60d7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 1 14 | 15 | //PROTOTYPES 16 | int8_t FPGA_Config(char * Filename); 17 | int8_t InitFPGA_Config( void); 18 | 19 | #endif /* FPGA_CONFIG_H_ */ 20 | 21 | //EOF 22 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.history/fa/60060a6a0e7e00121be59c12d13b22d1: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | //SYSTEM INLCUDES 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "Timers.h" 19 | #include "ButtonDetect.h" 20 | 21 | 22 | //SYSTEM FUNCTIONALITY DEFINES 23 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 24 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 25 | 26 | #define STATE_SYS_STARTUP 0 27 | #define STATE_LPC_LOADER 1 28 | #define STATE_MASTER_LOADER 2 29 | 30 | 31 | #define LED_ALWAYS_OFF 0 32 | #define LED_ALWAYS_ON 0xFFFF 33 | 34 | void InitUSB_MSC(); 35 | void SetLED_BlinkRate(uint16_t BR); 36 | void InitSystemStateMachine( void); 37 | void TransitionToState(uint8_t NextState); 38 | 39 | extern volatile uint32_t StartupDelay; 40 | extern volatile uint8_t SystemState; 41 | extern FATFS MyFileSystem; 42 | 43 | #endif 44 | //EOF 45 | 46 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/CMSISv1p30_LPC13xx/.indexes/e4/properties.index: -------------------------------------------------------------------------------- 1 | /src/core_cm3.c7org.eclipse.ui.internal.registry.ResourceEditorRegistryEditorProperty!org.eclipse.cdt.ui.editor.CEditor -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/CMSISv1p30_LPC13xx/.indexes/properties.index: -------------------------------------------------------------------------------- 1 | org.eclipse.cdt.corepdomName%CMSISv1p30_LPC13xx.1357656274838.pdomorg.eclipse.cdt.make.corediscoveredScannerConfigFileNameCMSISv1p30_LPC13xx.sc -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/CMSISv1p30_LPC13xx/.markers.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/CMSISv1p30_LPC13xx/.markers.snap -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/CMSISv1p30_LPC13xx/.syncinfo.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/CMSISv1p30_LPC13xx/.syncinfo.snap -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/de/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/de/history.index -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/de/properties.index: -------------------------------------------------------------------------------- 1 | /inc/BoardSupport.h7org.eclipse.ui.internal.registry.ResourceEditorRegistryEditorProperty!org.eclipse.cdt.ui.editor.CEditor/inc/i2cslave.hEditorProperty!org.eclipse.cdt.ui.editor.CEditor -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/e4/history.index -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/e4/properties.index: -------------------------------------------------------------------------------- 1 | /src/FPGA_Config.c7org.eclipse.ui.internal.registry.ResourceEditorRegistryEditorProperty!org.eclipse.cdt.ui.editor.CEditor /src/System.cEditorProperty!org.eclipse.cdt.ui.editor.CEditor/src/ButtonDetect.cEditorProperty!org.eclipse.cdt.ui.editor.CEditor/src/i2cslave.cEditorProperty!org.eclipse.cdt.ui.editor.CEditor /src/main.cEditorProperty!org.eclipse.cdt.ui.editor.CEditor /src/Timers.cEditorProperty!org.eclipse.cdt.ui.editor.CEditor/src/BoardSupport.cEditorProperty!org.eclipse.cdt.ui.editor.CEditor -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.indexes/properties.index: -------------------------------------------------------------------------------- 1 | Mark1_DragDrop_Config.property.page.height844.property.page.width1018.property.page.x440.property.page.y135org.eclipse.cdt.coreactiveConfiguration-com.crt.advproject.config.exe.debug.805121370pdomName(Mark1_DragDrop_Config.1359509432808.pdomorg.eclipse.cdt.make.corediscoveredScannerConfigFileNameMark1_DragDrop_Config.sc -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.markers.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.markers.snap -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.syncinfo.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.projects/Mark1_DragDrop_Config/.syncinfo.snap -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index: -------------------------------------------------------------------------------- 1 | /org.eclipse.core.resourcescontentCacheState2contentCacheTimestamp 1357225360064 -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/25.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.root/25.tree -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.resources/.snap -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-CMSISv1p30_LPC13xx.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | indexer/preferenceScope=0 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-Mark1_DragDrop_Config.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | indexer/preferenceScope=0 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.cdt.debug.core.cDebug.default_source_containers=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.dsf.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | useAnnotationsPrefPage=true 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | spelling_locale_initialized=true 3 | useAnnotationsPrefPage=true 4 | useQuickDiffPrefPage=true 5 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | version=1 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs: -------------------------------------------------------------------------------- 1 | //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.applicationLaunchType=org.eclipse.cdt.dsf.gdb.launch.localCLaunch,debug;org.eclipse.cdt.cdi.launch.localCLaunch,run 2 | //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.attachLaunchType=org.eclipse.cdt.dsf.gdb.launch.attachCLaunch,debug 3 | //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.postmortemLaunchType=org.eclipse.cdt.dsf.gdb.launch.coreCLaunch,debug 4 | eclipse.preferences.version=1 5 | prefWatchExpressions=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n 6 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\r\n\r\n\r\n\r\n 3 | pref_state_memento.org.eclipse.debug.ui.BreakpointView=\r\n\r\n\r\n\r\n\r\n 4 | pref_state_memento.org.eclipse.debug.ui.DebugVieworg.eclipse.debug.ui.DebugView=\r\n 5 | pref_state_memento.org.eclipse.debug.ui.ExpressionView=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n 6 | pref_state_memento.org.eclipse.debug.ui.VariableView=\r\n\r\n\r\n\r\n\r\n 7 | preferredDetailPanes=DefaultDetailPane\:DefaultDetailPane|NumberFormatPane\:NumberFormatPane| 8 | preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget| 9 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | internalWebBrowserHistory=file\:///C\:/nxp/LPCXpresso_5.0.12_1083/lpcxpresso/pages/registered.htm|*|file\://C\:/nxp/LPCXpresso_5.0.12_1083/lpcxpresso/pages/registered.htm|*| 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | overviewRuler_migration=migrated_3.1 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs: -------------------------------------------------------------------------------- 1 | PROBLEMS_FILTERS_MIGRATE=true 2 | eclipse.preferences.version=1 3 | platformState=1357225360064 4 | quickStart=false 5 | tipsAndTricks=true 6 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs: -------------------------------------------------------------------------------- 1 | UIActivities.org.eclipse.cdt.debug.dsfgdbActivity=true 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2013/1/2/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2013/1/2/refactorings.index: -------------------------------------------------------------------------------- 1 | 1357659580050 Delete resource 'TEST_IO' 2 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2013/1/5/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2013/1/5/refactorings.index: -------------------------------------------------------------------------------- 1 | 1359508889567 Delete 3 resources 2 | 1359509182462 Delete resource 'usbmsd_rom/inc/DataTypes.h.eli' 3 | 1359509432551 Rename resource 'usbmsd_rom' 4 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2013/2/8/refactorings.history: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2013/2/8/refactorings.index: -------------------------------------------------------------------------------- 1 | 1361661010101 Delete resource 'Mark1_DragDrop_Config/src/i2c_mark1.c' 2 | 1361661013963 Delete resource 'Mark1_DragDrop_Config/src/i2c_mark1.h' 3 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/.metadata/version.ini: -------------------------------------------------------------------------------- 1 | org.eclipse.core.runtime=1 -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | CMSISv1p30_LPC13xx 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | ?name? 14 | 15 | 16 | 17 | org.eclipse.cdt.make.core.append_environment 18 | true 19 | 20 | 21 | org.eclipse.cdt.make.core.autoBuildTarget 22 | all 23 | 24 | 25 | org.eclipse.cdt.make.core.buildArguments 26 | 27 | 28 | 29 | org.eclipse.cdt.make.core.buildCommand 30 | make 31 | 32 | 33 | org.eclipse.cdt.make.core.buildLocation 34 | ${workspace_loc:/CMSISv1p30_LPC13xx/Debug} 35 | 36 | 37 | org.eclipse.cdt.make.core.cleanBuildTarget 38 | clean 39 | 40 | 41 | org.eclipse.cdt.make.core.contents 42 | org.eclipse.cdt.make.core.activeConfigSettings 43 | 44 | 45 | org.eclipse.cdt.make.core.enableAutoBuild 46 | false 47 | 48 | 49 | org.eclipse.cdt.make.core.enableCleanBuild 50 | true 51 | 52 | 53 | org.eclipse.cdt.make.core.enableFullBuild 54 | true 55 | 56 | 57 | org.eclipse.cdt.make.core.fullBuildTarget 58 | all 59 | 60 | 61 | org.eclipse.cdt.make.core.stopOnError 62 | true 63 | 64 | 65 | org.eclipse.cdt.make.core.useDefaultBuildCmd 66 | true 67 | 68 | 69 | 70 | 71 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 72 | 73 | 74 | 75 | 76 | 77 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 78 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 79 | org.eclipse.cdt.core.cnature 80 | 81 | 82 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/libCMSISv1p30_LPC13xx.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/libCMSISv1p30_LPC13xx.a -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | -include ../makefile.init 6 | 7 | RM := rm -rf 8 | 9 | # All of the sources participating in the build are defined here 10 | -include sources.mk 11 | -include src/subdir.mk 12 | -include subdir.mk 13 | -include objects.mk 14 | 15 | ifneq ($(MAKECMDGOALS),clean) 16 | ifneq ($(strip $(C_DEPS)),) 17 | -include $(C_DEPS) 18 | endif 19 | endif 20 | 21 | -include ../makefile.defs 22 | 23 | # Add inputs and outputs from these tool invocations to the build variables 24 | 25 | # All Target 26 | all: libCMSISv1p30_LPC13xx.a 27 | 28 | # Tool invocations 29 | libCMSISv1p30_LPC13xx.a: $(OBJS) $(USER_OBJS) 30 | @echo 'Building target: $@' 31 | @echo 'Invoking: MCU Archiver' 32 | arm-none-eabi-ar -r "libCMSISv1p30_LPC13xx.a" $(OBJS) $(USER_OBJS) $(LIBS) 33 | @echo 'Finished building target: $@' 34 | @echo ' ' 35 | $(MAKE) --no-print-directory post-build 36 | 37 | # Other Targets 38 | clean: 39 | -$(RM) $(OBJS)$(C_DEPS)$(ARCHIVES) libCMSISv1p30_LPC13xx.a 40 | -@echo ' ' 41 | 42 | post-build: 43 | -@echo 'Performing post-build steps' 44 | -arm-none-eabi-size libCMSISv1p30_LPC13xx.a ; # arm-none-eabi-objdump -h -S libCMSISv1p30_LPC13xx.a >libCMSISv1p30_LPC13xx.lss 45 | -@echo ' ' 46 | 47 | .PHONY: all clean dependents 48 | .SECONDARY: post-build 49 | 50 | -include ../makefile.targets 51 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | O_SRCS := 6 | C_SRCS := 7 | S_SRCS := 8 | S_UPPER_SRCS := 9 | OBJ_SRCS := 10 | ASM_SRCS := 11 | OBJS := 12 | C_DEPS := 13 | ARCHIVES := 14 | 15 | # Every subdirectory with source files must be described here 16 | SUBDIRS := \ 17 | src \ 18 | 19 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/core_cm3.d: -------------------------------------------------------------------------------- 1 | src/core_cm3.d: ../src/core_cm3.c 2 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/core_cm3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/core_cm3.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../src/core_cm3.c \ 8 | ../src/system_LPC13xx.c 9 | 10 | OBJS += \ 11 | ./src/core_cm3.o \ 12 | ./src/system_LPC13xx.o 13 | 14 | C_DEPS += \ 15 | ./src/core_cm3.d \ 16 | ./src/system_LPC13xx.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | src/%.o: ../src/%.c 21 | @echo 'Building file: $<' 22 | @echo 'Invoking: MCU C Compiler' 23 | arm-none-eabi-gcc -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" 24 | @echo 'Finished building: $<' 25 | @echo ' ' 26 | 27 | 28 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/system_LPC13xx.d: -------------------------------------------------------------------------------- 1 | src/system_LPC13xx.d: ../src/system_LPC13xx.c \ 2 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h \ 3 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h \ 4 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h 5 | 6 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h: 7 | 8 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h: 9 | 10 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h: 11 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/system_LPC13xx.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/Debug/src/system_LPC13xx.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/cmsis_readme.txt: -------------------------------------------------------------------------------- 1 | CMSIS : Cortex Microcontroller Software Interface Standard 2 | ========================================================== 3 | CMSIS defines for a Cortex-M Microcontroller System: 4 | 5 | * A common way to access peripheral registers and a 6 | common way to define exception vectors. 7 | * The register names of the Core Peripherals and the 8 | names of the Core Exception Vectors. 9 | * An device independent interface for RTOS Kernels 10 | including a debug channel. 11 | 12 | By using CMSIS compliant software components, the user can 13 | easier re-use template code. CMSIS is intended to enable the 14 | combination of software components from multiple middleware 15 | vendors. 16 | 17 | This project contains appropriate files for this MCU family 18 | taken from CMSIS. A full copy of the CMSIS files can be found 19 | within your tools installation directory. More information on 20 | CMSIS can be found at: 21 | 22 | http://www.onarm.com/ 23 | http://www.arm.com/ 24 | 25 | 26 | Note: The MCU initialization code (NOT the C startup code) is 27 | in the file system_LPC13xx.c. All of the peripheral clock and 28 | main PLL settings are also #defined here and shared by all of 29 | the projects in this workspace. 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/docs/CMSIS debug support.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/docs/CMSIS debug support.htm -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/docs/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/docs/CMSIS_Core.htm -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/docs/License.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/docs/License.doc -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/CMSISv1p30_LPC13xx/inc/system_LPC13xx.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file system_LPC13xx.h 3 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer Header File 4 | * for the NXP LPC13xx Device Series 5 | * @version V1.01 6 | * @date 19. October 2009 7 | * 8 | * @note 9 | * Copyright (C) 2009 ARM Limited. All rights reserved. 10 | * 11 | * @par 12 | * ARM Limited (ARM) is supplying this software for use with Cortex-M 13 | * processor based microcontrollers. This file can be freely distributed 14 | * within development tools that are supporting such ARM based processors. 15 | * 16 | * @par 17 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED 18 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. 20 | * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR 21 | * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. 22 | * 23 | ******************************************************************************/ 24 | 25 | 26 | #ifndef __SYSTEM_LPC13xx_H 27 | #define __SYSTEM_LPC13xx_H 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #include 34 | 35 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 36 | 37 | 38 | /** 39 | * Initialize the system 40 | * 41 | * @param none 42 | * @return none 43 | * 44 | * @brief Setup the microcontroller system. 45 | * Initialize the System and update the SystemCoreClock variable. 46 | */ 47 | extern void SystemInit (void); 48 | 49 | /** 50 | * Update SystemCoreClock variable 51 | * 52 | * @param none 53 | * @return none 54 | * 55 | * @brief Updates the SystemCoreClock with current core Clock 56 | * retrieved from cpu registers. 57 | */ 58 | extern void SystemCoreClockUpdate (void); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif /* __SYSTEM_LPC13x_H */ 65 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Mark1_DragDrop_Config 4 | 5 | 6 | CMSISv1p30_LPC13xx 7 | 8 | 9 | 10 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 11 | clean,full,incremental, 12 | 13 | 14 | ?name? 15 | 16 | 17 | 18 | org.eclipse.cdt.make.core.append_environment 19 | true 20 | 21 | 22 | org.eclipse.cdt.make.core.autoBuildTarget 23 | all 24 | 25 | 26 | org.eclipse.cdt.make.core.buildArguments 27 | 28 | 29 | 30 | org.eclipse.cdt.make.core.buildCommand 31 | make 32 | 33 | 34 | org.eclipse.cdt.make.core.buildLocation 35 | ${workspace_loc:/usbmsd_rom/Debug} 36 | 37 | 38 | org.eclipse.cdt.make.core.cleanBuildTarget 39 | clean 40 | 41 | 42 | org.eclipse.cdt.make.core.contents 43 | org.eclipse.cdt.make.core.activeConfigSettings 44 | 45 | 46 | org.eclipse.cdt.make.core.enableAutoBuild 47 | false 48 | 49 | 50 | org.eclipse.cdt.make.core.enableCleanBuild 51 | true 52 | 53 | 54 | org.eclipse.cdt.make.core.enableFullBuild 55 | true 56 | 57 | 58 | org.eclipse.cdt.make.core.fullBuildTarget 59 | all 60 | 61 | 62 | org.eclipse.cdt.make.core.stopOnError 63 | true 64 | 65 | 66 | org.eclipse.cdt.make.core.useDefaultBuildCmd 67 | true 68 | 69 | 70 | 71 | 72 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 73 | 74 | 75 | 76 | 77 | 78 | org.eclipse.cdt.core.cnature 79 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 80 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 81 | 82 | 83 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/Mark1_DragDrop_Config.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/Mark1_DragDrop_Config.axf -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/blink_led_130321.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/blink_led_130321.bin -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/firmware.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/firmware.bin -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | -include ../makefile.init 6 | 7 | RM := rm -rf 8 | 9 | # All of the sources participating in the build are defined here 10 | -include sources.mk 11 | -include src/chan\ fat\ fs/option/subdir.mk 12 | -include src/chan\ fat\ fs/subdir.mk 13 | -include src/subdir.mk 14 | -include subdir.mk 15 | -include objects.mk 16 | 17 | ifneq ($(MAKECMDGOALS),clean) 18 | ifneq ($(strip $(C_DEPS)),) 19 | -include $(C_DEPS) 20 | endif 21 | endif 22 | 23 | -include ../makefile.defs 24 | 25 | # Add inputs and outputs from these tool invocations to the build variables 26 | 27 | # All Target 28 | all: Mark1_DragDrop_Config.axf 29 | 30 | # Tool invocations 31 | Mark1_DragDrop_Config.axf: $(OBJS) $(USER_OBJS) 32 | @echo 'Building target: $@' 33 | @echo 'Invoking: MCU Linker' 34 | arm-none-eabi-gcc -nostdlib -L"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\Debug" -Xlinker --gc-sections -Xlinker -Map=Mark1_DragDrop_Config.map -mcpu=cortex-m3 -mthumb -T ../ld/usb_buffer.ld -o "Mark1_DragDrop_Config.axf" $(OBJS) $(USER_OBJS) $(LIBS) 35 | @echo 'Finished building target: $@' 36 | @echo ' ' 37 | $(MAKE) --no-print-directory post-build 38 | 39 | # Other Targets 40 | clean: 41 | -$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) Mark1_DragDrop_Config.axf 42 | -@echo ' ' 43 | 44 | post-build: 45 | -@echo 'Performing post-build steps' 46 | -arm-none-eabi-size Mark1_DragDrop_Config.axf; arm-none-eabi-objcopy -O binary Mark1_DragDrop_Config.axf Mark1_DragDrop_Config.bin; checksum Mark1_DragDrop_Config.bin; 47 | -@echo ' ' 48 | 49 | .PHONY: all clean dependents 50 | .SECONDARY: post-build 51 | 52 | -include ../makefile.targets 53 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lCMSISv1p30_LPC13xx 8 | 9 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | O_SRCS := 6 | C_SRCS := 7 | S_SRCS := 8 | S_UPPER_SRCS := 9 | OBJ_SRCS := 10 | ASM_SRCS := 11 | OBJS := 12 | C_DEPS := 13 | EXECUTABLES := 14 | 15 | # Every subdirectory with source files must be described here 16 | SUBDIRS := \ 17 | src \ 18 | src/chan\ fat\ fs/option \ 19 | src/chan\ fat\ fs \ 20 | 21 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/BoardSupport.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/BoardSupport.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/ButtonDetect.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/ButtonDetect.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/FLASH.d: -------------------------------------------------------------------------------- 1 | src/FLASH.d: ../src/FLASH.c \ 2 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h \ 3 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h \ 4 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h \ 5 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/FLASH.h \ 6 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan\ fat\ fs/integer.h 7 | 8 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h: 9 | 10 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h: 11 | 12 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h: 13 | 14 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/FLASH.h: 15 | 16 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan\ fat\ fs/integer.h: 17 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/FLASH.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/FLASH.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/FPGA_Config.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/FPGA_Config.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/System.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/System.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/Timers.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/Timers.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/diskio.d: -------------------------------------------------------------------------------- 1 | src/chan\ fat\ fs/diskio.d: ../src/chan\ fat\ fs/diskio.c \ 2 | ../src/chan\ fat\ fs/diskio.h ../src/chan\ fat\ fs/integer.h \ 3 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/FLASH.h \ 4 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h \ 5 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h \ 6 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h \ 7 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan\ fat\ fs/integer.h 8 | 9 | ../src/chan\ fat\ fs/diskio.h: 10 | 11 | ../src/chan\ fat\ fs/integer.h: 12 | 13 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/FLASH.h: 14 | 15 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h: 16 | 17 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h: 18 | 19 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h: 20 | 21 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan\ fat\ fs/integer.h: 22 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/diskio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/diskio.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/ff.d: -------------------------------------------------------------------------------- 1 | src/chan\ fat\ fs/ff.d: ../src/chan\ fat\ fs/ff.c \ 2 | ../src/chan\ fat\ fs/ff.h ../src/chan\ fat\ fs/integer.h \ 3 | ../src/chan\ fat\ fs/ffconf.h ../src/chan\ fat\ fs/diskio.h 4 | 5 | ../src/chan\ fat\ fs/ff.h: 6 | 7 | ../src/chan\ fat\ fs/integer.h: 8 | 9 | ../src/chan\ fat\ fs/ffconf.h: 10 | 11 | ../src/chan\ fat\ fs/diskio.h: 12 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/ff.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/ff.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/option/ccsbcs.d: -------------------------------------------------------------------------------- 1 | src/chan\ fat\ fs/option/ccsbcs.d: ../src/chan\ fat\ fs/option/ccsbcs.c \ 2 | ../src/chan\ fat\ fs/option/../ff.h \ 3 | ../src/chan\ fat\ fs/option/../integer.h \ 4 | ../src/chan\ fat\ fs/option/../ffconf.h 5 | 6 | ../src/chan\ fat\ fs/option/../ff.h: 7 | 8 | ../src/chan\ fat\ fs/option/../integer.h: 9 | 10 | ../src/chan\ fat\ fs/option/../ffconf.h: 11 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/option/ccsbcs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/option/ccsbcs.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/option/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../src/chan\ fat\ fs/option/ccsbcs.c 8 | 9 | OBJS += \ 10 | ./src/chan\ fat\ fs/option/ccsbcs.o 11 | 12 | C_DEPS += \ 13 | ./src/chan\ fat\ fs/option/ccsbcs.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | src/chan\ fat\ fs/option/ccsbcs.o: ../src/chan\ fat\ fs/option/ccsbcs.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: MCU C Compiler' 20 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs\option" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/chan fat fs/option/ccsbcs.d" -MT"src/chan\ fat\ fs/option/ccsbcs.d" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/chan fat fs/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../src/chan\ fat\ fs/diskio.c \ 8 | ../src/chan\ fat\ fs/ff.c 9 | 10 | OBJS += \ 11 | ./src/chan\ fat\ fs/diskio.o \ 12 | ./src/chan\ fat\ fs/ff.o 13 | 14 | C_DEPS += \ 15 | ./src/chan\ fat\ fs/diskio.d \ 16 | ./src/chan\ fat\ fs/ff.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | src/chan\ fat\ fs/diskio.o: ../src/chan\ fat\ fs/diskio.c 21 | @echo 'Building file: $<' 22 | @echo 'Invoking: MCU C Compiler' 23 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs\option" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/chan fat fs/diskio.d" -MT"src/chan\ fat\ fs/diskio.d" -o "$@" "$<" 24 | @echo 'Finished building: $<' 25 | @echo ' ' 26 | 27 | src/chan\ fat\ fs/ff.o: ../src/chan\ fat\ fs/ff.c 28 | @echo 'Building file: $<' 29 | @echo 'Invoking: MCU C Compiler' 30 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs\option" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"src/chan fat fs/ff.d" -MT"src/chan\ fat\ fs/ff.d" -o "$@" "$<" 31 | @echo 'Finished building: $<' 32 | @echo ' ' 33 | 34 | 35 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/cr_startup_lpc13.d: -------------------------------------------------------------------------------- 1 | src/cr_startup_lpc13.d: ../src/cr_startup_lpc13.c \ 2 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h 3 | 4 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h: 5 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/cr_startup_lpc13.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/cr_startup_lpc13.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/i2cslave.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/i2cslave.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/main.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/msccallback.d: -------------------------------------------------------------------------------- 1 | src/msccallback.d: ../src/msccallback.c \ 2 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h \ 3 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h \ 4 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h \ 5 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/type.h \ 6 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/compiler.h \ 7 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/usb.h \ 8 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/msccallback.h \ 9 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/Flash.h \ 10 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan\ fat\ fs/integer.h 11 | 12 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h: 13 | 14 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h: 15 | 16 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h: 17 | 18 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/type.h: 19 | 20 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/compiler.h: 21 | 22 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/usb.h: 23 | 24 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/msccallback.h: 25 | 26 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/Flash.h: 27 | 28 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan\ fat\ fs/integer.h: 29 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/msccallback.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/msccallback.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../src/BoardSupport.c \ 8 | ../src/ButtonDetect.c \ 9 | ../src/FLASH.c \ 10 | ../src/FPGA_Config.c \ 11 | ../src/System.c \ 12 | ../src/Timers.c \ 13 | ../src/cr_startup_lpc13.c \ 14 | ../src/i2cslave.c \ 15 | ../src/main.c \ 16 | ../src/msccallback.c \ 17 | ../src/usbdesc.c 18 | 19 | OBJS += \ 20 | ./src/BoardSupport.o \ 21 | ./src/ButtonDetect.o \ 22 | ./src/FLASH.o \ 23 | ./src/FPGA_Config.o \ 24 | ./src/System.o \ 25 | ./src/Timers.o \ 26 | ./src/cr_startup_lpc13.o \ 27 | ./src/i2cslave.o \ 28 | ./src/main.o \ 29 | ./src/msccallback.o \ 30 | ./src/usbdesc.o 31 | 32 | C_DEPS += \ 33 | ./src/BoardSupport.d \ 34 | ./src/ButtonDetect.d \ 35 | ./src/FLASH.d \ 36 | ./src/FPGA_Config.d \ 37 | ./src/System.d \ 38 | ./src/Timers.d \ 39 | ./src/cr_startup_lpc13.d \ 40 | ./src/i2cslave.d \ 41 | ./src/main.d \ 42 | ./src/msccallback.d \ 43 | ./src/usbdesc.d 44 | 45 | 46 | # Each subdirectory must supply rules for building sources it contributes 47 | src/%.o: ../src/%.c 48 | @echo 'Building file: $<' 49 | @echo 'Invoking: MCU C Compiler' 50 | arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC13xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src\chan fat fs\option" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\src" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc" -I"D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 51 | @echo 'Finished building: $<' 52 | @echo ' ' 53 | 54 | 55 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/usbdesc.d: -------------------------------------------------------------------------------- 1 | src/usbdesc.d: ../src/usbdesc.c \ 2 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h \ 3 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h \ 4 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h \ 5 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/usb.h \ 6 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/compiler.h \ 7 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/usbdesc.h 8 | 9 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/LPC13xx.h: 10 | 11 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/core_cm3.h: 12 | 13 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\CMSISv1p30_LPC13xx\inc/system_LPC13xx.h: 14 | 15 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/usb.h: 16 | 17 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/compiler.h: 18 | 19 | D:\Dropbox\Prj\Valent\LOGI-FAMILY\SRC\Mark1\MCU\Mark1_DragDrop_Config\Mark1_DragDrop_Config\inc/usbdesc.h: 20 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/usbdesc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/Debug/src/usbdesc.o -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/BoardSupport.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOARD_SUPPORT_H 2 | #define _BOARD_SUPPORT_H 3 | 4 | //PIN LOCATION DEFINES 5 | #define LED1_LOC (1<<0) //PIO3_0 6 | #define LED0_LOC (1<<3) //PIO2_3 7 | 8 | #define PB_LOC (1<<1) //PIO0_1 9 | 10 | #define CFG_INIT_B_LOC (1<<7) //PIO0_7 11 | #define CFG_DIN_LOC (1<<2) //PIO3_2 12 | #define CFG_CCLK_LOC (1<<1) //PIO3_1 13 | #define CFG_PROG_B_LOC (1<<9) //PIO1_9 14 | #define CFG_DONE_LOC (1<<8) //PIO1_8 15 | #define CFG_FLASH_RST_LOC (1<<1) //PIO1_1 - used to reset fpga cfg flash if needed - default hiz = input to no conflict 16 | #define CFG_MODE1_LOC (1<<8) //PIO2_8 17 | #define CFG_FLASH_CS_LOC (1<<9) //PIO2_9 - use the control CS pin of the fpga flash chip. - default - hiz = input 18 | #define CFG_MUX_SEL_LOC (1<<2) //PIO2_2 - select the mux inputs for the fpga config - select LPC config or PI/BONE slave conifg - default hiz input, pulled up to default mode = lpc config 19 | 20 | #define FPGA_SUSPEND_LOC (1<<3) //PIO3_3 21 | #define FPGA_CS_LOC (1<<11) //PIO0_11 22 | #define FTDI_RST_LOC (1<<1) //PIO2_1 23 | #define MASTER_SENSE_LOC (1<<10) //PIO2_10 - detect PI/BONE connected 24 | 25 | #define SCL_LOC (1<<4)//PIO0_4 // 26 | #define SDA_LOC (1<<5)//PIO0_5 // 27 | 28 | //PIN USAGE DEFINES 29 | #define PB_ACTIVE (0) //Push buttons active level 30 | #define PB_STATE (LPC_GPIO0->DATA & PB_LOC) //PUSH BUTTON LOGIC LEVEL 31 | 32 | 33 | #define MASTER_SENSE_STATE (LPC_GPIO2->DATA & MASTER_SENSE_LOC) //GET PORTPIN VALUE 34 | 35 | #define FTDI_RST_ACTIVE (LPC_GPIO2->DATA &= ~FTDI_RST_LOC) //LOW 36 | #define FTDI_RST_INACTIVE LPC_GPIO2->DATA |= FTDI_RST_LOC //HIGH 37 | 38 | #define FPGA_CS_ACTIVE (LPC_GPIO0->DATA &= ~FPGA_CS_LOC) //LOW 39 | #define FPGA_CS_INACTIVE (LPC_GPIO0->DATA |= FPGA_CS_LOC) //HIGH 40 | #define FPGA_SUSPEND_ACTIVE (LPC_GPIO3->DATA |= FPGA_SUSPEND_LOC) 41 | #define FPGA_SUSPEND_INACTIVE (LPC_GPIO3->DATA &= ~FPGA_SUSPEND_LOC) 42 | 43 | #define LED1_OFF (LPC_GPIO3->DATA &= ~LED1_LOC) 44 | #define LED1_ON (LPC_GPIO3->DATA |= LED1_LOC) 45 | #define LED1_TOGGLE (LPC_GPIO3->DATA ^= LED1_LOC) 46 | #define LED0_OFF (LPC_GPIO2->DATA &= ~LED0_LOC) 47 | #define LED0_ON (LPC_GPIO2->DATA |= LED0_LOC) 48 | #define LED0_TOGGLE (LPC_GPIO2->DATA ^= LED0_LOC) 49 | 50 | #define CFG_PROG_B_ACTIVE (LPC_GPIO1->DATA &= ~CFG_PROG_B_LOC) //CLEAR the PROG_B_PIN 51 | #define CFG_PROG_B_INACTIVE (LPC_GPIO1->DATA |= CFG_PROG_B_LOC) //SET the PROG_B_PIN 52 | #define CFG_DIN_ACTIVE (LPC_GPIO3->DATA |= CFG_DIN_LOC) 53 | #define CFG_DIN_INACTIVE (LPC_GPIO3->DATA &= ~CFG_DIN_LOC) 54 | #define CFG_CCLK_ACTIVE (LPC_GPIO3->DATA |= CFG_CCLK_LOC) 55 | #define CFG_CCLK_INACTIVE (LPC_GPIO3->DATA &= ~CFG_CCLK_LOC) 56 | #define CFG_DONE_STATE (LPC_GPIO1->DATA & CFG_DONE_LOC) 57 | #define CFG_INIT_B_STATE (LPC_GPIO0->DATA & CFG_INIT_B_LOC) 58 | 59 | #define CFG_FLASH_CS_ACTIVE LPC_GPIO2->DATA &= ~CFG_FLASH_CS_LOC //LOW 60 | #define CFG_FLASH_CS_INACTIVE LPC_GPIO2->DATA |= CFG_FLASH_CS_LOC //HIGH 61 | #define CFG_FLASH_RST_ACTIVE LPC_GPIO1->DATA &= ~CFG_FLASH_RST_LOC //LOW 62 | #define CFG_FLASH_RST_INACTIVE LPC_GPIO1->DATA |= CFG_FLASH_RST_LOC //HIGH 63 | #define CFG_MUX_LPC_CTL LPC_GPIO2->DATA |= CFG_MUX_SEL_LOC //HIGH - select LPC as much to configure FPGA 64 | #define CFG_MUX_MASTER_CTL LPC_GPIO2->DATA &= ~CFG_MUX_SEL_LOC //LOW - select Pi/Bone as much to configure FPGA 65 | #define CFG_MODE1_MASTER LPC_GPIO2->DATA &= ~CFG_MODE1_LOC //LOW 66 | #define CFG_MODE1_SLAVE LPC_GPIO2->DATA |= CFG_MODE1_LOC //HIGH 67 | 68 | //PROTOTYPES ************************************************ 69 | void InitGPIO(); 70 | void InitGPIO_Passive_Mode( void); 71 | void InitGPIO_LPC_Mode(); 72 | 73 | #endif 74 | 75 | //EOF 76 | 77 | 78 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/ButtonDetect.h: -------------------------------------------------------------------------------- 1 | #include "DataTypes.h" 2 | 3 | #ifndef _BUTTON_DETECT_H 4 | #define _BUTTON_DETECT_H 5 | 6 | typedef struct 7 | { 8 | BOOL ButtonPressed; 9 | WORD ButtonReleased; 10 | BYTE DebounceTime; 11 | BYTE DetectState; 12 | WORD Ticker; 13 | } ButtonDetect; 14 | 15 | //PUSH BUTTON STRUCTURE USED FOR DEBOUNCING 16 | //extern volatile ButtonDetect pBtn0; 17 | extern volatile ButtonDetect Btn0; //push button 0 debounce structure 18 | 19 | 20 | 21 | void InitButtonDetectAll( void); 22 | void ButtonProcessAll( void); 23 | void InitButtonDetect(ButtonDetect *BD,BYTE DebounceTime); 24 | //This Process must be called every 10mSec for each button detect 25 | //The input is high active logic. i.e. Input should be 26 | //a value greater than if true, 0 if false; 27 | void ButtonProcess(ButtonDetect * BD,BOOL Input); 28 | //Always used these function to check button states. THe preopely check the structure 29 | //and reset flags. 30 | //Returns True is there was a press event, false if not 31 | BOOL ButtonPressed(ButtonDetect *BD); 32 | //Returns zero if a released event has not occured yet. If greater than zero a release event 33 | //has occurred and the value is the button hold time in 10mSec Increments 34 | BOOL ButtonReleased(ButtonDetect *BD); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/DataTypes.h: -------------------------------------------------------------------------------- 1 | #ifndef DATATYPES_H_ 2 | #define DATATYPES_H_ 3 | 4 | #define BYTE unsigned char 5 | #define WORD unsigned short 6 | #define DWORD unsigned int 7 | 8 | #define SIGNED_BYTE signed char 9 | #define SIGNED_WORD signed short 10 | #define SIGNED_DWORD signed int 11 | 12 | #define BOOL BYTE 13 | 14 | #ifndef TRUE 15 | #define TRUE 1 16 | #endif 17 | 18 | 19 | #ifndef FALSE 20 | #define FALSE 0 21 | #endif 22 | 23 | #ifndef YEP 24 | #define YEP TRUE 25 | #endif 26 | 27 | 28 | #ifndef NOPE 29 | #define NOPE FALSE 30 | #endif 31 | 32 | #ifndef NULL 33 | #define NULL 0 34 | #endif 35 | 36 | #endif /*DATATYPES_H_*/ 37 | 38 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/FLASH.h: -------------------------------------------------------------------------------- 1 | #include "LPC13xx.h" 2 | #include "integer.h" 3 | #ifndef _FLASH_H 4 | #define _FLASH_H 5 | 6 | 7 | void InitFLASH(); 8 | void M25PXX_RDID(BYTE *ID); 9 | void M25PXX_WRSR(BYTE StatusReg); 10 | BYTE M25PXX_RDSR(); 11 | void M25PXX_WRDI(); 12 | void M25PXX_WREN(); 13 | void BlockUntilFlashOperationComplete(); 14 | void MP25PE_Read(DWORD Page,DWORD Length, BYTE *Data); 15 | void MP25PE_PageProgram(DWORD Page,DWORD Length,BYTE *Data); 16 | void MP25PE_PageErase(DWORD Page); 17 | 18 | 19 | 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/FPGA_Config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FPGA_Config.h 3 | * 4 | */ 5 | 6 | #ifndef FPGA_CONFIG_H_ 7 | #define FPGA_CONFIG_H_ 8 | 9 | //ERRORS FOR THE FPGA CONFIGURATION 10 | #define CONFIG_ERROR_FILE_NOT_FOUND -1 11 | #define CONFIG_ERROR_INIT_NOT_HIGH -2 12 | #define CONFIG_ERROR_DONE_NOT_HIGH -3 13 | #define CONFIG_OK 1 14 | 15 | //PROTOTYPES 16 | int8_t FPGA_Config(char * Filename); //main function call for complete lcp fpga config 17 | int8_t InitFPGA_Config( void); // start fpga init sequence 18 | 19 | #endif /* FPGA_CONFIG_H_ */ 20 | 21 | //EOF 22 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/System.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSTEM_H 2 | #define _SYSTEM_H 3 | 4 | //SYSTEM INLCUDES 5 | #include 6 | #include "LPC13xx.h" 7 | #include "usb.h" 8 | #include "usbdesc.h" 9 | #include "FPGA_Config.h" 10 | #include "type.h" 11 | #include "msccallback.h" 12 | #include "FLASH.h" 13 | #include "rom_drivers.h" 14 | #include "config.h" 15 | #include "ff.h" 16 | #include "BoardSupport.h" 17 | #include "i2cslave.h" 18 | #include "Timers.h" 19 | #include "ButtonDetect.h" 20 | 21 | //SYSTEM FUNCTIONALITY DEFINES 22 | #define USE_LED_HEART_BEAT //use led as system heartbeat? 23 | #define USE_DRAG_DROP_BISTREAM_STARTUP //enable drag and drop bitstream functionality 24 | 25 | #define STATE_SYS_STARTUP 0 26 | #define STATE_LPC_LOADER 1 27 | #define STATE_MASTER_LOADER 2 28 | 29 | #define LED_ALWAYS_OFF 0 30 | #define LED_ALWAYS_ON 0xFFFF 31 | 32 | //FUNCTION PROTOTYPES 33 | void InitUSB_MSC(); 34 | void SetLED_BlinkRate(uint16_t BR); 35 | void InitSystemStateMachine( void); 36 | void TransitionToState(uint8_t NextState); 37 | 38 | //EXTERN VARS FOR SYSTEM 39 | extern volatile uint32_t StartupDelay; 40 | extern volatile uint8_t SystemState; 41 | extern FATFS MyFileSystem; 42 | 43 | #endif 44 | //EOF 45 | 46 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/Timers.h: -------------------------------------------------------------------------------- 1 | /*************************************************************** 2 | * timers.h 3 | ****************************************************************/ 4 | #ifndef _TIMERS_H 5 | #define _TIMERS_H 6 | 7 | //DEFINES 8 | #define MAX_TIMERS 10 9 | 10 | 11 | //DEFAULT VALUES USED BY TIMERS 12 | #define TIME_PB0 10 //count in ms 13 | #define TIME_PB1 10 14 | 15 | 16 | //TIMER ID'S USED IN SYSTEM 17 | extern uint8_t timer_pb; //push button 0 timer ID 18 | extern uint8_t flag_pb; //flag for push button 0 19 | 20 | 21 | //VARIABLES 22 | extern volatile uint32_t tick; // tick counter 23 | extern volatile uint32_t timers[MAX_TIMERS]; // Timer a 24 | extern volatile int ntimers; 25 | 26 | 27 | //FUNCTION PROTOTYPES 28 | void InitTimers(void); 29 | uint32_t GetTick(void); 30 | void DelayMS(uint16_t tickDel); 31 | uint16_t RegisterTimer(void); 32 | void TimerStart(uint16_t timer, uint32_t ticks); 33 | void TimerStop(uint16_t timer) ; 34 | uint16_t TimerIsOn(uint16_t timer) ; 35 | 36 | 37 | #endif 38 | 39 | 40 | //EOF 41 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/compiler.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * compiler.h: Compiler-specific header file for NXP Family 3 | * Microprocessors 4 | * 5 | * Copyright(C) 2009, NXP Semiconductor 6 | * All rights reserved. 7 | * 8 | * History 9 | * 2009.12.23 ver 1.00 Preliminary version, first Release 10 | * 11 | ******************************************************************************/ 12 | #ifndef __COMPILER_H__ 13 | #define __COMPILER_H__ 14 | 15 | #include "LPC13xx.h" // Defines __ASM and __INLINE 16 | 17 | #if !defined(__IAR__) && !defined(__KEIL__) && !defined(__CODERED__) 18 | 19 | #if defined(__IAR_SYSTEMS_ICC__) 20 | #define __IAR__ 21 | #endif 22 | 23 | #if defined(__GNUC__) 24 | #define __CODERED__ 25 | #endif 26 | 27 | #if defined(__CC_ARM) 28 | #define __KEIL__ 29 | #endif 30 | 31 | #endif 32 | /* 33 | Various compiler declaration methods for packed structures: 34 | GNU/IAR: typedef struct { blah blah blah } __attribute__((packed)) structName; 35 | Keil: typedef __packed struct { blah blah blah } structName; 36 | */ 37 | #if defined(__GNUC__) 38 | #define PACKED_PRE /**/ 39 | #define PACKED_POST __attribute__((packed)) 40 | #elif defined(__IAR_SYSTEMS_ICC__) 41 | #define PACKED_PRE /**/ 42 | #define PACKED_POST __packed 43 | #else /* Keil? */ 44 | #define PACKED_PRE __packed 45 | #define PACKED_POST /**/ 46 | #endif 47 | 48 | #endif /* __COMPILER_H__ */ 49 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/config.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * config.h: config file for usbmsd_rom example for NXP LPC13xx Family 3 | * Microprocessors 4 | * 5 | * Copyright(C) 2008, NXP Semiconductor 6 | * All rights reserved. 7 | * 8 | * History 9 | * 2009.12.22 ver 1.00 Preliminary version, first Release 10 | * 11 | ******************************************************************************/ 12 | 13 | /* 14 | Overview: 15 | This example shows how to use the on-chip USB driver in ROM to 16 | implement a simple MSC (Mass Storage Class) USB peripheral. 17 | 18 | How to use: 19 | Click the debug toolbar button. 20 | Click the go button. 21 | Plug the LPCXpresso's target side into a PC using a USB cable retrofit 22 | or a 3rd party base board. 23 | 24 | * You should see a disk drive on the PC called "LPC134x USB" containing 25 | a .txt file. 26 | */ 27 | 28 | /* Note: Our HID Demonstration software only works with our VID */ 29 | #define NXP_VID 0x1FC9 30 | #define MY_VID 0x???? 31 | 32 | #define USB_VENDOR_ID NXP_VID // Vendor ID 33 | #define USB_PROD_ID 0x0003 // Product ID 34 | #define USB_DEVICE 0x0101 // Device ID 35 | 36 | /********************************************************************************* 37 | ** End Of File 38 | *********************************************************************************/ 39 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/i2cslave.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __I2C_H 3 | #define __I2C_H 4 | 5 | extern volatile uint8_t i2c_cmd_rx; 6 | extern volatile uint8_t i2c_nack_rx; 7 | extern volatile uint8_t i2c_lpc_configure; //flag - configure fpga with lpc 8 | extern volatile uint8_t i2c_lpc_mode; 9 | extern volatile uint8_t i2c_passive_mode; 10 | 11 | 12 | #define I2C_RD_BUF_SIZE 8 13 | #define I2C_WR_BUF_SIZE 8 14 | 15 | 16 | //#define I2C_SLAVE_ADDR 0X70 //bits 7:1 are the 7 bit slave address. bit 0 is a control bit. 17 | #define I2C_SLAVE_ADDR 0X70 //7 BIT SLAVE ADDRESS 18 | 19 | 20 | #define FAST_MODE_PLUS 0 21 | 22 | #define I2CMASTER 0 23 | 24 | #define BUFSIZE 6 25 | #define MAX_TIMEOUT 0x00FFFFFF 26 | 27 | 28 | #define READ_WRITE 0x01 29 | 30 | #define RD_BIT 0x01 31 | 32 | #define I2C_IDLE 0 33 | #define I2C_STARTED 1 34 | #define I2C_RESTARTED 2 35 | #define I2C_REPEATED_START 3 36 | #define DATA_ACK 4 37 | #define DATA_NACK 5 38 | #define I2C_WR_STARTED 6 39 | #define I2C_RD_STARTED 7 40 | 41 | #define I2CONSET_I2EN 0x00000040 /* I2C Control Set Register */ 42 | #define I2CONSET_AA 0x00000004 43 | #define I2CONSET_SI 0x00000008 44 | #define I2CONSET_STO 0x00000010 45 | #define I2CONSET_STA 0x00000020 46 | 47 | #define I2CONCLR_AAC 0x00000004 /* I2C Control clear Register */ 48 | #define I2CONCLR_SIC 0x00000008 49 | #define I2CONCLR_STAC 0x00000020 50 | #define I2CONCLR_I2ENC 0x00000040 51 | 52 | #define I2DAT_I2C 0x00000000 /* I2C Data Reg */ 53 | #define I2ADR_I2C 0x00000000 /* I2C Slave Address Reg */ 54 | 55 | //IT SEEMS DUTY VALUES ARE ONLY USED IN MASTER MODE. ABLE SEND AND RECEIVE COMMANDS AT DIFFERENT RATE IN SLAVE MODE. 56 | #define I2SCLH_SCLH 0x00000180 /* I2C SCL Duty Cycle High Reg */ //VALUE FOR 92.2KHZ 57 | #define I2SCLL_SCLL 0x00000180 /* I2C SCL Duty Cycle Low Reg */ //VALUE FOR 92.2KHZ 58 | 59 | #define I2SCLH_HS_SCLH 0x00000020 /* Fast Plus I2C SCL Duty Cycle High Reg */ //VALUE FOR 92.2KHZ 60 | #define I2SCLL_HS_SCLL 0x00000020 /* Fast Plus I2C SCL Duty Cycle Low Reg */ //VALUE FOR 92.2KHZ 61 | 62 | 63 | extern void I2C_IRQHandler( void ); 64 | extern void I2CSlaveInit( void ); 65 | void Init_i2c_buf( void); 66 | void I2C_process_task( void); 67 | 68 | #endif /* end __I2C_H */ 69 | /**************************************************************************** 70 | ** End Of File 71 | *****************************************************************************/ 72 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/msccallback.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: MSCUSER.H 5 | * Purpose: Mass Storage Class Custom User Definitions 6 | * Version: V1.10 7 | *---------------------------------------------------------------------------- 8 | * This file is part of the uVision/ARM development tools. 9 | * This software may only be used under the terms of a valid, current, 10 | * end user licence from KEIL for a compatible version of KEIL software 11 | * development tools. Nothing else gives you the right to use it. 12 | * 13 | * Copyright (c) 2005-2007 Keil Software. 14 | *---------------------------------------------------------------------------*/ 15 | 16 | #ifndef __MSCUSER_H__ 17 | #define __MSCUSER_H__ 18 | 19 | extern const uint8_t InquiryStr[]; 20 | 21 | extern void MSC_MemoryRead (uint32_t offset, uint8_t dst[], uint32_t length); 22 | extern void MSC_MemoryWrite (uint32_t offset, uint8_t src[], uint32_t length); 23 | 24 | 25 | #endif /* __MSCUSER_H__ */ 26 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/mscuser.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: mscuser.h 5 | * Purpose: Mass Storage Class Custom User Definitions 6 | * Version: V1.20 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC microcontroller devices only. Nothing else 14 | * gives you the right to use this software. 15 | * 16 | * Copyright (c) 2009 Keil - An ARM Company. All rights reserved. 17 | *---------------------------------------------------------------------------*/ 18 | 19 | #ifndef __MSCUSER_H__ 20 | #define __MSCUSER_H__ 21 | 22 | 23 | /* Mass Storage Memory Layout */ 24 | #define MSC_MemorySize 6144 25 | #define MSC_BlockSize 512 26 | #define MSC_BlockCount (MSC_MemorySize / MSC_BlockSize) 27 | 28 | extern const uint8_t InquiryStr[]; 29 | 30 | extern void MSC_MemoryRead (uint32_t offset, uint8_t dst[], uint32_t length); 31 | extern void MSC_MemoryWrite (uint32_t offset, uint8_t src[], uint32_t length); 32 | 33 | 34 | #endif /* __MSCUSER_H__ */ 35 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/rom_drivers.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rom_drivers.h: Header file for NXP LPC13xx Family Microprocessors 3 | * 4 | * Copyright(C) 2009, NXP Semiconductor 5 | * All rights reserved. 6 | * 7 | * History 8 | * 2009.09.17 ver 1.00 Preliminary version, first Release 9 | * 10 | ******************************************************************************/ 11 | #ifndef ROM_DRIVERS_H_ 12 | #define ROM_DRIVERS_H_ 13 | 14 | #include "type.h" 15 | 16 | typedef struct _USB_DEVICE_INFO { 17 | uint16_t DevType; 18 | uint32_t DevDetailPtr; 19 | } USB_DEV_INFO; 20 | 21 | typedef struct _USBD { 22 | void (*init_clk_pins)(void); 23 | void (*isr)(void); 24 | void (*init)( USB_DEV_INFO * DevInfoPtr ); 25 | void (*connect)(uint32_t con); 26 | } USBD; 27 | 28 | #define init_msdstate() *((uint32_t *)(0x10000054)) = 0x0 29 | 30 | typedef struct _ROM { 31 | const USBD * pUSBD; 32 | } ROM; 33 | 34 | typedef struct _MSC_DEVICE_INFO { 35 | uint16_t idVendor; 36 | uint16_t idProduct; 37 | uint16_t bcdDevice; 38 | uint32_t StrDescPtr; 39 | uint32_t MSCInquiryStr; 40 | uint32_t BlockCount; 41 | uint32_t BlockSize; 42 | uint32_t MemorySize; 43 | void (*MSC_Write)( uint32_t offset, uint8_t src[], uint32_t length); 44 | void (*MSC_Read)( uint32_t offset, uint8_t dst[], uint32_t length); 45 | } MSC_DEVICE_INFO; 46 | 47 | typedef struct _HID_DEVICE_INFO { 48 | uint16_t idVendor; 49 | uint16_t idProduct; 50 | uint16_t bcdDevice; 51 | uint32_t StrDescPtr; 52 | uint8_t InReportCount; 53 | uint8_t OutReportCount; 54 | uint8_t SampleInterval; 55 | void (*InReport)( uint8_t src[], uint32_t length); 56 | void (*OutReport)(uint8_t dst[], uint32_t length); 57 | } HID_DEVICE_INFO; 58 | 59 | #endif /*ROM_DRIVERS_H_*/ 60 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/type.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * type.h: Type definition Header file for NXP Family 3 | * Microprocessors 4 | * 5 | * Copyright(C) 2006, NXP Semiconductor 6 | * All rights reserved. 7 | * 8 | * History 9 | * 2009.04.01 ver 1.00 Preliminary version, first Release 10 | * 11 | ******************************************************************************/ 12 | #ifndef __TYPE_H__ 13 | #define __TYPE_H__ 14 | 15 | #include "compiler.h" 16 | 17 | #if !defined(__KEIL__) 18 | #include 19 | #else 20 | /* exact-width signed integer types */ 21 | typedef signed char int8_t; 22 | typedef signed short int int16_t; 23 | typedef signed int int32_t; 24 | typedef signed __int64 int64_t; 25 | 26 | /* exact-width unsigned integer types */ 27 | typedef unsigned char uint8_t; 28 | typedef unsigned short int uint16_t; 29 | typedef unsigned int uint32_t; 30 | typedef unsigned __int64 uint64_t; 31 | #endif 32 | 33 | #ifndef NULL 34 | #define NULL ((void *)0) 35 | #endif 36 | 37 | #ifndef FALSE 38 | #define FALSE (0) 39 | #endif 40 | 41 | #ifndef TRUE 42 | #define TRUE (1) 43 | #endif 44 | 45 | #endif /* __TYPE_H__ */ 46 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/inc/usbdesc.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: usbdesc.h 5 | * Purpose: USB Descriptors Definitions 6 | * Version: V1.20 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC microcontroller devices only. Nothing else 14 | * gives you the right to use this software. 15 | * 16 | * Copyright (c) 2009 Keil - An ARM Company. All rights reserved. 17 | *---------------------------------------------------------------------------*/ 18 | 19 | #ifndef __USBDESC_H__ 20 | #define __USBDESC_H__ 21 | 22 | 23 | #define WBVAL(x) ((x) & 0xFF),(((x) >> 8) & 0xFF) 24 | 25 | #define USB_DEVICE_DESC_SIZE (sizeof(USB_DEVICE_DESCRIPTOR)) 26 | #define USB_CONFIGUARTION_DESC_SIZE (sizeof(USB_CONFIGURATION_DESCRIPTOR)) 27 | #define USB_INTERFACE_DESC_SIZE (sizeof(USB_INTERFACE_DESCRIPTOR)) 28 | #define USB_ENDPOINT_DESC_SIZE (sizeof(USB_ENDPOINT_DESCRIPTOR)) 29 | 30 | #define HID_DESC_OFFSET 0x0012 31 | #define HID_DESC_SIZE (sizeof(HID_DESCRIPTOR)) 32 | #define HID_REPORT_DESC_SIZE (sizeof(HID_ReportDescriptor)) 33 | 34 | extern const uint8_t USB_DeviceDescriptor[]; 35 | extern const uint8_t USB_ConfigDescriptor[]; 36 | extern const uint8_t USB_StringDescriptor[]; 37 | 38 | extern const uint8_t HID_ReportDescriptor[]; 39 | extern const uint16_t HID_ReportDescSize; 40 | 41 | 42 | #endif /* __USBDESC_H__ */ 43 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/ld/usb_buffer.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * GENERATED FILE - DO NOT EDIT 3 | * (C) Code Red Technologies Ltd, 2008-9 4 | * Generated C linker script file for LPC1343 5 | * (created from nxp_lpc13_c.ld (v3.0.6 (200911181345)) on Fri Nov 20 17:14:35 PST 2009) 6 | */ 7 | 8 | INCLUDE "../ld/usb_buffer_lib.ld" 9 | INCLUDE "../ld/usb_buffer_mem.ld" 10 | 11 | ENTRY(ResetISR) 12 | 13 | SECTIONS 14 | { 15 | .text : 16 | { 17 | KEEP(*(.isr_vector)) 18 | *(.text*) 19 | *(.rodata*) 20 | 21 | } > MFlash32 22 | 23 | 24 | /* for exception handling/unwind - some Newlib functions (in common with C++ and STDC++) use this. */ 25 | 26 | .ARM.extab : 27 | { 28 | *(.ARM.extab* .gnu.linkonce.armextab.*) 29 | } > MFlash32 30 | 31 | __exidx_start = .; 32 | .ARM.exidx : 33 | { 34 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) 35 | } > MFlash32 36 | __exidx_end = .; 37 | 38 | _etext = .; 39 | 40 | .data : AT (__exidx_end) 41 | { 42 | _data = .; 43 | *(vtable) 44 | *(.data*) 45 | _edata = .; 46 | } > RamLoc8 47 | 48 | /* zero initialized data */ 49 | .bss : 50 | { 51 | _bss = .; 52 | *(.bss*) 53 | *(COMMON) 54 | _ebss = .; 55 | } > RamLoc8 56 | 57 | /* Where we put the heap with cr_clib */ 58 | .cr_heap : 59 | { 60 | end = .; 61 | _pvHeapStart = .; 62 | } > RamLoc8 63 | 64 | /* 65 | Note: (ref: M0000066) 66 | Moving the stack down by 16 is to work around a GDB bug. 67 | This space can be reclaimed for Production Builds. 68 | */ 69 | _vRamTop = __top_RamLoc8 ; 70 | _vStackTop = _vRamTop - 16; 71 | } 72 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/ld/usb_buffer_lib.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * GENERATED FILE - DO NOT EDIT 3 | * (C) Code Red Technologies Ltd, 2008-9 4 | * Generated linker script library include file for Redlib (semihost) 5 | * (created from redlib_semihost_c.ld (v3.0.6 (200911181345)) on Fri Nov 20 17:14:35 PST 2009) 6 | */ 7 | 8 | GROUP(libcr_c.a libcr_semihost.a libcr_eabihelpers.a) 9 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/ld/usb_buffer_mem.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * GENERATED FILE - DO NOT EDIT 3 | * (C) Code Red Technologies Ltd, 2008-9 4 | * Generated linker script include file for 5 | * (created from LinkMemoryTemplate (v3.0.6 (200911181345)) on Fri Nov 20 17:14:35 PST 2009) 6 | */ 7 | 8 | MEMORY 9 | { 10 | /* Define each memory region */ 11 | MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32k */ 12 | RamLoc8 (rwx) : ORIGIN = 0x10000180, LENGTH = 0x1E80 /* 8k */ 13 | 14 | } 15 | /* Define a symbol for the top of each memory region */ 16 | __top_MFlash32 = 0x0 + 0x8000; 17 | __top_RamLoc8 = 0x10000000 + 0x2000; 18 | 19 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/src/ButtonDetect.c: -------------------------------------------------------------------------------- 1 | #include "System.h" 2 | #include "DataTypes.h" 3 | #include "ButtonDetect.h" 4 | 5 | //#include "System.h" 6 | 7 | #define BTN_DEBOUNCE_TIME 3 //incrments of 10ms 8 | 9 | 10 | #define DEBOUNCE_STATE_WAIT_FOR_PRESS 0 11 | #define DEBOUNCE_WAIT_FOR_STABLE_ON 1 12 | #define DEBOUNCE_WAIT_FOR_RELEASE 2 13 | #define DEBOUNCE_WAIT_FOR_STABLE_OFF 3 14 | 15 | 16 | volatile ButtonDetect Btn0; //push button 0 debounce structure 17 | 18 | //extern ButtonDetect Button_SW2; 19 | //Always used these function to check button states. THe preopely check the structure 20 | //and reset flags. 21 | 22 | 23 | /********************************************************************************************** 24 | * Process all the pushbutton in one call. 25 | ***********************************************************************************************/ 26 | void ButtonProcessAll( void){ 27 | 28 | ButtonProcess( &Btn0, !PB_STATE); //1 = active btn push ; 0 = idle 29 | 30 | } 31 | 32 | 33 | //SETUP ALL THE BUTTON DETECT STRUCTURES 34 | void InitButtonDetectAll( void) 35 | { 36 | 37 | InitButtonDetect(&Btn0, BTN_DEBOUNCE_TIME); 38 | 39 | } 40 | 41 | /********************************************************************************************** 42 | * Process all the pushbutton in one call. 43 | ***********************************************************************************************/ 44 | void InitButtonDetect(ButtonDetect *BD,BYTE DebounceTime) 45 | { 46 | BD->ButtonPressed = FALSE; 47 | BD->ButtonReleased = FALSE; 48 | BD->DebounceTime = DebounceTime; 49 | BD->DetectState = DEBOUNCE_STATE_WAIT_FOR_PRESS; 50 | BD->Ticker = 0; 51 | } 52 | 53 | 54 | 55 | 56 | //Returns True is there was a press event, false if not. 57 | BOOL ButtonPressed(ButtonDetect *BD) 58 | { 59 | if(BD->ButtonPressed) 60 | { 61 | BD->ButtonPressed=FALSE; 62 | return TRUE; 63 | } 64 | else 65 | { 66 | return FALSE; 67 | } 68 | } 69 | 70 | //Returns zero if a released event has not occured yet. If greater than zero a release event 71 | //has occurred and the value is the button hold time in 10mSec Increments 72 | BOOL ButtonReleased(ButtonDetect *BD) 73 | { 74 | WORD RetVal; 75 | 76 | if(BD->ButtonReleased>0 && (BD->DetectState==DEBOUNCE_STATE_WAIT_FOR_PRESS)) 77 | { 78 | RetVal = BD->ButtonReleased; 79 | BD->ButtonReleased = 0; 80 | } 81 | else 82 | { 83 | RetVal = 0; 84 | } 85 | 86 | return RetVal; 87 | } 88 | 89 | 90 | 91 | //This Process must be called every 10mSec for each button detect 92 | //The input is high active logic. i.e. Input should be !!!THE LOGIC OF THE BUTON PRESS - YES 93 | //a value greater than 0 if true, 0 if false; 94 | void ButtonProcess(ButtonDetect * BD, BOOL Input) 95 | { 96 | switch(BD->DetectState) 97 | { 98 | default: 99 | case DEBOUNCE_STATE_WAIT_FOR_PRESS: 100 | if(Input>0 ) 101 | { 102 | BD->DetectState=DEBOUNCE_WAIT_FOR_STABLE_ON; 103 | BD->Ticker =0 ; 104 | } 105 | break; 106 | 107 | case DEBOUNCE_WAIT_FOR_STABLE_ON: 108 | if(Input>0) 109 | { 110 | if(BD->Ticker++>=BD->DebounceTime) 111 | { 112 | BD->Ticker=0; 113 | BD->DetectState=DEBOUNCE_WAIT_FOR_RELEASE; 114 | BD->ButtonPressed = TRUE; 115 | } 116 | } 117 | else 118 | { 119 | BD->DetectState=DEBOUNCE_STATE_WAIT_FOR_PRESS; 120 | } 121 | break; 122 | 123 | case DEBOUNCE_WAIT_FOR_RELEASE: 124 | if(Input>0) 125 | { 126 | if(BD->Ticker<0xFFFF) 127 | BD->Ticker++; 128 | } 129 | else 130 | { 131 | BD->DetectState=DEBOUNCE_WAIT_FOR_STABLE_OFF; 132 | BD->ButtonReleased = BD->Ticker; 133 | BD->Ticker = 0; 134 | } 135 | 136 | 137 | break; 138 | 139 | case DEBOUNCE_WAIT_FOR_STABLE_OFF: 140 | if(Input == 0) 141 | { 142 | BD->Ticker++; 143 | if(BD->Ticker >= BD->DebounceTime) 144 | { 145 | BD->DetectState=DEBOUNCE_STATE_WAIT_FOR_PRESS; 146 | } 147 | } 148 | break; 149 | } 150 | } 151 | 152 | 153 | //debug code: 154 | /* 155 | if(ButtonPressed(&Btn0)){ 156 | LED0_ON; 157 | } 158 | if(ButtonReleased(&Btn0)){ 159 | LED0_OFF; 160 | } 161 | */ 162 | 163 | 164 | 165 | 166 | //EOF 167 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/src/FPGA_Config.c: -------------------------------------------------------------------------------- 1 | #include "System.h" 2 | 3 | //PROTOTYPES 4 | void FPGA_BlastConfigBytes(BYTE *Data,WORD Count); 5 | 6 | //LOCAL VARIABLES 7 | static uint8_t ConfigBuf[256]; //data read from the config file 8 | 9 | /*********************************************************************************** 10 | * DESCRIPTION: send the start config sequence to the FPGA 11 | **********************************************************************************/ 12 | int8_t InitFPGA_Config( void){ 13 | uint32_t i = 0; 14 | 15 | //send the FPGA config initialization sequence 16 | CFG_PROG_B_INACTIVE; //make sure the progb is in inactive state 17 | //We need to make these speed indepedent some day..... 18 | for(i=0;i<10000;i++); //10000/fcy = 48mHZ = 200uS 19 | CFG_PROG_B_ACTIVE; //First Bring the PROG_B low 20 | for(i=0;i<20000;i++); //delay @48Mhz = 400uS 21 | CFG_PROG_B_INACTIVE; //Bring high 22 | 23 | i = 0; 24 | while(CFG_INIT_B_STATE == 0) //wait for INIT_B TO go high 25 | { 26 | i++; 27 | if(i>800000) 28 | { 29 | SetLED_BlinkRate(1000); //set blink rate to fail! 30 | return CONFIG_ERROR_INIT_NOT_HIGH; 31 | } 32 | } 33 | return (CONFIG_OK); 34 | 35 | } 36 | 37 | /*********************************************************************************** 38 | * DESCRIPTION: loads the FPGA with bitfile data 39 | * 40 | **********************************************************************************/ 41 | int8_t FPGA_Config(char * Filename) 42 | { 43 | uint32_t i; 44 | FRESULT FS_Error; 45 | FIL MyFile; 46 | uint32_t BytesRead; 47 | uint8_t Junk = 0; 48 | uint32_t BytesSent = 0; 49 | int8_t status; 50 | 51 | FS_Error = f_open(&MyFile,Filename,FA_READ); //open "config.bit" 52 | 53 | if(FS_Error != FR_OK) //check for error 54 | { 55 | return CONFIG_ERROR_FILE_NOT_FOUND; //could not find the file 56 | } 57 | 58 | SetLED_BlinkRate(25); //set the blink speed - shows status of loading process 59 | 60 | //SEND FPGA CONFIG SETUP COMMAND 61 | status = InitFPGA_Config(); 62 | if(status<0){ 63 | return(status); 64 | } 65 | 66 | //Read and blast until there is nothing left in the file 67 | BytesSent = 0; 68 | do 69 | { 70 | f_read(&MyFile,&ConfigBuf[0],256, &BytesRead); //read 256 bytes in the file * f_read writes the number of bytes read to &BytesRead. Will be less than 256 when done? 71 | FPGA_BlastConfigBytes(&ConfigBuf[0],BytesRead); 72 | BytesSent+=BytesRead; 73 | }while(BytesRead==256); 74 | 75 | f_close(&MyFile); 76 | 77 | for(i=0;i<255;i++) 78 | { 79 | //Keep Sending CCLKs until done goes high 80 | FPGA_BlastConfigBytes(&Junk,1); 81 | if(CFG_DONE_STATE > 0) 82 | { 83 | //Per Configuration Guide, send some extra clocks after config is Done 84 | FPGA_BlastConfigBytes(&Junk,1); 85 | FPGA_BlastConfigBytes(&Junk,1); 86 | FPGA_BlastConfigBytes(&Junk,1); 87 | FPGA_BlastConfigBytes(&Junk,1); 88 | SetLED_BlinkRate(LED_ALWAYS_ON); 89 | return CONFIG_OK; 90 | } 91 | } 92 | 93 | SetLED_BlinkRate(500); 94 | return CONFIG_ERROR_DONE_NOT_HIGH; 95 | } 96 | 97 | /************************************************************************************** 98 | * DESCRIPTION: Bitbang the bitstream data onto the GPIO 99 | * - send n bytes of data 100 | * - individually clocks each bit of data 101 | **************************************************************************************/ 102 | void FPGA_BlastConfigBytes(BYTE *Data,WORD Count) 103 | { 104 | WORD i,j; 105 | BYTE DataOut; 106 | uint8_t Mask; 107 | 108 | 109 | CFG_DIN_INACTIVE; 110 | CFG_CCLK_INACTIVE; 111 | 112 | for(i=0;i0) 120 | CFG_DIN_ACTIVE; 121 | else 122 | CFG_DIN_INACTIVE; 123 | 124 | CFG_CCLK_ACTIVE; 125 | CFG_CCLK_INACTIVE; 126 | 127 | Mask = Mask >> 1; 128 | } 129 | } 130 | } 131 | 132 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/src/chan fat fs/diskio.c: -------------------------------------------------------------------------------- 1 | /*-----------------------------------------------------------------------*/ 2 | /* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */ 3 | /*-----------------------------------------------------------------------*/ 4 | /* This is a stub disk I/O module that acts as front end of the existing */ 5 | /* disk I/O modules and attach it to FatFs module with common interface. */ 6 | /*-----------------------------------------------------------------------*/ 7 | 8 | #include "diskio.h" 9 | #include "FLASH.h" 10 | 11 | 12 | 13 | 14 | //****************************************************************************************************************** 15 | // Sector Access functions for CHAN FatFs 16 | //****************************************************************************************************************** 17 | 18 | DRESULT disk_ioctl ( 19 | BYTE drv, /* Physical drive nmuber (0..) */ 20 | BYTE ctrl, /* Control code */ 21 | void *buff /* Buffer to send/receive control data */ 22 | ) 23 | { 24 | DRESULT res; 25 | 26 | switch(ctrl) 27 | { 28 | case CTRL_SYNC: 29 | res = RES_OK; 30 | break; 31 | 32 | case GET_SECTOR_SIZE: 33 | res = RES_OK; 34 | *(WORD *)buff = 512; 35 | break; 36 | 37 | case GET_SECTOR_COUNT: 38 | res = RES_OK; 39 | *(DWORD *)buff = (WORD)4096; 40 | break; 41 | 42 | case GET_BLOCK_SIZE: 43 | res = RES_OK; 44 | *(DWORD *)buff = 1; 45 | break; 46 | 47 | default: 48 | res = RES_OK; 49 | break; 50 | } 51 | return res; 52 | } 53 | 54 | DSTATUS disk_initialize(BYTE Drive) { 55 | 56 | return 0; 57 | } 58 | 59 | DRESULT disk_write(BYTE Drive,const BYTE * Buffer, DWORD SectorNumber, BYTE SectorCount) 60 | { 61 | BYTE i; 62 | 63 | for(i=0;i= 1024)) */ 53 | #define GET_BLOCK_SIZE 3 /* Get erase block size (for only f_mkfs()) */ 54 | #define CTRL_ERASE_SECTOR 4 /* Force erased a block of sectors (for only _USE_ERASE) */ 55 | 56 | /* Generic command */ 57 | #define CTRL_POWER 5 /* Get/Set power status */ 58 | #define CTRL_LOCK 6 /* Lock/Unlock media removal */ 59 | #define CTRL_EJECT 7 /* Eject media */ 60 | 61 | /* MMC/SDC specific ioctl command */ 62 | #define MMC_GET_TYPE 10 /* Get card type */ 63 | #define MMC_GET_CSD 11 /* Get CSD */ 64 | #define MMC_GET_CID 12 /* Get CID */ 65 | #define MMC_GET_OCR 13 /* Get OCR */ 66 | #define MMC_GET_SDSTAT 14 /* Get SD status */ 67 | 68 | /* ATA/CF specific ioctl command */ 69 | #define ATA_GET_REV 20 /* Get F/W revision */ 70 | #define ATA_GET_MODEL 21 /* Get model name */ 71 | #define ATA_GET_SN 22 /* Get serial number */ 72 | 73 | /* NAND specific ioctl command */ 74 | #define NAND_FORMAT 30 /* Create physical format */ 75 | 76 | 77 | #define _DISKIO 78 | #endif 79 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/src/chan fat fs/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _INTEGER 6 | #define _INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* These types must be 16-bit, 32-bit or larger integer */ 16 | typedef int INT; 17 | typedef unsigned int UINT; 18 | 19 | /* These types must be 8-bit integer */ 20 | typedef char CHAR; 21 | typedef unsigned char UCHAR; 22 | typedef unsigned char BYTE; 23 | 24 | /* These types must be 16-bit integer */ 25 | typedef short SHORT; 26 | typedef unsigned short USHORT; 27 | typedef unsigned short WORD; 28 | typedef unsigned short WCHAR; 29 | 30 | /* These types must be 32-bit integer */ 31 | typedef long LONG; 32 | typedef unsigned long ULONG; 33 | typedef unsigned long DWORD; 34 | 35 | #ifndef TRUE 36 | #define TRUE 1 37 | #endif 38 | 39 | #ifndef FALSE 40 | #define FALSE 0 41 | #endif 42 | 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/src/msccallback.c: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: mscuser.c 5 | * Purpose: Mass Storage Class Custom User Module 6 | * Version: V1.20 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC microcontroller devices only. Nothing else 14 | * gives you the right to use this software. 15 | * 16 | * Copyright (c) 2009 Keil - An ARM Company. All rights reserved. 17 | *---------------------------------------------------------------------------*/ 18 | #include "LPC13xx.h" 19 | #include "type.h" 20 | #include "usb.h" 21 | #include "msccallback.h" 22 | #include "Flash.h" 23 | 24 | BYTE FlashBuffer[512] = {0}; 25 | 26 | const uint8_t InquiryStr[26] = "MP25PE16 "; 27 | 28 | void MSC_MemoryRead (uint32_t offset, uint8_t dst[], uint32_t length) { 29 | uint32_t n; 30 | 31 | 32 | MP25PE_Read(offset,length, &FlashBuffer[0]); 33 | 34 | for(n=0;n 20 | 21 | #include "usb.h" 22 | #include "usbdesc.h" 23 | 24 | /* USB String Descriptor (optional) */ 25 | const uint8_t USB_StringDescriptor[] = { 26 | /* Index 0x00: LANGID Codes */ 27 | 0x04, /* bLength */ 28 | USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */ 29 | WBVAL(0x0409), /* US English */ /* wLANGID */ 30 | /* Index 0x04: Manufacturer */ 31 | 0x1C, /* bLength */ 32 | USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */ 33 | 'W',0, 34 | 'A',0, 35 | 'V',0, 36 | 'E ',0, 37 | 'N',0, 38 | 'U',0, 39 | 'M',0, 40 | 'B',0, 41 | 'E',0, 42 | 'R',0, 43 | ' ',0, 44 | ' ',0, 45 | ' ',0, 46 | /* Index 0x20: Product */ 47 | 0x28, /* bLength */ 48 | USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */ 49 | 'M',0, 50 | 'A',0, 51 | 'R',0, 52 | 'K',0, 53 | ' ',0, 54 | '1',0, 55 | ' ',0, 56 | ' ',0, 57 | ' ',0, 58 | ' ',0, 59 | ' ',0, 60 | ' ',0, 61 | ' ',0, 62 | ' ',0, 63 | ' ',0, 64 | ' ',0, 65 | ' ',0, 66 | ' ',0, 67 | ' ',0, 68 | /* Index 0x48: Serial Number */ 69 | 0x1A, /* bLength */ 70 | USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */ 71 | 'D',0, 72 | 'R',0, 73 | 'A',0, 74 | 'G',0, 75 | '-',0, 76 | 'D',0, 77 | 'R',0, 78 | 'O',0, 79 | 'P',0, 80 | ' ',0, 81 | ' ',0, 82 | ' ',0, 83 | /* Index 0x62: Interface 0, Alternate Setting 0 */ 84 | 0x0E, /* bLength */ 85 | USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */ 86 | 'F',0, 87 | 'P',0, 88 | 'G',0, 89 | 'A',0, 90 | ' ',0, 91 | ' ',0, 92 | }; 93 | -------------------------------------------------------------------------------- /old/mark1/Mark1_DragDrop_Config/Mark1_DragDrop_Config/src/usbmemrom_main.c.bak: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * Name: memory.c 3 | * Purpose: USB Memory Storage Demo 4 | * Version: V1.20 5 | *---------------------------------------------------------------------------- 6 | * This software is supplied "AS IS" without any warranties, express, 7 | * implied or statutory, including but not limited to the implied 8 | * warranties of fitness for purpose, satisfactory quality and 9 | * noninfringement. Keil extends you a royalty-free right to reproduce 10 | * and distribute executable files created using this software for use 11 | * on NXP Semiconductors LPC microcontroller devices only. Nothing else 12 | * gives you the right to use this software. 13 | * 14 | * Copyright (c) 2009 Keil - An ARM Company. All rights reserved. 15 | *---------------------------------------------------------------------------*/ 16 | 17 | #include "LPC13xx.h" 18 | #include "usb.h" 19 | #include "usbdesc.h" 20 | #include "type.h" 21 | #include "msccallback.h" 22 | #include "FLASH.h" 23 | #include "rom_drivers.h" 24 | #include "config.h" 25 | #include "ff.h" 26 | 27 | USB_DEV_INFO DeviceInfo; 28 | MSC_DEVICE_INFO MscDevInfo; 29 | ROM ** rom = (ROM **)0x1fff1ff8; 30 | 31 | #define EN_TIMER32_1 (1<<10) 32 | #define EN_IOCON (1<<16) 33 | #define EN_USBREG (1<<14) 34 | 35 | /* Main Program */ 36 | 37 | FATFS MyFileSystem; 38 | FIL MyFile; 39 | 40 | int main (void) { 41 | volatile uint32_t n; 42 | 43 | unsigned int BR = 0; 44 | unsigned char Data[256]; 45 | 46 | 47 | // Code Red Red Suite and LPCXpresso by Code Red both call SystemInit() in 48 | // the C startup code 49 | #ifndef __CODERED__ 50 | SystemInit(); 51 | #endif 52 | 53 | 54 | InitFLASH(); 55 | 56 | 57 | f_mount(0,&MyFileSystem); 58 | //Open the file for open and write 59 | f_open(&MyFile,"Test.txt",FA_READ); 60 | //Write some junk 61 | f_read(&MyFile,Data,256,&BR); 62 | //Close the file 63 | f_close(&MyFile); 64 | 65 | 66 | MscDevInfo.idVendor = USB_VENDOR_ID; 67 | MscDevInfo.idProduct = USB_PROD_ID; 68 | MscDevInfo.bcdDevice = USB_DEVICE; 69 | MscDevInfo.StrDescPtr = (uint32_t)&USB_StringDescriptor[0]; 70 | MscDevInfo.MSCInquiryStr = (uint32_t)&InquiryStr[0]; 71 | MscDevInfo.BlockSize =512; 72 | MscDevInfo.BlockCount = 4096; 73 | MscDevInfo.MemorySize = 2097152; 74 | MscDevInfo.MSC_Read = MSC_MemoryRead; 75 | MscDevInfo.MSC_Write = MSC_MemoryWrite; 76 | 77 | DeviceInfo.DevType = USB_DEVICE_CLASS_STORAGE; 78 | DeviceInfo.DevDetailPtr = (uint32_t)&MscDevInfo; 79 | 80 | /* Enable Timer32_1, IOCON, and USBREG blocks */ 81 | LPC_SYSCON->SYSAHBCLKCTRL |= (EN_TIMER32_1 | EN_IOCON | EN_USBREG); 82 | 83 | (*rom)->pUSBD->init_clk_pins(); /* Use pll and pin init function in rom */ 84 | 85 | /* insert a delay between clk init and usb init */ 86 | for (n = 0; n < 75; n++) { 87 | } 88 | 89 | (*rom)->pUSBD->init(&DeviceInfo); /* USB Initialization */ 90 | init_msdstate(); /* Initialize Storage state machine */ 91 | (*rom)->pUSBD->connect(TRUE); /* USB Connect */ 92 | 93 | while (1) 94 | __WFI(); /* Loop forever */ 95 | } 96 | 97 | #if defined(__IAR_SYSTEMS_ICC__) 98 | void USBIRQ_IRQHandler(void) 99 | #else 100 | void USB_IRQHandler(void) 101 | #endif 102 | { 103 | (*rom)->pUSBD->isr(); 104 | } 105 | -------------------------------------------------------------------------------- /old/rpi_old/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # rpi_loader 3 | # 4 | # Created by Ting Cao on 3/24/13. 5 | # Copyright (c) 2013 Ting Cao. All rights reserved. 6 | # 7 | #DEBUG=1 8 | DEBUG=0 9 | 10 | ifeq ($(DEBUG),1) 11 | DEBFLAGS = -ggdb -O0 12 | else 13 | DEBFLAGS = -O3 14 | endif 15 | 16 | CC = gcc 17 | INCLUDE = -I/usr/local/include -I./ 18 | CFLAGS = $(DEBFLAGS) -Wall $(INCLUDE) -pipe -fsigned-char 19 | 20 | CROSS_COMPILE ?= 21 | ARCH ?= 22 | 23 | CC = $(CROSS_COMPILE)gcc 24 | CC_COMPILE = $(CC) -c $(OPTFLAGS) $(CFLAGS) $(CC_FLAGS) $(CC_SYSCFLAGS) 25 | CC_LINK = $(CC) $(LDFLAGS) $(CC_LDFLAGS) $(CC_SYSLDFLAGS) 26 | CC_CFLAGS = 27 | CC_LDFLAGS = 28 | 29 | CC_SYSCFLAGS = 30 | CC_SYSLDFLAGS = 31 | CC_SYSLIBS = 32 | 33 | CXX = $(CROSS_COMPILE)g++ 34 | CXX_COMPILE = $(CXX) -c $(OPTFLAGS) $(CFLAGS) $(CXX_FLAGS) $(CXX_SYSCFLAGS) 35 | CXX_LINK = $(CXX) $(LDFLAGS) $(CXX_LDFLAGS) $(CXX_SYSLDFLAGS) 36 | CXX_CFLAGS = 37 | CXX_LDFLAGS = 38 | CXX_FORCE = 39 | CXX_SYSCFLAGS = 40 | CXX_SYSLDFLAGS = 41 | CXX_SYSLIBS = 42 | 43 | .cxx.o: ; $(CXX_COMPILE) $< 44 | .cpp.o: ; $(CXX_COMPILE) $< 45 | .cc.o: ; $(CXX_COMPILE) $< 46 | 47 | .cxx: 48 | $(CXX_COMPILE) $< 49 | $(CXX_LINK) -o $@ $*.o $(LIBRARIES) 50 | .cpp: 51 | $(CXX_COMPILE) $< 52 | $(CXX_LINK) -o $@ $*.o $(LIBRARIES) 53 | .cc: 54 | $(CXX_COMPILE) $< 55 | $(CXX_LINK) -o $@ $*.o $(LIBRARIES) 56 | 57 | # Compile plain C code 58 | .c.o: ; $(CC_COMPILE) $< 59 | .c: 60 | $(CC_COMPILE) $< 61 | $(CC_LINK) -o $@ $*.o $(LIBRARIES) 62 | 63 | TARGET_RPI_LOADER = logi_loader 64 | 65 | TARGET = $(TARGET_RPI_LOADER) 66 | 67 | LD = $(CROSS_COMPILE)g++ 68 | 69 | OBJ_RPI_LOADER = rpi_loader.o smbus.o 70 | 71 | all : $(TARGET) 72 | 73 | $(TARGET_RPI_LOADER) : $(OBJ_RPI_LOADER) 74 | $(LD) $(LFLAGS) -o $@ $(OBJ_RPI_LOADER) $(ADDITIONAL_LIBS) 75 | 76 | install: $(TARGET_RPI_LOADER) 77 | install $(TARGET_RPI_LOADER) /usr/bin 78 | 79 | clean : 80 | rm -f *~ *.o *.a *.so $(OBJ_RPI_LOADER) $(TARGET_RPI_LOADER) 81 | 82 | -------------------------------------------------------------------------------- /old/rpi_old/rpi_loader: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/rpi_old/rpi_loader -------------------------------------------------------------------------------- /old/rpi_old/rpi_loader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/rpi_old/rpi_loader.o -------------------------------------------------------------------------------- /old/rpi_old/smbus.h: -------------------------------------------------------------------------------- 1 | //http://www.lm-sensors.org/browser/i2c-tools/trunk/include/i2c/smbus.h 2 | //http://www.lm-sensors.org/export/6127/i2c-tools/trunk/include/i2c/smbus.h 3 | //http://www.john.geek.nz/2012/12/update-reading-data-from-a-bosch-bmp085-with-a-raspberry-pi/ 4 | /* 5 | smbus.h - SMBus level access helper functions 6 | 7 | Copyright (C) 1995-97 Simon G. Vogl 8 | Copyright (C) 1998-99 Frodo Looijaard 9 | 10 | This program is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation; either version 2 of the License, or 13 | (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with this program; if not, write to the Free Software 22 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 | MA 02110-1301 USA. 24 | */ 25 | 26 | #ifndef LIB_I2C_SMBUS_H 27 | #define LIB_I2C_SMBUS_H 28 | 29 | #include 30 | #include 31 | 32 | extern __s32 i2c_smbus_access(int file, char read_write, __u8 command, 33 | int size, union i2c_smbus_data *data); 34 | 35 | extern __s32 i2c_smbus_write_quick(int file, __u8 value); 36 | extern __s32 i2c_smbus_read_byte(int file); 37 | extern __s32 i2c_smbus_write_byte(int file, __u8 value); 38 | extern __s32 i2c_smbus_read_byte_data(int file, __u8 command); 39 | extern __s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value); 40 | extern __s32 i2c_smbus_read_word_data(int file, __u8 command); 41 | extern __s32 i2c_smbus_write_word_data(int file, __u8 command, __u16 value); 42 | extern __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value); 43 | 44 | /* Returns the number of read bytes */ 45 | extern __s32 i2c_smbus_read_block_data(int file, __u8 command, __u8 *values); 46 | extern __s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length, 47 | const __u8 *values); 48 | 49 | /* Returns the number of read bytes */ 50 | /* Until kernel 2.6.22, the length is hardcoded to 32 bytes. If you 51 | ask for less than 32 bytes, your code will only work with kernels 52 | 2.6.23 and later. */ 53 | extern __s32 i2c_smbus_read_i2c_block_data(int file, __u8 command, __u8 length, 54 | __u8 *values); 55 | extern __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command, __u8 length, 56 | const __u8 *values); 57 | 58 | /* Returns the number of read bytes */ 59 | extern __s32 i2c_smbus_block_process_call(int file, __u8 command, __u8 length, 60 | __u8 *values); 61 | 62 | #endif /* LIB_I2C_SMBUS_H */ 63 | -------------------------------------------------------------------------------- /old/rpi_old/smbus.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpga-logi/logi-tools/607cf6d5a1abe978fbf95526f7f526220fc34915/old/rpi_old/smbus.o -------------------------------------------------------------------------------- /python/logi_hal.py: -------------------------------------------------------------------------------- 1 | import fcntl, os, time, struct, binascii, math 2 | import logi 3 | 4 | 5 | 6 | def setServoPulse(address, index, pos): 7 | logi.logiWrite(address+(index * 2), ((pos & 0x00FF), ((pos >> 8) & 0x00FF))); 8 | 9 | def setServoFailSafePulse(address, index, pos): 10 | logi.logiWrite(address+((index * 2) + 1), ((pos & 0x00FF), ((pos >> 8) & 0x00FF))); 11 | 12 | def setServoFailSafeAngle(address, index, angle, max_pulse=255.0, min_angle=-45.0, max_angle=45.0): 13 | quanta = max_pulse/(max_angle-min_angle) 14 | pulse = (max_pulse/2) + (quanta * angle) 15 | pulse = max(min(int(round(pulse)), 255), 0) 16 | logi.logiWrite(address+((index * 2) + 1), ((pulse & 0x00FF), ((pulse >> 8) & 0x00FF))); 17 | 18 | def setServoAngle(address, index, angle, max_pulse=255.0, min_angle=-45.0, max_angle=45.0): 19 | quanta = max_pulse/(max_angle-min_angle) 20 | pulse = (max_pulse/2) + (quanta * angle) 21 | pulse = max(min(int(round(pulse)), 255), 0) 22 | setServoPulse(address, index, int(round(pulse))) 23 | 24 | def setPWMDivider(address, divider): 25 | logi.logiWrite(address, ((divider & 0x00FF), ((divider >> 8) & 0x00FF))); 26 | 27 | def setPWMPeriod(address, period): 28 | logi.logiWrite(address+1, ((period & 0x00FF), ((period >> 8) & 0x00FF))); 29 | 30 | def setPWMPulse(address, chan, pulse): 31 | logi.logiWrite(((address+2)+chan), ((pulse & 0x00FF), ((pulse >> 8) & 0x00FF))); 32 | 33 | def setGPIODir(address, dir_mask): 34 | logi.logiWrite(address+1, ((dir_mask & 0x00FF), ((dir_mask >> 8) & 0x00FF))); 35 | 36 | def setGPIOVal(address, val): 37 | logi.logiWrite(address, ((val & 0x00FF), ((val >> 8) & 0x00FF))); 38 | 39 | def getGPIOVal(address): 40 | read_val = logi.logiRead(address, 2); 41 | return read_val[0]+(read_val[1] << 8) 42 | 43 | def readRegister(address, reg): 44 | read_val = logi.logiRead(address+reg, 2); 45 | return read_val[0]+(read_val[1] << 8) 46 | 47 | def writeRegister(address, reg, val): 48 | read_val = logi.logiWrite(address+reg, ((val & 0x00FF), ((val >> 8) & 0x00FF))) 49 | 50 | 51 | def enableWatchdog(address): 52 | logi.logiWrite(address, (0x01, 0x00) ); 53 | 54 | def disableWatchdog(address): 55 | logi.logiWrite(address, (0x00, 0x00) ); 56 | 57 | def resetWatchdog(address): 58 | logi.logiWrite(address, (0x01, 0x00) ); 59 | 60 | def setSegBCD(address, val): 61 | decode_sseg = [0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x77, 0x7C, 0x00] 62 | buf = () 63 | for i in val : 64 | buf = buf + (decode_sseg[i],) 65 | while len(buf) < 6 : 66 | buf = buf + (0x00,) 67 | logi.logiWrite(address, buf) 68 | 69 | 70 | def setLedMatrixContent(address, pixels): 71 | buffer = [0]*len(pixels) 72 | i = 0 73 | for p in pixels: 74 | buffer[i] = p & 0x00FF 75 | buffer[i+1] = p >> 8 76 | i = i + 2 77 | logi.logiWrite(address, tuple(buffer)) 78 | 79 | 80 | -------------------------------------------------------------------------------- /python/logibone/logi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "logilib.h" 3 | 4 | static void pabort(const char *s) 5 | { 6 | perror(s); 7 | abort(); 8 | } 9 | 10 | static PyObject* logiRead(PyObject* self, PyObject* arg) 11 | { 12 | PyObject* transferTuple; 13 | unsigned int offset, size, i ; 14 | unsigned char type_size = 1 ; 15 | uint8_t * rx ; 16 | if(!PyArg_ParseTuple(arg, "ll|b", &offset, &size, &type_size)) 17 | return NULL; 18 | switch(type_size){ 19 | case 1: 20 | rx = (uint8_t *) malloc(size*type_size); 21 | logi_read(rx, size, offset); 22 | transferTuple = PyTuple_New(size); 23 | for(i=0;i 2 | #include "logilib.h" 3 | 4 | #if PY_MAJOR_VERSION >= 3 5 | #define PyInt_Check PyLong_Check 6 | #define PyInt_AsSsize_t PyLong_AsSsize_t 7 | #endif 8 | 9 | static void pabort(const char *s) 10 | { 11 | perror(s); 12 | abort(); 13 | } 14 | 15 | static PyObject* logiRead(PyObject* self, PyObject* arg) 16 | { 17 | PyObject* transferTuple; 18 | unsigned int offset, size, i ; 19 | unsigned char type_size = 1 ; 20 | uint8_t * rx ; 21 | if(!PyArg_ParseTuple(arg, "ll|b", &offset, &size, &type_size)) 22 | return NULL; 23 | switch(type_size){ 24 | case 1: 25 | rx = (uint8_t *) malloc(size*type_size); 26 | logi_read(rx, size, offset); 27 | transferTuple = PyTuple_New(size); 28 | for(i=0;i= 3 114 | PyInit_logi(void) 115 | #else 116 | initlogi(void) 117 | #endif 118 | { 119 | #if PY_MAJOR_VERSION >= 3 120 | static struct PyModuleDef moduledef = { 121 | PyModuleDef_HEAD_INIT, 122 | "logi", // m_name 123 | "Read/write data to a LOGI Pi FPGA board.", // m_doc 124 | -1, // m_size (bytes of memory needed; -1 for no memory required) 125 | logiMethods // m_methods 126 | }; 127 | PyObject *module = PyModule_Create(&moduledef); 128 | #else 129 | (void) Py_InitModule("logi", logiMethods); 130 | #endif 131 | 132 | logi_open(); 133 | 134 | #if PY_MAJOR_VERSION >= 3 135 | return module; 136 | #endif 137 | } 138 | -------------------------------------------------------------------------------- /python/logipi/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup, Extension 2 | 3 | module1 = Extension('logi', sources = ['logi.c', '../../c/logipilib.c'], include_dirs=['../../c']) 4 | 5 | setup (name = 'PackageName', 6 | version = '1.0', 7 | description = 'This is a demo package', 8 | ext_modules = [module1]) 9 | -------------------------------------------------------------------------------- /python/old/mark1_rpi.py: -------------------------------------------------------------------------------- 1 | import fcntl, os, time, struct, binascii 2 | import spi 3 | 4 | 5 | write_cmd = 0x00 6 | read_cmd = 0x01 7 | 8 | class Mark1Rpi: 9 | 10 | def __init__(self): 11 | spi.openSPI(speed=30000000) 12 | 13 | def read(self, addr, nb, inc): 14 | transfer_tuple = () 15 | cmd = (addr << 2) + read_cmd + + (inc << 1) 16 | transfer_tuple = transfer_tuple + ((cmd >> 8),) 17 | transfer_tuple = transfer_tuple + ((cmd & 0x00FF),) 18 | transfer_tuple = transfer_tuple + tuple([0]*nb) 19 | data = spi.transfer(transfer_tuple) 20 | return list(data)[2:] 21 | 22 | def write(self, addr, vals, inc): 23 | transfer_tuple = () 24 | cmd = (addr << 2) + write_cmd + (inc << 1) 25 | transfer_tuple = transfer_tuple + ((cmd >> 8),) 26 | transfer_tuple = transfer_tuple + ((cmd & 0x00FF),) 27 | for v in vals: 28 | transfer_tuple = transfer_tuple + (v,) 29 | spi.transfer(transfer_tuple) 30 | 31 | def close(self): 32 | spi.closeSPI() 33 | 34 | 35 | if __name__ == "__main__": 36 | mark1 = Mark1() 37 | try: 38 | 39 | except KeyboardInterrupt: 40 | print("Terminated by Ctrl+C") 41 | exit(0) 42 | 43 | -------------------------------------------------------------------------------- /unified_loader/Makefile: -------------------------------------------------------------------------------- 1 | #Compiler to use 2 | CC=gcc 3 | #Linker Flags 4 | LDFLAGS= #-lrt 5 | PI_VER=PI2 6 | 7 | 8 | logipi_loader: logi_loader.c i2c_loader.c bit_bang_loader.c 9 | $(CC) -fsigned-char $(LDFLAGS) -DLOGIPI -D$(PI_VER) -o logi_loader logi_loader.c i2c_loader.c bit_bang_loader.c 10 | 11 | logibone_loader: logi_loader.c i2c_loader.c bit_bang_loader.c 12 | $(CC) -fsigned-char $(LDFLAGS) -DLOGIBONE -o logi_loader logi_loader.c i2c_loader.c bit_bang_loader.c 13 | 14 | install: logi_loader 15 | install logi_loader /usr/bin 16 | clean: 17 | rm -rf *o logi_loader 18 | -------------------------------------------------------------------------------- /unified_loader/README: -------------------------------------------------------------------------------- 1 | Unified loader works for LOGIPI_R1.5, LOGIBONE_R1.0 and LOGIBONE_R1.5 (for LOGIPI_R1.0 use old loader). 2 | 3 | To compile for logibone (R1.5 and R1.0) just type : 4 | 5 | make logibonel_loader 6 | 7 | To compile for LOGIPI type : 8 | 9 | make logipi_loader 10 | -------------------------------------------------------------------------------- /unified_loader/bit_bang_loader.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "bit_bang_loader.h" 10 | 11 | 12 | #define BCM2708_PERI_BASE 0x20000000 13 | #define BCM2709_PERI_BASE 0x3f000000 14 | 15 | #define GPIO_OFFSET 0x200000 16 | 17 | #ifndef PI2 18 | #define GPIO_BASE (BCM2708_PERI_BASE + GPIO_OFFSET) /* GPIO controller */ 19 | #else 20 | #define GPIO_BASE (BCM2709_PERI_BASE + GPIO_OFFSET) 21 | #endif 22 | 23 | #define PAGE_SIZE (4*1024) 24 | #define BLOCK_SIZE (4*1024) 25 | 26 | #define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) 27 | #define OUT_GPIO(g) *(gpio+((g)/10)) |= (1<<(((g)%10)*3)) 28 | #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) 29 | 30 | #define GPIO_REG(g) *(gpio+(((g)/10))) 31 | 32 | #define GPIO_SET *(gpio+7) // sets bits which are 1 ignores bits which are 0 33 | #define GPIO_CLR *(gpio+10) // clears bits which are 1 ignores bits which are 0 34 | #define GPIO_LEV *(gpio+13) // clears bits which are 1 ignores bits which are 0 35 | 36 | 37 | #define INIT 23 38 | #define PROG 24 39 | #define DONE 25 40 | 41 | void *gpio_map; 42 | 43 | // I/O access 44 | volatile unsigned *gpio; 45 | unsigned cfg_save[3] ; 46 | 47 | void clear_bb_progb(){ 48 | GPIO_CLR = 1<> DONE) & 0x01) ; 55 | } 56 | char get_bb_init(){ 57 | return ((GPIO_LEV >> INIT) & 0x01) ; 58 | } 59 | 60 | 61 | 62 | int init_bb_loader(){ 63 | unsigned int i = 0 ; 64 | int mem_fd ; 65 | if ((mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) { 66 | printf("can't open /dev/mem \n"); 67 | exit(EXIT_FAILURE); 68 | } 69 | 70 | /* mmap GPIO */ 71 | gpio_map = mmap( 72 | NULL, //Any adddress in our space will do 73 | BLOCK_SIZE, //Map length 74 | PROT_READ|PROT_WRITE,// Enable reading & writting to mapped memory 75 | MAP_SHARED, //Shared with other processes 76 | mem_fd, //File to map 77 | GPIO_BASE //Offset to GPIO peripheral 78 | ); 79 | 80 | close(mem_fd); //No need to keep mem_fd open after mmap 81 | 82 | if (gpio_map == MAP_FAILED) { 83 | printf("mmap error %p\n", gpio_map);//errno also set! 84 | return -1 ; 85 | } 86 | 87 | // Always use volatile pointer! 88 | gpio = (volatile unsigned *)gpio_map; 89 | 90 | for(i = 0; i < 3 ; i ++){ 91 | switch(i){ 92 | case 0: 93 | cfg_save[i] = GPIO_REG(INIT); 94 | break ; 95 | case 1: 96 | cfg_save[i] = GPIO_REG(PROG); 97 | break ; 98 | case 2: 99 | cfg_save[i] = GPIO_REG(DONE); 100 | break ; 101 | default: 102 | break ; 103 | }; 104 | 105 | } 106 | 107 | INP_GPIO(INIT); 108 | INP_GPIO(PROG); 109 | INP_GPIO(DONE); 110 | 111 | OUT_GPIO(PROG); 112 | return 0 ; 113 | } 114 | 115 | 116 | void close_bb_loader(){ 117 | unsigned int i ; 118 | for(i = 0; i < 3 ; i ++){ 119 | switch(i){ 120 | case 0: 121 | GPIO_REG(INIT) = cfg_save[i] ; 122 | break ; 123 | case 1: 124 | GPIO_REG(PROG) = cfg_save[i] ; 125 | break ; 126 | case 2: 127 | GPIO_REG(DONE) = cfg_save[i] ; 128 | break ; 129 | default: 130 | break ; 131 | }; 132 | 133 | } 134 | } 135 | 136 | 137 | -------------------------------------------------------------------------------- /unified_loader/bit_bang_loader.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef BIT_BANG_LOADER_H 3 | #define BIT_BANG_LOADER_H 4 | struct bb_loader_struct{ 5 | char * name ; 6 | char * spi_path ; 7 | char has_expander ; 8 | char * i2c_path ; 9 | char expander_address ; 10 | char expander_cfg ; 11 | char expander_in ; 12 | char expander_out ; 13 | char mode1_pin; 14 | char mode0_pin; 15 | char done_pin; 16 | char prog_pin; 17 | char init_pin; 18 | char flash_rst_pin; 19 | char mux_oen_pin; 20 | }; 21 | 22 | 23 | void clear_bb_progb(); 24 | void set_bb_progb(); 25 | char get_bb_done(); 26 | char get_bb_init(); 27 | int init_bb_loader(); 28 | void close_bb_loader(); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /unified_loader/i2c_loader.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "i2c_loader.h" 10 | 11 | 12 | struct i2c_loader_struct * fpga_loader ; 13 | int i2c_fd ; 14 | 15 | //SET PIN ON I2C EXPANDER 16 | static inline void i2c_set_pin(struct i2c_loader_struct * ldr_ptr, unsigned char pin, unsigned char val) 17 | { 18 | unsigned char i2c_buffer[2]; 19 | 20 | if (ioctl(i2c_fd, I2C_SLAVE, ldr_ptr->expander_address) < 0) { 21 | return ; 22 | } 23 | 24 | i2c_buffer[0] = ldr_ptr->expander_out; 25 | write(i2c_fd, i2c_buffer, 1); 26 | read(i2c_fd, &i2c_buffer[1], 1); 27 | 28 | if (val == 1) { 29 | i2c_buffer[1] |= (1 << pin); 30 | } else { 31 | i2c_buffer[1] &= ~(1 << pin); 32 | } 33 | 34 | write(i2c_fd, i2c_buffer, 2); 35 | } 36 | 37 | //GET PIN ON I2C EXPANDER 38 | static inline unsigned char i2c_get_pin(struct i2c_loader_struct * ldr_ptr, unsigned char pin) 39 | { 40 | unsigned char i2c_buffer; 41 | 42 | if (ioctl(i2c_fd, I2C_SLAVE, ldr_ptr->expander_address) < 0) { 43 | return ; 44 | } 45 | 46 | i2c_buffer = ldr_ptr->expander_in; 47 | write(i2c_fd, &i2c_buffer, 1); 48 | read(i2c_fd, &i2c_buffer, 1); 49 | 50 | return ((i2c_buffer >> pin) & 0x01); 51 | } 52 | 53 | 54 | int init_port_for_ssi(){ 55 | unsigned char i2c_buffer[4]; 56 | //configuring inputs and outputs 57 | i2c_buffer[0] = fpga_loader->expander_cfg; 58 | i2c_buffer[1] = 0xFF; 59 | i2c_buffer[1] &= ~((1 << fpga_loader->prog_pin) | (1 << fpga_loader->mode1_pin) ); 60 | if(fpga_loader->mux_oen_pin >= 0){ 61 | i2c_buffer[1] &= ~(1 << fpga_loader->mux_oen_pin); 62 | } 63 | 64 | if (ioctl(i2c_fd, I2C_SLAVE, fpga_loader->expander_address) < 0) 65 | return -1 ; 66 | 67 | write(i2c_fd, i2c_buffer, 2); // set SSI_PROG, MODE1, MUX_OEn as output others as inputs 68 | 69 | 70 | i2c_set_pin(fpga_loader, fpga_loader->mux_oen_pin, 0); 71 | i2c_set_pin(fpga_loader, fpga_loader->mode1_pin, 1); 72 | i2c_set_pin(fpga_loader, fpga_loader->prog_pin, 1); 73 | return 0 ; 74 | } 75 | 76 | int init_i2c_loader(struct i2c_loader_struct * selected_loader){ 77 | char dummy ; 78 | i2c_fd = open(selected_loader->i2c_path, O_RDWR); 79 | if (i2c_fd < 0) { 80 | // ERROR HANDLING; you can check errno to see what went wrong 81 | printf("could not open I2C device : %s!\n", selected_loader->i2c_path); 82 | close(i2c_fd); 83 | return -1 ; 84 | } 85 | if (ioctl(i2c_fd, I2C_SLAVE, selected_loader->expander_address) < 0){ 86 | printf("I2C communication error ! \n"); 87 | close(i2c_fd); 88 | return -1 ; 89 | } 90 | 91 | if(read(i2c_fd, &dummy, 1) != 1){ 92 | close(i2c_fd); 93 | return -1 ; 94 | } 95 | fpga_loader = selected_loader ; 96 | return init_port_for_ssi() ; 97 | } 98 | 99 | 100 | void clear_i2c_progb(){ 101 | i2c_set_pin(fpga_loader, fpga_loader->prog_pin, 0); 102 | } 103 | 104 | void set_i2c_progb(){ 105 | i2c_set_pin(fpga_loader, fpga_loader->prog_pin, 1); 106 | } 107 | 108 | char get_i2c_init(){ 109 | return i2c_get_pin(fpga_loader, fpga_loader->init_pin) ; 110 | } 111 | 112 | char get_i2c_done(){ 113 | return i2c_get_pin(fpga_loader, fpga_loader->done_pin) ; 114 | } 115 | 116 | void close_i2c_loader(){ 117 | close(i2c_fd); 118 | } 119 | 120 | 121 | -------------------------------------------------------------------------------- /unified_loader/i2c_loader.h: -------------------------------------------------------------------------------- 1 | #ifndef I2C_LOADER_H 2 | #define I2C_LOADER_H 3 | 4 | 5 | struct i2c_loader_struct{ 6 | char * name ; 7 | char * spi_path ; 8 | char has_expander ; 9 | char * i2c_path ; 10 | char expander_address ; 11 | char expander_cfg ; 12 | char expander_in ; 13 | char expander_out ; 14 | char mode1_pin; 15 | char mode0_pin; 16 | char done_pin; 17 | char prog_pin; 18 | char init_pin; 19 | char flash_rst_pin; 20 | char mux_oen_pin; 21 | }; 22 | 23 | 24 | int init_i2c_loader(struct i2c_loader_struct * selected_loader); 25 | void clear_i2c_progb(); 26 | void set_i2c_progb(); 27 | char get_i2c_init(); 28 | char get_i2c_done(); 29 | void close_i2c_loader(); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /unified_loader/logi_loader.h: -------------------------------------------------------------------------------- 1 | 2 | #include "i2c_loader.h" 3 | #include "bit_bang_loader.h" 4 | 5 | 6 | #ifndef LOGI_LOADER_H 7 | #define LOGI_LOADER_H 8 | 9 | 10 | #define LOADER_VERSION "0.1.0" 11 | 12 | 13 | // UNIFIED REGISTERS FOR LOGIBONE/LOGIPI R1.5 14 | #define LOGI_R1_5_SSI_DONE 2 15 | #define LOGI_R1_5_MODE1 3 16 | #define LOGI_R1_5_SSI_PROG 0 17 | #define LOGI_R1_5_SSI_INIT 1 18 | #define LOGI_R1_5_FLASH_RST 5 19 | #define LOGI_R1_5_MUX_OEn 4 20 | 21 | //EXPANDER 22 | #define LOGI_R1_5_I2C_IO_EXP_ADDR 0x20 23 | #define LOGI_R1_5_I2C_IO_EXP_CONFIG_REG 0x01 24 | #define LOGI_R1_5_I2C_IO_EXP_IN_REG 0x00 25 | #define LOGI_R1_5_I2C_IO_EXP_OUT_REG 0x00 26 | 27 | 28 | // REGISTERS FOR LOGIBONE R1 29 | #define LOGIBONE_R1_SSI_DONE 3 30 | #define LOGIBONE_R1_SSI_PROG 5 31 | #define LOGIBONE_R1_SSI_INIT 2 32 | #define LOGIBONE_R1_MODE0 0 33 | #define LOGIBONE_R1_MODE1 1 34 | #define LOGIBONE_R1_SSI_DELAY 1 35 | 36 | //I2C 37 | #define LOGIBONE_R1_I2C_IO_EXP_ADDR 0x24 38 | #define LOGIBONE_R1_I2C_IO_EXP_CONFIG_REG 0x03 39 | #define LOGIBONE_R1_I2C_IO_EXP_IN_REG 0x00 40 | #define LOGIBONE_R1_I2C_IO_EXP_OUT_REG 0x01 41 | 42 | 43 | 44 | struct i2c_loader_struct logibone_r1_loader = {"LOGIBONE_R1", 45 | "/dev/spidev2.0", 46 | 1, 47 | "/dev/i2c-2", 48 | LOGIBONE_R1_I2C_IO_EXP_ADDR, 49 | LOGIBONE_R1_I2C_IO_EXP_CONFIG_REG, 50 | LOGIBONE_R1_I2C_IO_EXP_IN_REG, 51 | LOGIBONE_R1_I2C_IO_EXP_OUT_REG, 52 | LOGIBONE_R1_MODE1, 53 | LOGIBONE_R1_MODE0, 54 | LOGIBONE_R1_SSI_DONE, 55 | LOGIBONE_R1_SSI_PROG, 56 | LOGIBONE_R1_SSI_INIT, 57 | -1, 58 | -1 59 | }; 60 | 61 | 62 | struct i2c_loader_struct logibone_r1_5_loader = {"LOGIBONE_R1.5", 63 | "/dev/spidev2.0", 64 | 1, 65 | "/dev/i2c-2", 66 | LOGI_R1_5_I2C_IO_EXP_ADDR, 67 | LOGI_R1_5_I2C_IO_EXP_CONFIG_REG, 68 | LOGI_R1_5_I2C_IO_EXP_IN_REG, 69 | LOGI_R1_5_I2C_IO_EXP_OUT_REG, 70 | LOGI_R1_5_MODE1, 71 | -1, 72 | LOGI_R1_5_SSI_DONE, 73 | LOGI_R1_5_SSI_PROG, 74 | LOGI_R1_5_SSI_INIT, 75 | LOGI_R1_5_FLASH_RST, 76 | LOGI_R1_5_MUX_OEn 77 | }; 78 | struct i2c_loader_struct logipi_r1_5_loader = {"LOGIPI_R1.5", 79 | "/dev/spidev0.1", 80 | 1, 81 | "/dev/i2c-1", 82 | LOGI_R1_5_I2C_IO_EXP_ADDR, 83 | LOGI_R1_5_I2C_IO_EXP_CONFIG_REG, 84 | LOGI_R1_5_I2C_IO_EXP_IN_REG, 85 | LOGI_R1_5_I2C_IO_EXP_OUT_REG, 86 | LOGI_R1_5_MODE1, 87 | -1, 88 | LOGI_R1_5_SSI_DONE, 89 | LOGI_R1_5_SSI_PROG, 90 | LOGI_R1_5_SSI_INIT, 91 | LOGI_R1_5_FLASH_RST, 92 | LOGI_R1_5_MUX_OEn 93 | }; 94 | 95 | 96 | 97 | 98 | 99 | struct bb_loader_struct logipi_r1_0_loader = { 100 | "LOGIPI_R1.0", 101 | "/dev/spidev0.1", 102 | 0, 103 | "", 104 | 0, 105 | 0, 106 | 0, 107 | 0, 108 | -1, 109 | -1, 110 | 25, 111 | 24, 112 | 23, 113 | -1, 114 | -1 115 | }; 116 | 117 | enum loader_type_enum{ 118 | I2C, 119 | BB 120 | }; 121 | 122 | struct i2c_loader_struct * logi_variants [] = {&logibone_r1_5_loader, &logibone_r1_loader}; 123 | 124 | #endif 125 | -------------------------------------------------------------------------------- /wishbone_utils/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | 3 | 4 | all: wb_utils 5 | 6 | clean: 7 | rm -f *.a *.o wb_utils 8 | 9 | wb_utils : wb_utils.c 10 | $(CC) -fsigned-char -o $@ wb_utils.c -llogi 11 | -------------------------------------------------------------------------------- /wishbone_utils/wb_utils.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "logilib.h" 12 | 13 | int wb_wr(unsigned int addr, unsigned short val){ 14 | 15 | logi_write( (unsigned char *) &val, (unsigned int)2, addr); 16 | printf("address:%x Write Val:%x \r\n",addr, val); 17 | return(1); 18 | } 19 | 20 | int wb_rd(unsigned int addr){ 21 | unsigned short read_val; 22 | logi_read((unsigned char *) &read_val, (unsigned int)2, addr); 23 | printf("address: 0x%x Read Value: 0x%x \r\n", addr, read_val); 24 | return(1); 25 | } 26 | 27 | int wb_wr_range(unsigned int start_addr, unsigned int stop_addr, unsigned short val){ 28 | unsigned short i; 29 | for(i = start_addr; i \n"); 56 | printf("\t rd_range \n"); 57 | printf("\t wr <@> \n"); 58 | printf("\t rd <@> \n"); 59 | return 0 ; 60 | } 61 | 62 | if( strcmp( argv[1], "wr_range")==0 ){ 63 | start_addr = strtol(argv[2], NULL, 0); 64 | stop_addr = strtol(argv[3], NULL, 0); 65 | val = strtol(argv[4], NULL, 0); 66 | printf("wb_write_range start: 0x%4x stop: 0x$4x val: 0x%4x \r\n",start_addr, stop_addr, val); 67 | wb_wr_range(start_addr, stop_addr, (unsigned short)val); 68 | } 69 | else if( strcmp( argv[1], "rd_range")==0 ){ 70 | start_addr = strtol(argv[2], NULL, 0); 71 | stop_addr = strtol(argv[3], NULL, 0); 72 | printf("wb_write_range start: 0x%4x stop: 0x$4x\r\n",start_addr, stop_addr); 73 | wb_rd_range(start_addr, stop_addr); 74 | } 75 | else if( strcmp( argv[1], "wr")==0 ){ //put the short strings last, 76 | addr = strtol(argv[2], NULL, 0); 77 | val = strtol(argv[3], NULL, 0); 78 | printf("wb_write Address: 0x%4x Value: 0x%4x \r\n", addr, val); 79 | wb_wr( addr, (unsigned short)val); 80 | } 81 | else if( strcmp( argv[1], "rd")==0 ){ //put the short strings last, 82 | addr = strtol(argv[2], NULL, 0); 83 | printf("wb_read Address: 0x%4x \r\n", addr, val); 84 | wb_rd( addr); 85 | } 86 | else { 87 | printf("!!no function match found!! \r\n"); 88 | } 89 | 90 | return 0 ; 91 | } 92 | --------------------------------------------------------------------------------