Permalink
Browse files

Merging up to 20150315

  • Loading branch information...
2 parents 4211103 + 42f18ae commit 05fde06e26b573922a37434cd8de6e761d1eb8a0 @makestuff committed Jul 14, 2015
Showing with 19,327 additions and 4,433 deletions.
  1. +7 −3 Makefile
  2. +3 −3 csvfplay.c
  3. +189 −0 docs/Makefile
  4. +1 −0 docs/_static/monocmd.css
  5. +2 −0 docs/_templates/layout.html
  6. +258 −0 docs/conf.py
  7. BIN docs/images/fpgalinkOverview.png
  8. +3,442 −0 docs/images/fpgalinkOverview.svg
  9. BIN docs/images/fx2minHarness.png
  10. +4,826 −0 docs/images/fx2minHarness.svg
  11. +15 −0 docs/index.rst
  12. +448 −0 docs/installation.rst
  13. +77 −0 docs/introduction.rst
  14. +1 −1 dump/main.c
  15. +22 −21 examples/c/README
  16. +104 −35 examples/c/main.c
  17. BIN examples/excel/fpgalink.xls
  18. +7 −0 examples/java/.classpath
  19. +17 −0 examples/java/.project
  20. +19 −0 examples/java/Makefile
  21. +48 −0 examples/java/README
  22. +1,368 −0 examples/java/src/eu/makestuff/fpgalink/FL.java
  23. +10 −0 examples/java/src/eu/makestuff/fpgalink/FLException.java
  24. +32 −0 examples/java/src/eu/makestuff/fpgalink/NativeSize.java
  25. +114 −0 examples/java/src/foo/Main.java
  26. +61 −0 examples/perl/Makefile
  27. +52 −0 examples/perl/README
  28. +30 −0 examples/perl/extra.pm
  29. +412 −0 examples/perl/fl.i
  30. +124 −0 examples/perl/various.pl
  31. +82 −72 examples/python/README
  32. +0 −31 examples/python/eepromTest.sh
  33. +1,259 −0 examples/python/fl.py
  34. +0 −69 examples/python/flashFirmware.sh
  35. +122 −0 examples/python/flcli.py
  36. +0 −466 examples/python/fpgalink2.py
  37. +55 −0 examples/python/jtag.py
  38. +54 −0 examples/python/queryIceblink.py
  39. +107 −0 examples/python/various.py
  40. +24 −9 firmware/avr/Makefile
  41. +2 −0 firmware/avr/boards/iceblink.c
  42. +50 −0 firmware/avr/boards/iceblink.h
  43. +62 −0 firmware/avr/boards/minimus.h
  44. +49 −0 firmware/avr/boards/mojo-v2.h
  45. +52 −0 firmware/avr/bootloader.c
  46. +18 −10 firmware/avr/debug.c
  47. +2 −4 firmware/avr/debug.h
  48. +159 −158 firmware/avr/desc.c
  49. +173 −0 firmware/avr/epp.c
  50. +9 −0 firmware/avr/epp.h
  51. +368 −394 firmware/avr/main.c
  52. +24 −0 firmware/avr/ports.h
  53. +266 −323 firmware/avr/prog.c
  54. +4 −0 firmware/avr/prog.h
  55. +287 −0 firmware/avr/prog_ops.h
  56. +150 −0 firmware/avr/usart.c
  57. +9 −0 firmware/avr/usart.h
  58. +78 −0 firmware/avr/usbio.h
  59. +28 −11 firmware/fx2/Makefile
  60. +5 −4 firmware/fx2/README
  61. +37 −27 firmware/fx2/app.c
  62. +9 −0 firmware/fx2/boards/aes220.c
  63. +2 −0 firmware/fx2/boards/nexys2.c
  64. +6 −6 firmware/fx2/debug.c
  65. +2 −2 firmware/fx2/defs.h
  66. +0 −1 firmware/fx2/init.inc
  67. +4 −4 firmware/fx2/livePatch.c
  68. +0 −55 firmware/fx2/lstParse.pl
  69. +70 −0 firmware/fx2/lstParse.py
  70. +52 −31 firmware/fx2/prog.c
  71. +4 −4 firmware/fx2/prog.h
  72. +12 −12 firmware/fx2/prom.c
  73. +2 −2 firmware/fx2/prom.h
  74. +740 −0 firmware/lpc/USBFPGALink.cpp
  75. +145 −0 firmware/lpc/USBFPGALink.h
  76. +54 −0 firmware/lpc/main.cpp
  77. +185 −0 firmware/lpc/portMethods.cpp
  78. +106 −0 firmware/lpc/readme.txt
  79. +13 −13 fx2.c
  80. +317 −881 gen_fw/eepromNoBootFirmware.hex
  81. +318 −883 gen_fw/ramFirmware.hex
  82. 0 {docs → latex-docs}/style.tex
  83. 0 {docs → latex-docs}/user_manual/Makefile
  84. 0 {docs → latex-docs}/user_manual/build.sh
  85. 0 {docs → latex-docs}/user_manual/code/c/check_macro.c
  86. 0 {docs → latex-docs}/user_manual/code/cli/comm_cksum.txt
  87. 0 {docs → latex-docs}/user_manual/code/cli/flcli_help.txt
  88. 0 {docs → latex-docs}/user_manual/code/cli/make_hdl_lin.txt
  89. 0 {docs → latex-docs}/user_manual/code/cli/make_hdl_win.txt
  90. 0 {docs → latex-docs}/user_manual/code/cli/prog_cksum.txt
  91. 0 {docs → latex-docs}/user_manual/code/cli/prog_fifo.txt
  92. 0 {docs → latex-docs}/user_manual/code/cli/udev.txt
  93. 0 {docs → latex-docs}/user_manual/images/by-sa.svg
  94. 0 {docs → latex-docs}/user_manual/images/comm.svg
  95. 0 {docs → latex-docs}/user_manual/images/commFpgaAppInterface.svg
  96. BIN {docs → latex-docs}/user_manual/images/ep2c5.jpg
  97. 0 {docs → latex-docs}/user_manual/images/epp.svg
  98. 0 {docs → latex-docs}/user_manual/images/eppHarness.svg
  99. 0 {docs → latex-docs}/user_manual/images/fpgalinkOverview.svg
  100. 0 {docs → latex-docs}/user_manual/images/fx2Full.svg
  101. 0 {docs → latex-docs}/user_manual/images/fx2Minimal.svg
  102. 0 {docs → latex-docs}/user_manual/images/fx2allHarness.svg
  103. 0 {docs → latex-docs}/user_manual/images/fx2minHarness.svg
  104. 0 {docs → latex-docs}/user_manual/images/jtag.svg
  105. BIN {docs → latex-docs}/user_manual/images/nexys2.jpg
  106. 0 {docs → latex-docs}/user_manual/snippet.pl
  107. 0 {docs → latex-docs}/user_manual/top_level_verilog.tex
  108. +365 −118 libfpgalink.c
  109. +920 −323 libfpgalink.h
  110. +2 −2 mkfw/main.c
  111. +16 −36 private.h
  112. +409 −298 prog.c
  113. +171 −0 spi.c
  114. +68 −66 svf2csvf.c
  115. +1 −0 svf2csvf.h
  116. +52 −8 tests-unit/testSvf2Csvf.cpp
  117. +25 −2 util.c
  118. +4 −16 vendorCommands.h
  119. +24 −24 xsvf2csvf.c
  120. +1 −1 xsvf2csvf/Makefile
  121. +4 −4 xsvf2csvf/main.c
View
@@ -24,6 +24,8 @@ PRE_BUILD += $(EXTRA_CC_SRCS)
POST_BUILD := tools
#EXTRA_CLEAN := gen_fw
EXTRA_CLEAN_DIRS := mkfw firmware/fx2 xsvf2csvf dump
+AS8051 := sdas8051
+#AS8051 := asx8051
-include $(ROOT)/common/top.mk
@@ -54,16 +56,18 @@ gen_fw/ramFirmware.hex:
gen_fw/eepromNoBootFirmware.hex:
@echo Building EEPROM firmware...
mkdir -p gen_fw
- make -C firmware/fx2 clean
- make -C firmware/fx2 FLAGS="-DEEPROM"
+ make -C firmware/fx2 AS8051=$(AS8051) clean
+ make -C firmware/fx2 AS8051=$(AS8051) FLAGS="-DEEPROM"
cp firmware/fx2/firmware.hex gen_fw/eepromNoBootFirmware.hex
make -C firmware/fx2 clean
hdl:
./hdlbuild.sh $(X2C)
+fx2lib: $(ROOT)/3rd/fx2lib/lib/fx2.lib
+
$(ROOT)/3rd/fx2lib/lib/fx2.lib: $(ROOT)/3rd/fx2lib
- make AS8051=asx8051 -C $<
+ make AS8051=$(AS8051) -C $<
tests: FORCE
make -C tests-unit rel
View
@@ -119,7 +119,7 @@ FLStatus csvfPlay(struct FLContext *handle, const uint8 *csvfData, const char **
#ifdef DEBUG
printf(")\n");
#endif
- fStatus = jtagShift(handle, numBits, tdiData, NULL, true, error); // -> Exit1-DR
+ fStatus = jtagShiftInOnly(handle, numBits, tdiData, true, error); // -> Exit1-DR
CHECK_STATUS(fStatus, fStatus, cleanup, "csvfPlay()");
fStatus = jtagClockFSM(handle, 0x00000001, 2, error); // -> Run-Test/Idle
CHECK_STATUS(fStatus, fStatus, cleanup, "csvfPlay()");
@@ -155,7 +155,7 @@ FLStatus csvfPlay(struct FLContext *handle, const uint8 *csvfData, const char **
do {
fStatus = jtagClockFSM(handle, 0x00000001, 3, error); // -> Shift-DR
CHECK_STATUS(fStatus, fStatus, cleanup, "csvfPlay()");
- fStatus = jtagShift(handle, xsdrSize, tdiData, tdoData, true, error); // -> Exit1-DR
+ fStatus = jtagShiftInOut(handle, xsdrSize, tdiData, tdoData, true, error); // -> Exit1-DR
CHECK_STATUS(fStatus, fStatus, cleanup, "csvfPlay()");
fStatus = jtagClockFSM(handle, 0x0000001A, 6, error); // -> Run-Test/Idle
CHECK_STATUS(fStatus, fStatus, cleanup, "csvfPlay()");
@@ -196,7 +196,7 @@ FLStatus csvfPlay(struct FLContext *handle, const uint8 *csvfData, const char **
while ( numBytes-- ) {
*tdiPtr++ = *ptr++;
}
- fStatus = jtagShift(handle, xsdrSize, tdiAll, NULL, true, error); // -> Exit1-DR
+ fStatus = jtagShiftInOnly(handle, xsdrSize, tdiAll, true, error); // -> Exit1-DR
free(tdiAll);
CHECK_STATUS(fStatus, fStatus, cleanup, "csvfPlay()");
fStatus = jtagClockFSM(handle, 0x00000001, 2, error); // -> Run-Test/Idle
View
@@ -0,0 +1,189 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+SVGS := $(wildcard images/*.svg)
+PNGS := $(SVGS:%.svg=%.png)
+EXTRAS := _themes/sphinx_rtd_theme $(PNGS)
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " xml to make Docutils-native XML files"
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ rm -rf $(BUILDDIR)/*
+
+_themes/sphinx_rtd_theme:
+ mkdir -p _themes
+ wget --no-check-certificate -qO- https://github.com/snide/sphinx_rtd_theme/archive/master.tar.gz | tar zxf -
+ mv sphinx_rtd_theme-master/sphinx_rtd_theme $@
+ rm -rf sphinx_rtd_theme-master
+
+html: $(EXTRAS)
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FPGALink.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FPGALink.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/FPGALink"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FPGALink"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through platex and dvipdfmx..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
+
+xml:
+ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+ @echo
+ @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+ @echo
+ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
+
+%.png : %.svg
+ inkscape -f $< -e $@
View
@@ -0,0 +1 @@
+strong.command{font-family:monospace;font-size:14px}
@@ -0,0 +1,2 @@
+{% extends "!layout.html" %}
+{% set css_files = ["_static/monocmd.css"] %}
Oops, something went wrong.

0 comments on commit 05fde06

Please sign in to comment.