[sigrok-firmware-fx2lafw] 01/06: Import Upstream version 0.1.3

Zoltan Gyarmati zgyarmati-guest at moszumanska.debian.org
Wed Mar 29 21:53:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

zgyarmati-guest pushed a commit to branch master
in repository sigrok-firmware-fx2lafw.

commit 4d70790967f5bad80f087a209681a137962864ec
Author: Zoltan Gyarmati <Zoltan Gyarmati mr.zoltan.gyarmati at gmail.com>
Date:   Wed Mar 1 00:58:58 2017 +0100

    Import Upstream version 0.1.3
---
 AUTHORS                               |    7 +
 COPYING                               |  339 +++
 COPYING.LESSER                        |  502 +++++
 ChangeLog                             |  956 ++++++++
 INSTALL                               |  370 ++++
 Makefile.am                           |  332 +++
 Makefile.in                           |  925 ++++++++
 NEWS                                  |   47 +
 README                                |  124 ++
 aclocal.m4                            |  773 +++++++
 autogen.sh                            |   25 +
 autostuff/install-sh                  |  508 +++++
 autostuff/missing                     |  215 ++
 configure                             | 3908 +++++++++++++++++++++++++++++++++
 configure.ac                          |   78 +
 fx2lafw.c                             |  279 +++
 fx2lib/include/autovector.h           |  218 ++
 fx2lib/include/delay.h                |   91 +
 fx2lib/include/eputils.h              |   86 +
 fx2lib/include/fx2ints.h              |  116 +
 fx2lib/include/fx2macros.h            |  127 ++
 fx2lib/include/fx2regs.h              |  628 ++++++
 fx2lib/include/fx2types.h             |   50 +
 fx2lib/include/gpif.h                 |  110 +
 fx2lib/include/i2c.h                  |   97 +
 fx2lib/include/lights.h               |   96 +
 fx2lib/include/serial.h               |   55 +
 fx2lib/include/setupdat.h             |  223 ++
 fx2lib/lib/delay.c                    |   73 +
 fx2lib/lib/eputils.c                  |   60 +
 fx2lib/lib/gpif.c                     |  182 ++
 fx2lib/lib/i2c.c                      |  298 +++
 fx2lib/lib/int4av.a51                 |   28 +
 fx2lib/lib/interrupts/ep0ack_isr.c    |   22 +
 fx2lib/lib/interrupts/ep0in_isr.c     |   22 +
 fx2lib/lib/interrupts/ep0out_isr.c    |   22 +
 fx2lib/lib/interrupts/ep0ping_isr.c   |   22 +
 fx2lib/lib/interrupts/ep1in_isr.c     |   22 +
 fx2lib/lib/interrupts/ep1out_isr.c    |   22 +
 fx2lib/lib/interrupts/ep1ping_isr.c   |   22 +
 fx2lib/lib/interrupts/ep2_isr.c       |   22 +
 fx2lib/lib/interrupts/ep2ef_isr.c     |   22 +
 fx2lib/lib/interrupts/ep2ff_isr.c     |   22 +
 fx2lib/lib/interrupts/ep2isoerr_isr.c |   22 +
 fx2lib/lib/interrupts/ep2pf_isr.c     |   22 +
 fx2lib/lib/interrupts/ep2ping_isr.c   |   22 +
 fx2lib/lib/interrupts/ep4_isr.c       |   22 +
 fx2lib/lib/interrupts/ep4ef_isr.c     |   22 +
 fx2lib/lib/interrupts/ep4ff_isr.c     |   22 +
 fx2lib/lib/interrupts/ep4isoerr_isr.c |   22 +
 fx2lib/lib/interrupts/ep4pf_isr.c     |   22 +
 fx2lib/lib/interrupts/ep4ping_isr.c   |   22 +
 fx2lib/lib/interrupts/ep6_isr.c       |   22 +
 fx2lib/lib/interrupts/ep6ef_isr.c     |   22 +
 fx2lib/lib/interrupts/ep6ff_isr.c     |   22 +
 fx2lib/lib/interrupts/ep6isoerr_isr.c |   22 +
 fx2lib/lib/interrupts/ep6pf_isr.c     |   22 +
 fx2lib/lib/interrupts/ep6ping_isr.c   |   22 +
 fx2lib/lib/interrupts/ep8_isr.c       |   22 +
 fx2lib/lib/interrupts/ep8ef_isr.c     |   22 +
 fx2lib/lib/interrupts/ep8ff_isr.c     |   22 +
 fx2lib/lib/interrupts/ep8isoerr_isr.c |   22 +
 fx2lib/lib/interrupts/ep8pf_isr.c     |   22 +
 fx2lib/lib/interrupts/ep8ping_isr.c   |   22 +
 fx2lib/lib/interrupts/errlimit_isr.c  |   22 +
 fx2lib/lib/interrupts/gpifdone_isr.c  |   22 +
 fx2lib/lib/interrupts/gpifwf_isr.c    |   22 +
 fx2lib/lib/interrupts/hispeed_isr.c   |   22 +
 fx2lib/lib/interrupts/ibn_isr.c       |   22 +
 fx2lib/lib/interrupts/sof_isr.c       |   22 +
 fx2lib/lib/interrupts/spare_isr.c     |   22 +
 fx2lib/lib/interrupts/sudav_isr.c     |   22 +
 fx2lib/lib/interrupts/suspend_isr.c   |   22 +
 fx2lib/lib/interrupts/sutok_isr.c     |   22 +
 fx2lib/lib/interrupts/usbreset_isr.c  |   22 +
 fx2lib/lib/serial.c                   |   92 +
 fx2lib/lib/setupdat.c                 |  367 ++++
 fx2lib/lib/usbav.a51                  |  125 ++
 gpif-acquisition.c                    |  268 +++
 hw/braintechnology-usb-lps/dscr.a51   |   24 +
 hw/cwav-usbeeax/dscr.a51              |   25 +
 hw/cwav-usbeedx/dscr.a51              |   24 +
 hw/cwav-usbeesx/dscr.a51              |   25 +
 hw/cypress-fx2/dscr.a51               |   25 +
 hw/saleae-logic/dscr.a51              |   25 +
 hw/sigrok-fx2-16ch/dscr.a51           |   24 +
 hw/sigrok-fx2-8ch/dscr.a51            |   24 +
 include/command.h                     |   51 +
 include/dscr.inc                      |  211 ++
 include/fx2lafw.h                     |   43 +
 include/gpif-acquisition.h            |   31 +
 91 files changed, 14234 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..28c1b20
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+-------------------------------------------------------------------------------
+AUTHORS
+-------------------------------------------------------------------------------
+
+Please check the source code files and/or git history and/or ChangeLog for
+a list of all authors and contributors.
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..d511905
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/COPYING.LESSER b/COPYING.LESSER
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/COPYING.LESSER
@@ -0,0 +1,502 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+

+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+

+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..218f610
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,956 @@
+commit a6fb49c00691a917a1734afbf3071ca2ad0c1c46
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Nov 26 23:41:51 2015 +0100
+
+    configure.ac: Bump package version to 0.1.3.
+
+commit ca7b6c32f649bd05c1edbf52fa933dbe8ed79de1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Nov 26 23:40:46 2015 +0100
+
+    NEWS: Add list of user-visible changes so far.
+
+commit b27c7431ca700def18d55343078e523fdc0ab9d0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Nov 26 23:38:10 2015 +0100
+
+    README: Any sdcc 3.x version works fine.
+    
+    E.g. 3.5 also works fine as of today.
+
+commit 623f27bad7565de305c462ff050f3823fc2110a6
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Tue Nov 10 13:28:40 2015 +0100
+
+    build: Distribute autogen.sh
+
+commit 5379bf8639ea61c38e2535ceafdd036b3aed3ba4
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Mon Nov 9 14:57:33 2015 +0100
+
+    build: Customize silent rule prefixes for sdas/sdcc
+    
+    Be fancy and print custom SDAS and SDCC prefixes in silent-rules
+    mode.
+
+commit 9a8e9e608edda4dcc6a89a8051a56f302863c938
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Mon Nov 9 14:27:12 2015 +0100
+
+    build: Allow dist-bin from non-git sources
+    
+    Do not require the source directory to be a git checkout when
+    creating the tarball of binary firmware files.
+
+commit 0dc651eba4b01c936bac3380ae11deed34d082e3
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Mon Nov 9 11:51:26 2015 +0100
+
+    build: Simplify dist-changelog target
+    
+    When not building from git, it is not necessary to manually copy
+    the ChangeLog file from the source directory to the distribution,
+    since Automake already does that for us.
+
+commit 92f54a3e99b0c6b952380725219fc606ca082ef9
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Mon Nov 9 11:10:48 2015 +0100
+
+    build: Check SDCC version during configure
+    
+    Require at least SDCC version 2.9.0.
+    
+    This fixes bug #696.
+
+commit aa6a27fb7c1398ab467ad5ade6111665bbddc0d7
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Sat Nov 7 19:14:06 2015 +0100
+
+    Update git ignore list
+
+commit 88d4ba3e4b3c0b8587b2a338a0bf09640d1edb7e
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date:   Sat Nov 7 19:02:43 2015 +0100
+
+    build: Switch to non-recursive make
+
+commit 4c4035a7b45d6e865fac0a4ac96c83ab6baf7a13
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Oct 21 22:23:44 2015 +0200
+
+    Add fx2lafw firmware for FX2 devices with sigrok VID/PID.
+    
+    The two new firmware images fx2lafw-sigrok-fx2-{8,16}ch.fw can be used
+    on Cypress FX2 devices where one of the two official sigrok fx2lafw
+    USB VID/PID pairs is hardcoded in an external EEPROM.
+    
+    The sigrok project owns USB product IDs allocated via the Openmoko project:
+    
+      http://wiki.openmoko.org/wiki/USB_Product_IDs
+    
+    The following two VID/PID pairs are available for devices that use
+    a Cypress FX2(LP) chip *directly* as 8-channel or 16-channel logic analyzer,
+    and use the respective USB-based protocol. They are *not* meant for
+    other devices which just happen to also have an FX2 (e.g. in addition to
+    an FPGA) and/or devices that use a different USB-based protocol.
+    
+     - 1D50:608C: fx2lafw-sigrok-fx2-8ch.fw
+    
+     - 1D50:608D: fx2lafw-sigrok-fx2-16ch.fw
+
+commit c547f69e7c62a49368da12b6717e2569efb4cc8a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Apr 7 02:42:11 2015 +0200
+
+    autogen.sh: Drop obsolete MinGW/MSYS items.
+    
+    For Windows builds (which require MinGW-w64) we currently support:
+    
+     - cross-builds using MXE (mxe.cc) and possibly other cross-compile setups
+    
+     - native builds using MSYS2 (sf.net/projects/msys2/)
+    
+    Neither of those require explicitly specifying ACLOCAL_DIR.
+
+commit 70b415b64e67a93ab39f86862fada1381b503bbb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 23 00:06:59 2014 +0200
+
+    Drop references to obsolete sigrok-commits mailing list.
+
+commit 4c9f15c9b885f4c08ed6c49df9fd382fa4008261
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue May 6 23:13:35 2014 +0200
+
+    configure.ac: Bump package version to 0.1.2.
+
+commit 75a66a81e1d13284058b3d3cb3506b079567489e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue May 6 20:38:21 2014 +0200
+
+    NEWS: Add list of user-visible changes so far.
+
+commit b2bd00c4b2e7db5889fc2543fe9a2f132b59b95a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue May 6 20:41:19 2014 +0200
+
+    Increase FX2LAFW_VERSION_MINOR to 1.
+    
+    There have been changes since the last release, but they have been
+    compatible ones that don't require any host-side (libsigrok) changes,
+    thus only increase FX2LAFW_VERSION_MINOR (but not FX2LAFW_VERSION_MAJOR).
+
+commit 6398a5191b3fb474238a1cbeef661e950dd68f55
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Jun 27 15:12:04 2013 +0200
+
+    Bugfix: Tristate pins after acquisition.
+    
+    Fix a typo which lead to the data pins not being tri-stated after an
+    aquisition (when the GPIF is idle) but rather being driven.
+    
+    Thanks Ignacio García Pérez and Clemens Novak for reporting and testing.
+
+commit bf4dba5d9b2b01118605d4203f9410b25f673bd3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Fri Apr 26 13:50:58 2013 +0200
+
+    README: Add "Copyright and license" section.
+
+commit a986cfff887aefe65cfd0923a31ae2843b7e3ae4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Apr 23 22:35:32 2013 +0200
+
+    GPL headers: Use correct project name.
+
+commit b77e31824a872c9e80c0ee376479ecc9f337fc86
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Apr 16 23:50:46 2013 +0200
+
+    Prepare for the 0.1.1 release.
+
+commit fc6f8a337f2d4ab3a1c31a1a5a45e03aa0b53f6f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Apr 17 00:09:41 2013 +0200
+
+    COPYING.LESSER: Replace LGPLv3 with LGPLv2.1.
+    
+    The file incorrectly contained a copy of the LGPL, version 3. It should
+    have contained version 2.1 though, since that's the license of the
+    fx2lib files it applies to.
+
+commit c610cc7e94974d40e8bb6fd99acfb585f40fcc12
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Apr 17 00:06:20 2013 +0200
+
+    Document the download for pre-built firmware files.
+
+commit 71223dc9fd91abbd7b08e3d0138e9a83f0d4dda7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Apr 16 23:21:32 2013 +0200
+
+    README: sdcc 3.2.x works fine, document that.
+
+commit 8f4904e5d9f63af143ce78708cf7b1f30d63ae09
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Mar 17 14:53:25 2013 +0100
+
+    Fix parallel build (e.g. via "-j 2").
+    
+    This fixes bug #68.
+
+commit 3bed3f21fafc672bd26039aec34fd3ae0f480b90
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Mar 17 14:47:25 2013 +0100
+
+    NEWS: Fix typo.
+
+commit 860cfff0d63e9d4b085e63c50282a40ff21bd12d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Mar 17 14:42:19 2013 +0100
+
+    configure.ac: Fix typo in 'sdcc-sdcclib'.
+
+commit 471fe66134dec39680b6abc7dbe457b20c1df073
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Mar 17 14:40:33 2013 +0100
+
+    Abort configure if the required tools are not found.
+
+commit a123aff72dcd98bdb3a0e3b2cdf3964b49a20186
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Mar 17 14:04:00 2013 +0100
+
+    README: Refer to INSTALL and new Building wiki page.
+
+commit 3a7ae082fcdd2610bf936f8fddcc07e93aa1a0ec
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Mar 7 11:32:30 2013 +0100
+
+    Support sdcc tool names as used on Fedora.
+    
+    Fedora (e.g. Fedora 18) names the sdcc tools like this:
+    
+     sdcc-sdcc, sdcc-sdcclib, sdcc-makebin, etc.
+
+commit 39ac5a27ab438ec17ff0198748141f50f08b72d8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Mar 3 19:57:18 2013 +0100
+
+    Fixup DESTDIR usage.
+    
+    Drop superfluous slash, otherwise the install directory would be e.g.
+    
+     /foo//usr/local/share/sigrok-firmware
+    
+    or
+    
+     //usr/local/share/sigrok-firmware
+    
+    depending on whether DESTDIR was set via "DESTDIR=/foo", or not.
+
+commit 8ca25313c231a0284b214ac31f8c1179286a8cc6
+Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
+Date:   Fri Feb 22 11:38:49 2013 -0600
+
+    buildsystem: Obey DESTDIR when running make install
+    
+    For more details, see:
+    http://www.gnu.org/prep/standards/html_node/DESTDIR.html
+    http://www.gnu.org/software/automake/manual/html_node/Extending.html
+    
+    This closes bug #67.
+
+commit 9e7a268db08095e2585d845a51a9e5c89ba90fbd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Feb 21 15:46:36 2013 +0100
+
+    Support older Cypress FX2 (not FX2LP) too.
+    
+    The Cypress FX2 chip is an older version of the FX2LP chip with a few
+    differences that might be relevant for fx2lafw, the major one being
+    that is has less internal SRAM.
+    
+    We adapt the linking step to work for both FX2 and FX2LP, thus
+    keeping only one set of *.fw files for both chip versions.
+    
+    Changes to the fx2lafw driver in libsigrok are not required.
+    
+    Some logic analyzer devices such as older USBee SX versions or more recent
+    devices which use a "fake" FX2LP (which is actually an FX2) need this.
+    
+    This closes bug #3.
+
+commit 0a7ae4e2b527279c927146dc7b99d9cfd39c1ed2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sat Jan 26 13:37:59 2013 +0100
+
+    NEWS: Add user-visible changes so far.
+
+commit 92c99f68cf5e37fe32b470d74d8e1937dab34e7f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sat Jan 26 13:36:36 2013 +0100
+
+    README: Add all build dependencies.
+
+commit 3cdd47225331282c0e1d37ba8d7b947e84f48d9e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sat Jan 26 13:15:47 2013 +0100
+
+    (Re-)add the convenience target 'distbin'.
+    
+    This creates a sigrok-firmware-fx2lafw-bin-x.y.z.tar.gz tarball containing
+    just the *.fw files, so that users don't have to build them manually.
+    
+    The normal 'make dist' produces a source code tarball, as usual.
+
+commit 36074319ac7c80ac0d80334b8664d0bd8e6dee90
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jan 9 19:34:06 2013 +0100
+
+    Use a standard autotools setup.
+    
+    fx2lafw now uses a standard autoconf/automake based build and
+    configuration system like most other sigrok subprojects (instead of two
+    sets of custom, not very portable Makefiles).
+    
+     $ ./configure && make && make install
+    
+    It now supports all the usual things one expects, for example:
+    
+     - The --prefix et. al. options to specify installation paths.
+    
+     - Standard set of 'make' targets, e.g. 'install', 'uninstall',
+       'dist', etc.
+    
+     - In-tree builds as well as out-of-tree builds.
+    
+     - Works pretty much everywhere portably, regardless of 'make'
+       implementation (GNU Make or BSD make or...) and regardless of shell
+       (bash, sh, dash, ksh, csh, ...).
+    
+     - The build output matches the usual 'silent rules' output of other
+       (sigrok / autotools) projects. Using 'make V=1' one can get the full
+       build output.
+
+commit 2b421d0ecf9ec717a6864da01a071d3c9bfeec7e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Nov 22 23:16:41 2012 +0100
+
+    Use makebin if objcopy is not available.
+    
+    Some systems might not have objcopy (e.g. on Mac OS it might not be
+    available per default). We use objcopy if it is found, otherwise we try
+    to use the 'makebin' utility (shipped with sdcc) instead.
+    
+    Thanks 'Harble' on IRC for the report.
+
+commit c899ab4fb5e623632d4a02d97a05a2dbb320942d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Oct 16 15:28:41 2012 +0200
+
+    Fix #include guard names.
+
+commit e323c15dc4d27d452602e147102e6cdfd4c7d0c3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Oct 16 15:24:29 2012 +0200
+
+    Add a HACKING file.
+
+commit 9b782efd3bbe88110dd47a8ccd7f8dd927ccdf36
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Oct 11 00:53:54 2012 +0200
+
+    Makefile: Update repo URL.
+
+commit a75447f1e3a1b8a2ee41bebea7b31df50fd94da6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Oct 10 23:58:33 2012 +0200
+
+    README: Add status, update URL, add more info.
+
+commit 9a556ec56e6b7b8a4c798142049b024ce40ded86
+Author: Ivan Fedorov <oxyum at oxyum.ru>
+Date:   Wed Aug 1 00:26:54 2012 +0400
+
+    Add basic support for USBee DX and clones
+
+commit 63f84b32e6f516e236b90f7b9100836bbd220bbd
+Author: Ivan Fedorov <oxyum at oxyum.ru>
+Date:   Wed Aug 1 00:24:16 2012 +0400
+
+    Add .gitignore
+
+commit d9531f65337ecc903759f9f55bc32719e93d2d27
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Jul 24 21:04:50 2012 +0200
+
+    Makefile: Add a 'distbin' target.
+    
+    This creates a sigrok-firmware-fx2lafw-bin-x.y.z.tar.gz tarball which
+    only contains pre-built *.fw files (and some docs), but no source code
+    of fx2lafw.
+    
+    This tarball can be provided as a convenience download for users who do
+    not want to mess with building their own firmware files from source.
+
+commit d319a25de291b75b6bb76463bdc1aa1c851182d8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Jul 24 16:36:30 2012 +0200
+
+    NEWS: Add today's date as release date for 0.1.0.
+
+commit fbc26f625b78af0335178f0f01d99f651c506484
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Jul 24 16:35:06 2012 +0200
+
+    Makefile.include: Fix build on MinGW/Windows.
+    
+    The trailing slash causes issues on MinGW/Windows, apparently.
+
+commit de1a21789295e0eaeebce1012ca968364364bee7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Mon Jul 23 15:40:25 2012 +0200
+
+    Update install instructions.
+
+commit 94ca1bed405209b1fa36466174449f07b14127ab
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Mon Jul 23 15:20:05 2012 +0200
+
+    Drop fx2lib files we don't really need.
+    
+    Document the origins and license of the fx2lib code more precisely.
+
+commit 0bac7de529ed84f6b2236e41f435c5a4cd86ff95
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Mon Jul 23 14:55:04 2012 +0200
+
+    Don't ship the .git/ directory in the tarball.
+
+commit d33eeacaf5129815c290146ba85b3a36c86f02fa
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Jul 22 18:29:48 2012 +0200
+
+    Fix 'make clean'.
+    
+    Things like "rm -f *.{asm,ihx,lnk,lst,map,mem,rel,rst,sym,adb,cdb,lib}"
+    aren't really portable or work everywhere.
+    
+    Also, invoke fx2lib's clean upon an fx2lafw clean.
+
+commit cd13b02dd60f0e93bd0ef7ef8e271c3b47a31117
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Jul 22 18:22:15 2012 +0200
+
+    Makefiles: Add missing "2>/dev/null" in some places.
+
+commit 4836f7921c83b4713e897ee8c38e48a4433325c4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun Jul 22 18:19:15 2012 +0200
+
+    s/make/$(MAKE)/ to fix build on FreeBSD.
+    
+    On FreeBSD (and possibly) elsewhere you'd invoke the build via "gmake",
+    thus hardcoded "make" invokations in our Makefiles will break the build.
+    
+    Use $(MAKE) everywhere, which always does the right thing.
+
+commit 6a90b4a9f172e4ba1b623e29e6267a6b2fe2b20c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 19:27:18 2012 +0200
+
+    Add initial NEWS file.
+
+commit d4c182415452e083b05daab41cb8ff71184f392b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 19:15:13 2012 +0200
+
+    Add 'dist' target which creates a tarball.
+
+commit 38abb1cbfea603add533f1a533e8166dfec3c370
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 19:05:42 2012 +0200
+
+    Makefile: Add a 'ChangeLog' target.
+
+commit a15c1f062cebebe9454f1dd69c6a257d15aeff46
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 19:02:29 2012 +0200
+
+    Makefile: Add an 'install' target.
+    
+    This installs all *.fw files into /usr/local/share/sigrok-firmware,
+    which can be overridden via DESTDIR, like this:
+    
+     make install DESTDIR=/tmp/foo
+
+commit 365795313f4f7f204f159f443e06847de7d48264
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 18:52:59 2012 +0200
+
+    Remove obsolete and unused DEBUG code.
+
+commit c7e02d8c24b6f89a274b33300dd47925f5ffb69f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Jul 17 17:47:56 2012 +0200
+
+    Cosmetics, update docs.
+
+commit cb87c238f743afa9e563740e1bec436ea839796e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 12:49:43 2012 +0200
+
+    Add missing #include guards.
+    
+    Without them there will be issues sooner or later, and the build _is_
+    broken already on MinGW without them.
+
+commit b8fa53aa1c203413c179a80c8513706a3155c7e8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 12:34:32 2012 +0200
+
+    Fix a left-over __data in our fx2lib copy.
+
+commit 8819f75c56450ef49739c3e968d70c7c777d9161
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 12:24:26 2012 +0200
+
+    Update fx2lafw code to work with recent sdcc.
+
+commit d1bee53d988c28311d2b9cc6c43c861c38cce67d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 12:16:21 2012 +0200
+
+    Support old and new sdcc/sdas8051/asx8051 versions.
+    
+    Tested on Debian with old and new sdcc (2.9.0 and 3.1.0).
+    
+    Testers for Fedora and other distros are welcome!
+
+commit 3608c1063d17c56c038434eba5a6b11f26e530b5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Jul 18 11:31:24 2012 +0200
+
+    Import fx2lib into fx2lafw directly.
+    
+    We want a local fx2lib copy in fx2lafw for various reasons, e.g. to make
+    life simpler for all distros (none of which ship any fx2lib packages,
+    and neither would it make sense to do so really), and as we'll want/need
+    local changes to fix build issues and possibly other stuff anyway.
+    
+    This copy of fx2lib is not the main upstream version from
+    
+      git://github.com/mulicheng/fx2lib.git
+    
+    which has been last updated in 2010, but rather from
+    
+      git://github.com/ubixum/fx2lib.git
+    
+    The only difference is that the latter contains one patch which fixes
+    some issues with more recent sdcc versions (interrupt vs. __interrupt,
+    _asm vs. __asm, xdata vs. __xdata__, and many others).
+    
+    The imported fx2lib copy is "416c104cbd" from Feb 12, 2012.
+
+commit 8b13135e5fd175911ad9d8283b17fc97fe0c7709
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Jun 26 01:47:27 2012 +0200
+
+    README: Update usage instructions.
+
+commit 5d492e1866e88087934a2d006af6fc7e5762fd0d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu May 10 23:55:33 2012 +0200
+
+    Cosmetics.
+
+commit daf6d940fca76d60e236f492ef95885966553bcf
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Mon May 7 15:58:04 2012 +0100
+
+    Support wide sampling
+
+commit fb08a72db5979d9b34e3f1bb59dd32aceb9bf32d
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Mon May 7 12:42:45 2012 +0100
+
+    Added support for 100kHz and 50kHz sampling
+
+commit 7563058183da25d5d968f5e43d4d098b34871e36
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Fri Apr 20 19:56:11 2012 +0100
+
+    Removed a magic number
+
+commit a371bdee728dac611e020aee9219a0b5af15b5af
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Thu Apr 19 21:02:50 2012 +0100
+
+    Made the DP state the DATA sample state
+
+commit 7dfad4cbb5d105ea49114d3134711a24bc2bf742
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Thu Apr 19 21:00:16 2012 +0100
+
+    Moved GPIF state generator code into helper functions
+
+commit c23ad6029b1a4262fa5ad07e962f693cd7cbea06
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun May 6 19:47:04 2012 +0200
+
+    fx2lafw: Support for querying REVID.
+
+commit 312f8b3466280bb789a597c9e6d2a1f7337c5e55
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sun May 6 17:10:23 2012 +0200
+
+    fx2lafw: Add Braintechnology USB-LPS support.
+
+commit 3211bba26b421c7cc11b35d3daef17ef05970429
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Apr 19 00:45:29 2012 +0200
+
+    cypress-fx2/Makefile: Add missing 'fx2lafw-' prefix.
+    
+    Otherwise the generated .fw filename will be incorrect.
+
+commit 572ac4c4c2e04fc12cf11dc1d60d528209f9919c
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Wed Apr 18 22:25:15 2012 +0100
+
+    Added support for Default Cypress FX2 without EEPROM
+
+commit a4d8b708a8cc30525c9148f77dc3d664a2d285f8
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Wed Apr 18 22:22:33 2012 +0100
+
+    Added dscr.inc to reduce duplication in dscr.a51 files
+
+commit cd29817daca53a88fd252198a90d7e806553d4d3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Apr 10 22:16:25 2012 +0200
+
+    Cosmetics, coding style.
+
+commit 18544912fb14f1beb10fe375aad9743a8e8df790
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Tue Apr 10 18:30:46 2012 +0100
+
+    Implemented CMD_GET_FW_VERSION
+
+commit f55de58e61972dc5510ddde42799e872f27ba198
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Apr 7 17:39:57 2012 +0100
+
+    Corrected a typo in the root makefile
+
+commit e086d6ee9d5b6c681c706b9c4f8353b54565abaf
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 24 12:46:29 2012 +0000
+
+    Removed unneeded declarations
+
+commit 8375421ce76f7170be575c3abdc1bbb71243a05a
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 24 12:36:41 2012 +0000
+
+    Added missing command to clean rule
+
+commit f7f91781e4d4d5543371d76bb295316a6655e535
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 24 12:29:25 2012 +0000
+
+    Moved main() into fx2lafw.c
+
+commit 00060cecdb4d3332f2a1a705436de3b6d08d1106
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 24 12:25:35 2012 +0000
+
+    Removed debug script
+
+commit 5a95b634a88e49ac269a731a2e8596931506b63a
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Wed Mar 14 22:21:13 2012 +0000
+
+    Upsized EP2 FIFO to 4x 1024
+
+commit 576c66275f9fbc419b6449a72dd870d29bb4bf31
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Wed Mar 14 21:44:08 2012 +0000
+
+    Removed debug routines - they turned out not to be so useful, and occupy valuable FIFO space
+
+commit 920d03436aee786fe4f366354f8ed0cb6432abe6
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Tue Mar 13 18:34:09 2012 +0000
+
+    Replaced gpif-capture with gpif-acquisition saleae-logic/Makefile
+
+commit 95550c959e60a61d27e65f978328f8adf63893d5
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Mon Mar 12 22:13:20 2012 +0000
+
+    Added support for USBee SX
+
+commit 75fd9ca5eeb560caa092d88c04f5b7da7dddfdb0
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Mon Mar 12 22:07:33 2012 +0000
+
+    Added rules to Makefile to convert firmware to binary
+
+commit 293d7e9e38e0a69ab8e51ab9601bfb0bd6c5c9b8
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 11 20:52:53 2012 +0000
+
+    Reset EP2 when GPIF acquisition completes
+
+commit baecf744abd88bde4e8badf5535872f58e3873d4
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 11 15:36:03 2012 +0000
+
+    Fixed GPIF waveform branch, and annotated population code
+
+commit d478dcbed58c157e790a32d26878f940ed5ec888
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 11 15:03:52 2012 +0000
+
+    Not need to SYNCDELAY after writing to GPIF_WAVE_DATA
+
+commit 7d028644be4df07ef4dc899b3e228755ecade924
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 11 15:03:06 2012 +0000
+
+    No need to populate reserved words
+
+commit 1e588d0627db7ba16458be72aba6961747b6a4d6
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 11 14:38:59 2012 +0000
+
+    Specify that one transaction will occur in each acquisition
+
+commit 2d62ae473486c48c3922c7eb644cc96b428d46b2
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 10 22:46:25 2012 +0000
+
+    Corrected EP2FIFOCFG setup
+
+commit 3b969d92f4cecf79ebe4289e0facb98dea9b844d
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 10 22:46:00 2012 +0000
+
+    Ensure GPIF is idle before reconfiguration
+
+commit 809dc77960b924ec0ee1fd884f670b21039aea59
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 10 22:45:16 2012 +0000
+
+    Do not read-modify-write IFCONFIG
+
+commit 8242a4d10ec4750820eff0eccc859188645b065a
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 4 18:01:25 2012 +0000
+
+    Do not change device id after firmware download
+
+commit 28d52f414aea134690fba92d62b40607e55550bf
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 4 14:50:28 2012 +0000
+
+    Renamed fx2lafw_run to fx2lafw_poll
+
+commit 2846a114f69c29a64dc7e6ae9d12195f8c4c18ab
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sun Mar 4 14:13:27 2012 +0000
+
+    Implemented sample rate control
+
+commit 3b6919fa4ed05ab312162e27ef8a2bc5ec5b7976
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 3 17:04:25 2012 +0000
+
+    Removed CMD_STOP and renumbered commands
+
+commit 64d4773073e3b40c7c4a4eef609df959fa7591c9
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 3 16:21:57 2012 +0000
+
+    Moved command definitions into command.h
+
+commit 8f5f7854a31be8928a33178cebe4c334d1c23451
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 3 15:00:27 2012 +0000
+
+    Removed CMD_SET_SAMPLRATE
+
+commit 421e7d6da138dc122cf33791f3631156f73cccd7
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Mar 3 10:15:46 2012 +0000
+
+    Generate GPIF WAVEDATA on demand
+
+commit e41576ec531630354c5b48ed0caa83caa1a4c14e
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Wed Feb 29 20:45:02 2012 +0000
+
+    Moved gpif code out to separate source file
+
+commit 91f1e17f79efcd2cea5e3d43efe4b339a664d830
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Feb 23 00:26:10 2012 +0100
+
+    Update README.
+
+commit 7ff5a031c021873a321d132fa61d260e21fe3a14
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Feb 23 00:18:48 2012 +0100
+
+    Move dscr.a51 to individual project subdirs.
+
+commit d2c3ea5ab6229485500ffa0cb50c61677193ed9f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Feb 23 00:16:44 2012 +0100
+
+    Move individual firmware projects to hw/ subdir.
+
+commit 6e078ef420ca8f2edbd51aa4f851d726d68ab7f6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Thu Feb 23 00:13:26 2012 +0100
+
+    Add saleae-logic/ subdir/project.
+
+commit 1b6280b73ded6e078ef9e39fbd3717dc9cfbb546
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Feb 22 23:54:30 2012 +0100
+
+    Add top-level Makefile.
+    
+    Also, rename fx2lafw.mk to Makefile.include.
+
+commit 106ee45c35ebae9b2ec9370813ab20cbbe22d2e2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Wed Feb 22 23:30:13 2012 +0100
+
+    Various cosmetics and bugfixes.
+
+commit a75a9ccb67defc791ccf9fdf73d4e149436dae3f
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 17:08:25 2012 +0000
+
+    Moved includes into a common include directory
+
+commit 9f8d67d93eeaddf2f18367f9c9d8cca26cbbb980
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 17:05:42 2012 +0000
+
+    Moved main() in cwav-usbeeax
+
+commit 60b99ccceb5ab9b7a7544b362794bf599a960d90
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 17:06:14 2012 +0000
+
+    Added root as an include directory
+
+commit 8f4a701f47ff5a17a2c8f79de59ddeb27656dbaa
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 18:05:25 2012 +0000
+
+    Added autovector include to fx2lafw header. Software will crash without it
+
+commit 2f5ee650e5ce9390e13a971ce9472b9696121bb7
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 17:00:19 2012 +0000
+
+    Added first device specific directory for the CWAV USBee AX
+
+commit 1cbff47d1d2c78f62e8adb0896a9cecef9574bdd
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 16:43:25 2012 +0000
+
+    Rearranged main() in preparation for split according to device versions
+
+commit bf40d70e45ba8bdd45d68a35e8e7d12a0ff1e8bf
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 09:29:34 2012 +0000
+
+    Implemented _assert
+
+commit 8ee491edbe31d980abe261307ef893bce9a16760
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 09:29:04 2012 +0000
+
+    Added INFO, WARN and ERR macros
+
+commit 4329f2ed3c366517be5ecbff95a83cf3998ea288
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 12:52:24 2012 +0000
+
+    Added a debug client
+
+commit c430e296be053c17d4d5f40c53378d401ab07a17
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Sat Feb 18 08:50:24 2012 +0000
+
+    Added basic debugf for sending debug messages over USB
+
+commit e1c8448f400a3f0099274c8f1ce4a0745f04d650
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date:   Wed Feb 15 20:12:37 2012 +0000
+
+    Allow path to fx2lib to be set with a variable
+
+commit c7283c28a0ce6757630624e366589f8ce90949f7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 21 01:44:50 2012 +0100
+
+    Draft how commands could be implemented.
+
+commit 4ad20a4c57699f7ea5ce88fc132feaf7471743c1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 21 01:30:33 2012 +0100
+
+    Eliminate EP1, commands should use EP0.
+    
+    The protocol should be implemented using control requests of type
+    'vendor-specific' (bmRequestType[6:5] = 2).
+
+commit bee5946d03f60500debb8923ac137981bd65e9cf
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 21 01:15:07 2012 +0100
+
+    Document USB language identifier document location.
+
+commit e7434142313d9f42fb476a13f08d379900ba5b2d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 21 01:12:03 2012 +0100
+
+    Use #defines for REVCTL bits.
+
+commit dc7ac8bfeea9cae7bbfee5839889a3b37f3d62f5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 21 00:55:23 2012 +0100
+
+    First somewhat working GPIF waveform and setup code.
+    
+    This samples data forever, and has no mechanism to detect or report lost
+    samples. This is just for testing purposes, do not use productively!
+
+commit fb0b6d28a7c5222d96b80cf68126cee77ec39e2e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Sat Feb 18 21:40:29 2012 +0100
+
+    First attempt at a sampling GPIF waveform (untested!).
+
+commit 060dc3fe95b5e167c3c09ba0e8bc164c2ec25d69
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 14 21:40:54 2012 +0100
+
+    README: Add git repo URL.
+
+commit d5f5ea7394647699061f7185c884328defff9b7d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date:   Tue Feb 14 21:22:55 2012 +0100
+
+    Initial version (work in progress).
+    
+    This does not work, yet.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2099840
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..4d859b1
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,332 @@
+##
+## This file is part of the sigrok-firmware-fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+## Copyright (C) 2015 Daniel Elstner <daniel.kitta at gmail.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+GNUMAKEFLAGS = --no-print-directory
+SUFFIXES = .a51 .c .fw .ihx .rel
+
+# Flags for firmware hex file generation
+SDCC_LINK_FLAGS = --code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl"-b DSCR_AREA=0x1e00" -Wl"-b INT2JT=0x1f00"
+
+# Include paths
+as_includes = -I$(srcdir)/include
+c_includes = -I$(srcdir)/include -I$(srcdir)/fx2lib/include
+
+# Binary firmware tarball basename
+distdir_bin = $(PACKAGE)-bin-$(VERSION)
+
+# Basename of directory stamp files
+dirstamp = .dirstamp
+
+dirstamps = \
+	fx2lib/lib/$(dirstamp) \
+	fx2lib/lib/interrupts/$(dirstamp) \
+	hw/braintechnology-usb-lps/$(dirstamp) \
+	hw/cwav-usbeeax/$(dirstamp) \
+	hw/cwav-usbeedx/$(dirstamp) \
+	hw/cwav-usbeesx/$(dirstamp) \
+	hw/cypress-fx2/$(dirstamp) \
+	hw/saleae-logic/$(dirstamp) \
+	hw/sigrok-fx2-8ch/$(dirstamp) \
+	hw/sigrok-fx2-16ch/$(dirstamp)
+
+# Final firmware files
+firmware_binaries = \
+	hw/braintechnology-usb-lps/fx2lafw-braintechnology-usb-lps.fw \
+	hw/cwav-usbeeax/fx2lafw-cwav-usbeeax.fw \
+	hw/cwav-usbeedx/fx2lafw-cwav-usbeedx.fw \
+	hw/cwav-usbeesx/fx2lafw-cwav-usbeesx.fw \
+	hw/cypress-fx2/fx2lafw-cypress-fx2.fw \
+	hw/saleae-logic/fx2lafw-saleae-logic.fw \
+	hw/sigrok-fx2-8ch/fx2lafw-sigrok-fx2-8ch.fw \
+	hw/sigrok-fx2-16ch/fx2lafw-sigrok-fx2-16ch.fw
+
+fx2lafw_headers = \
+	include/command.h \
+	include/dscr.inc \
+	include/fx2lafw.h \
+	include/gpif-acquisition.h
+
+fx2lafw_sources = \
+	fx2lafw.c \
+	gpif-acquisition.c
+
+fx2lafw_objects = \
+	fx2lafw.rel \
+	gpif-acquisition.rel
+
+fx2lib_headers = \
+	fx2lib/include/autovector.h \
+	fx2lib/include/delay.h \
+	fx2lib/include/eputils.h \
+	fx2lib/include/fx2ints.h \
+	fx2lib/include/fx2macros.h \
+	fx2lib/include/fx2regs.h \
+	fx2lib/include/fx2types.h \
+	fx2lib/include/gpif.h \
+	fx2lib/include/i2c.h \
+	fx2lib/include/lights.h \
+	fx2lib/include/serial.h \
+	fx2lib/include/setupdat.h
+
+fx2lib_sources = \
+	fx2lib/lib/delay.c \
+	fx2lib/lib/eputils.c \
+	fx2lib/lib/gpif.c \
+	fx2lib/lib/i2c.c \
+	fx2lib/lib/int4av.a51 \
+	fx2lib/lib/serial.c \
+	fx2lib/lib/delay.c \
+	fx2lib/lib/setupdat.c \
+	fx2lib/lib/usbav.a51
+
+fx2lib_objects = \
+	fx2lib/lib/delay.rel \
+	fx2lib/lib/eputils.rel \
+	fx2lib/lib/gpif.rel \
+	fx2lib/lib/i2c.rel \
+	fx2lib/lib/int4av.rel \
+	fx2lib/lib/serial.rel \
+	fx2lib/lib/delay.rel \
+	fx2lib/lib/setupdat.rel \
+	fx2lib/lib/usbav.rel
+
+fx2lib_ints_sources = \
+	fx2lib/lib/interrupts/ep0ack_isr.c \
+	fx2lib/lib/interrupts/ep0in_isr.c \
+	fx2lib/lib/interrupts/ep0out_isr.c \
+	fx2lib/lib/interrupts/ep0ping_isr.c \
+	fx2lib/lib/interrupts/ep1in_isr.c \
+	fx2lib/lib/interrupts/ep1out_isr.c \
+	fx2lib/lib/interrupts/ep1ping_isr.c \
+	fx2lib/lib/interrupts/ep2ef_isr.c \
+	fx2lib/lib/interrupts/ep2ff_isr.c \
+	fx2lib/lib/interrupts/ep2isoerr_isr.c \
+	fx2lib/lib/interrupts/ep2_isr.c \
+	fx2lib/lib/interrupts/ep2pf_isr.c \
+	fx2lib/lib/interrupts/ep2ping_isr.c \
+	fx2lib/lib/interrupts/ep4ef_isr.c \
+	fx2lib/lib/interrupts/ep4ff_isr.c \
+	fx2lib/lib/interrupts/ep4isoerr_isr.c \
+	fx2lib/lib/interrupts/ep4_isr.c \
+	fx2lib/lib/interrupts/ep4pf_isr.c \
+	fx2lib/lib/interrupts/ep4ping_isr.c \
+	fx2lib/lib/interrupts/ep6ef_isr.c \
+	fx2lib/lib/interrupts/ep6ff_isr.c \
+	fx2lib/lib/interrupts/ep6isoerr_isr.c \
+	fx2lib/lib/interrupts/ep6_isr.c \
+	fx2lib/lib/interrupts/ep6pf_isr.c \
+	fx2lib/lib/interrupts/ep6ping_isr.c \
+	fx2lib/lib/interrupts/ep8ef_isr.c \
+	fx2lib/lib/interrupts/ep8ff_isr.c \
+	fx2lib/lib/interrupts/ep8isoerr_isr.c \
+	fx2lib/lib/interrupts/ep8_isr.c \
+	fx2lib/lib/interrupts/ep8pf_isr.c \
+	fx2lib/lib/interrupts/ep8ping_isr.c \
+	fx2lib/lib/interrupts/errlimit_isr.c \
+	fx2lib/lib/interrupts/gpifdone_isr.c \
+	fx2lib/lib/interrupts/gpifwf_isr.c \
+	fx2lib/lib/interrupts/hispeed_isr.c \
+	fx2lib/lib/interrupts/ibn_isr.c \
+	fx2lib/lib/interrupts/sof_isr.c \
+	fx2lib/lib/interrupts/spare_isr.c \
+	fx2lib/lib/interrupts/sudav_isr.c \
+	fx2lib/lib/interrupts/suspend_isr.c \
+	fx2lib/lib/interrupts/sutok_isr.c \
+	fx2lib/lib/interrupts/usbreset_isr.c
+
+fx2lib_ints_objects = \
+	fx2lib/lib/interrupts/ep0ack_isr.rel \
+	fx2lib/lib/interrupts/ep0in_isr.rel \
+	fx2lib/lib/interrupts/ep0out_isr.rel \
+	fx2lib/lib/interrupts/ep0ping_isr.rel \
+	fx2lib/lib/interrupts/ep1in_isr.rel \
+	fx2lib/lib/interrupts/ep1out_isr.rel \
+	fx2lib/lib/interrupts/ep1ping_isr.rel \
+	fx2lib/lib/interrupts/ep2ef_isr.rel \
+	fx2lib/lib/interrupts/ep2ff_isr.rel \
+	fx2lib/lib/interrupts/ep2isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep2_isr.rel \
+	fx2lib/lib/interrupts/ep2pf_isr.rel \
+	fx2lib/lib/interrupts/ep2ping_isr.rel \
+	fx2lib/lib/interrupts/ep4ef_isr.rel \
+	fx2lib/lib/interrupts/ep4ff_isr.rel \
+	fx2lib/lib/interrupts/ep4isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep4_isr.rel \
+	fx2lib/lib/interrupts/ep4pf_isr.rel \
+	fx2lib/lib/interrupts/ep4ping_isr.rel \
+	fx2lib/lib/interrupts/ep6ef_isr.rel \
+	fx2lib/lib/interrupts/ep6ff_isr.rel \
+	fx2lib/lib/interrupts/ep6isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep6_isr.rel \
+	fx2lib/lib/interrupts/ep6pf_isr.rel \
+	fx2lib/lib/interrupts/ep6ping_isr.rel \
+	fx2lib/lib/interrupts/ep8ef_isr.rel \
+	fx2lib/lib/interrupts/ep8ff_isr.rel \
+	fx2lib/lib/interrupts/ep8isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep8_isr.rel \
+	fx2lib/lib/interrupts/ep8pf_isr.rel \
+	fx2lib/lib/interrupts/ep8ping_isr.rel \
+	fx2lib/lib/interrupts/errlimit_isr.rel \
+	fx2lib/lib/interrupts/gpifdone_isr.rel \
+	fx2lib/lib/interrupts/gpifwf_isr.rel \
+	fx2lib/lib/interrupts/hispeed_isr.rel \
+	fx2lib/lib/interrupts/ibn_isr.rel \
+	fx2lib/lib/interrupts/sof_isr.rel \
+	fx2lib/lib/interrupts/spare_isr.rel \
+	fx2lib/lib/interrupts/sudav_isr.rel \
+	fx2lib/lib/interrupts/suspend_isr.rel \
+	fx2lib/lib/interrupts/sutok_isr.rel \
+	fx2lib/lib/interrupts/usbreset_isr.rel
+
+fx2lib_libs = \
+	fx2lib/lib/fx2.lib \
+	fx2lib/lib/interrupts/ints.lib
+
+hw_sources = \
+	hw/braintechnology-usb-lps/dscr.a51 \
+	hw/cwav-usbeeax/dscr.a51 \
+	hw/cwav-usbeedx/dscr.a51 \
+	hw/cwav-usbeesx/dscr.a51 \
+	hw/cypress-fx2/dscr.a51 \
+	hw/saleae-logic/dscr.a51 \
+	hw/sigrok-fx2-8ch/dscr.a51 \
+	hw/sigrok-fx2-16ch/dscr.a51
+
+firmwaredir = $(datadir)/sigrok-firmware
+firmware_DATA = $(firmware_binaries)
+
+dist_noinst_DATA = $(fx2lafw_headers) $(fx2lafw_sources) $(fx2lib_headers) $(fx2lib_sources) $(fx2lib_ints_sources) $(hw_sources)
+dist_noinst_SCRIPTS = autogen.sh
+
+MOSTLYCLEANFILES = *.asm fx2lib/lib/*.asm fx2lib/lib/*.lib fx2lib/lib/interrupts/*.asm fx2lib/lib/interrupts/*.lib
+CLEANFILES = $(firmware_binaries)
+DISTCLEANFILES = $(dirstamps)
+
+# Custom silent rules prefixes
+SF_V_SDAS = $(sf_v_SDAS_ at AM_V@)
+sf_v_SDAS_ = $(sf_v_SDAS_ at AM_DEFAULT_V@)
+sf_v_SDAS_0 = @echo "  SDAS    " $@;
+sf_v_SDAS_1 =
+
+SF_V_SDCC = $(sf_v_SDCC_ at AM_V@)
+sf_v_SDCC_ = $(sf_v_SDCC_ at AM_DEFAULT_V@)
+sf_v_SDCC_0 = @echo "  SDCC    " $@;
+sf_v_SDCC_1 =
+
+.PHONY: dist-bin dist-changelog
+
+all-local: $(firmware_binaries)
+
+mostlyclean-local:
+	-$(AM_V_at)find . -type f '(' -name '*.ihx' -o -name '*.lk' \
+		-o -name '*.lst' -o -name '*.map' -o -name '*.mem' \
+		-o -name '*.rel' -o -name '*.rst' -o -name '*.sym' ')' \
+		-exec rm -f '{}' '+'
+
+dist-hook: dist-changelog
+
+dist-changelog:
+	$(AM_V_at)if test -d '$(top_srcdir)/.git'; then \
+		if git -C '$(top_srcdir)' log >.ChangeLog.tmp; \
+		then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
+		else rm -f .ChangeLog.tmp; exit 1; fi; \
+	else :; fi
+
+# Creates a convenience tarball with just the generated *.fw files, so that
+# the users don't have to build them manually.
+dist-bin: $(firmware_binaries)
+	-$(AM_V_at)rm -fr $(distdir_bin)
+	$(AM_V_at)$(MKDIR_P) $(distdir_bin)
+	$(AM_V_at)$(INSTALL_DATA) $(firmware_binaries) $(distdir_bin)
+	$(AM_V_at)$(INSTALL_DATA) $(srcdir)/COPYING $(srcdir)/COPYING.LESSER $(srcdir)/NEWS $(srcdir)/README $(distdir_bin)
+	$(AM_V_at)if test -d '$(top_srcdir)/.git'; \
+	then git -C '$(top_srcdir)' log > $(distdir_bin)/ChangeLog; \
+	else $(INSTALL_DATA) $(srcdir)/ChangeLog $(distdir_bin); fi
+	$(AM_V_at)tar -czf $(distdir_bin).tar.gz $(distdir_bin)
+	-$(AM_V_at)rm -fr $(distdir_bin)
+
+# List dependencies
+$(fx2lafw_objects): $(fx2lafw_headers)
+$(fx2lib_objects): fx2lib/lib/$(dirstamp) $(fx2lib_headers)
+$(fx2lib_ints_objects): fx2lib/lib/interrupts/$(dirstamp) $(fx2lib_headers)
+
+hw/braintechnology-usb-lps/dscr.rel: hw/braintechnology-usb-lps/$(dirstamp) include/dscr.inc
+hw/cwav-usbeeax/dscr.rel: hw/cwav-usbeeax/$(dirstamp) include/dscr.inc
+hw/cwav-usbeedx/dscr.rel: hw/cwav-usbeedx/$(dirstamp) include/dscr.inc
+hw/cwav-usbeesx/dscr.rel: hw/cwav-usbeesx/$(dirstamp) include/dscr.inc
+hw/cypress-fx2/dscr.rel: hw/cypress-fx2/$(dirstamp) include/dscr.inc
+hw/saleae-logic/dscr.rel: hw/saleae-logic/$(dirstamp) include/dscr.inc
+hw/sigrok-fx2-8ch/dscr.rel: hw/sigrok-fx2-8ch/$(dirstamp) include/dscr.inc
+hw/sigrok-fx2-16ch/dscr.rel: hw/sigrok-fx2-16ch/$(dirstamp) include/dscr.inc
+
+# Create build subdirectories
+$(dirstamps):
+	@stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
+	@: > $@
+
+fx2lib/lib/fx2.lib: $(fx2lib_objects)
+	-$(AM_V_at)rm -f $@
+	$(AM_V_GEN)$(SDCCLIB) $@ $(fx2lib_objects)
+
+fx2lib/lib/interrupts/ints.lib: $(fx2lib_ints_objects)
+	-$(AM_V_at)rm -f $@
+	$(AM_V_GEN)$(SDCCLIB) $@ $(fx2lib_ints_objects)
+
+hw/braintechnology-usb-lps/fx2lafw-braintechnology-usb-lps.ihx: hw/braintechnology-usb-lps/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/braintechnology-usb-lps/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cwav-usbeeax/fx2lafw-cwav-usbeeax.ihx: hw/cwav-usbeeax/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeeax/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cwav-usbeedx/fx2lafw-cwav-usbeedx.ihx: hw/cwav-usbeedx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeedx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cwav-usbeesx/fx2lafw-cwav-usbeesx.ihx: hw/cwav-usbeesx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeesx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cypress-fx2/fx2lafw-cypress-fx2.ihx: hw/cypress-fx2/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cypress-fx2/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/saleae-logic/fx2lafw-saleae-logic.ihx: hw/saleae-logic/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/saleae-logic/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/sigrok-fx2-8ch/fx2lafw-sigrok-fx2-8ch.ihx: hw/sigrok-fx2-8ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/sigrok-fx2-8ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/sigrok-fx2-16ch/fx2lafw-sigrok-fx2-16ch.ihx: hw/sigrok-fx2-16ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/sigrok-fx2-16ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+.a51.rel:
+	$(SF_V_SDAS)$(SDAS8051) -glos $(as_includes) $@ $<
+
+.c.rel:
+	$(SF_V_SDCC)$(SDCC) -mmcs51 $(c_includes) -c $< -o $@
+
+if FOUND_OBJCOPY
+.ihx.fw:
+	$(AM_V_GEN)$(OBJCOPY) -Iihex $< -Obinary $@
+else
+if FOUND_MAKEBIN
+.ihx.fw:
+	$(AM_V_GEN)$(MAKEBIN) -p < $< > $@
+endif
+endif
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..2cc5478
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,925 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(dist_noinst_SCRIPTS) \
+	$(dist_noinst_DATA) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SCRIPTS = $(dist_noinst_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(firmwaredir)"
+DATA = $(dist_noinst_DATA) $(firmware_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+	$(top_srcdir)/autostuff/install-sh \
+	$(top_srcdir)/autostuff/missing AUTHORS COPYING COPYING.LESSER \
+	ChangeLog INSTALL NEWS README autostuff/install-sh \
+	autostuff/missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEBIN = @MAKEBIN@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJCOPY = @OBJCOPY@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SDAS8051 = @SDAS8051@
+SDCC = @SDCC@
+SDCCLIB = @SDCCLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+GNUMAKEFLAGS = --no-print-directory
+SUFFIXES = .a51 .c .fw .ihx .rel
+
+# Flags for firmware hex file generation
+SDCC_LINK_FLAGS = --code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl"-b DSCR_AREA=0x1e00" -Wl"-b INT2JT=0x1f00"
+
+# Include paths
+as_includes = -I$(srcdir)/include
+c_includes = -I$(srcdir)/include -I$(srcdir)/fx2lib/include
+
+# Binary firmware tarball basename
+distdir_bin = $(PACKAGE)-bin-$(VERSION)
+
+# Basename of directory stamp files
+dirstamp = .dirstamp
+dirstamps = \
+	fx2lib/lib/$(dirstamp) \
+	fx2lib/lib/interrupts/$(dirstamp) \
+	hw/braintechnology-usb-lps/$(dirstamp) \
+	hw/cwav-usbeeax/$(dirstamp) \
+	hw/cwav-usbeedx/$(dirstamp) \
+	hw/cwav-usbeesx/$(dirstamp) \
+	hw/cypress-fx2/$(dirstamp) \
+	hw/saleae-logic/$(dirstamp) \
+	hw/sigrok-fx2-8ch/$(dirstamp) \
+	hw/sigrok-fx2-16ch/$(dirstamp)
+
+
+# Final firmware files
+firmware_binaries = \
+	hw/braintechnology-usb-lps/fx2lafw-braintechnology-usb-lps.fw \
+	hw/cwav-usbeeax/fx2lafw-cwav-usbeeax.fw \
+	hw/cwav-usbeedx/fx2lafw-cwav-usbeedx.fw \
+	hw/cwav-usbeesx/fx2lafw-cwav-usbeesx.fw \
+	hw/cypress-fx2/fx2lafw-cypress-fx2.fw \
+	hw/saleae-logic/fx2lafw-saleae-logic.fw \
+	hw/sigrok-fx2-8ch/fx2lafw-sigrok-fx2-8ch.fw \
+	hw/sigrok-fx2-16ch/fx2lafw-sigrok-fx2-16ch.fw
+
+fx2lafw_headers = \
+	include/command.h \
+	include/dscr.inc \
+	include/fx2lafw.h \
+	include/gpif-acquisition.h
+
+fx2lafw_sources = \
+	fx2lafw.c \
+	gpif-acquisition.c
+
+fx2lafw_objects = \
+	fx2lafw.rel \
+	gpif-acquisition.rel
+
+fx2lib_headers = \
+	fx2lib/include/autovector.h \
+	fx2lib/include/delay.h \
+	fx2lib/include/eputils.h \
+	fx2lib/include/fx2ints.h \
+	fx2lib/include/fx2macros.h \
+	fx2lib/include/fx2regs.h \
+	fx2lib/include/fx2types.h \
+	fx2lib/include/gpif.h \
+	fx2lib/include/i2c.h \
+	fx2lib/include/lights.h \
+	fx2lib/include/serial.h \
+	fx2lib/include/setupdat.h
+
+fx2lib_sources = \
+	fx2lib/lib/delay.c \
+	fx2lib/lib/eputils.c \
+	fx2lib/lib/gpif.c \
+	fx2lib/lib/i2c.c \
+	fx2lib/lib/int4av.a51 \
+	fx2lib/lib/serial.c \
+	fx2lib/lib/delay.c \
+	fx2lib/lib/setupdat.c \
+	fx2lib/lib/usbav.a51
+
+fx2lib_objects = \
+	fx2lib/lib/delay.rel \
+	fx2lib/lib/eputils.rel \
+	fx2lib/lib/gpif.rel \
+	fx2lib/lib/i2c.rel \
+	fx2lib/lib/int4av.rel \
+	fx2lib/lib/serial.rel \
+	fx2lib/lib/delay.rel \
+	fx2lib/lib/setupdat.rel \
+	fx2lib/lib/usbav.rel
+
+fx2lib_ints_sources = \
+	fx2lib/lib/interrupts/ep0ack_isr.c \
+	fx2lib/lib/interrupts/ep0in_isr.c \
+	fx2lib/lib/interrupts/ep0out_isr.c \
+	fx2lib/lib/interrupts/ep0ping_isr.c \
+	fx2lib/lib/interrupts/ep1in_isr.c \
+	fx2lib/lib/interrupts/ep1out_isr.c \
+	fx2lib/lib/interrupts/ep1ping_isr.c \
+	fx2lib/lib/interrupts/ep2ef_isr.c \
+	fx2lib/lib/interrupts/ep2ff_isr.c \
+	fx2lib/lib/interrupts/ep2isoerr_isr.c \
+	fx2lib/lib/interrupts/ep2_isr.c \
+	fx2lib/lib/interrupts/ep2pf_isr.c \
+	fx2lib/lib/interrupts/ep2ping_isr.c \
+	fx2lib/lib/interrupts/ep4ef_isr.c \
+	fx2lib/lib/interrupts/ep4ff_isr.c \
+	fx2lib/lib/interrupts/ep4isoerr_isr.c \
+	fx2lib/lib/interrupts/ep4_isr.c \
+	fx2lib/lib/interrupts/ep4pf_isr.c \
+	fx2lib/lib/interrupts/ep4ping_isr.c \
+	fx2lib/lib/interrupts/ep6ef_isr.c \
+	fx2lib/lib/interrupts/ep6ff_isr.c \
+	fx2lib/lib/interrupts/ep6isoerr_isr.c \
+	fx2lib/lib/interrupts/ep6_isr.c \
+	fx2lib/lib/interrupts/ep6pf_isr.c \
+	fx2lib/lib/interrupts/ep6ping_isr.c \
+	fx2lib/lib/interrupts/ep8ef_isr.c \
+	fx2lib/lib/interrupts/ep8ff_isr.c \
+	fx2lib/lib/interrupts/ep8isoerr_isr.c \
+	fx2lib/lib/interrupts/ep8_isr.c \
+	fx2lib/lib/interrupts/ep8pf_isr.c \
+	fx2lib/lib/interrupts/ep8ping_isr.c \
+	fx2lib/lib/interrupts/errlimit_isr.c \
+	fx2lib/lib/interrupts/gpifdone_isr.c \
+	fx2lib/lib/interrupts/gpifwf_isr.c \
+	fx2lib/lib/interrupts/hispeed_isr.c \
+	fx2lib/lib/interrupts/ibn_isr.c \
+	fx2lib/lib/interrupts/sof_isr.c \
+	fx2lib/lib/interrupts/spare_isr.c \
+	fx2lib/lib/interrupts/sudav_isr.c \
+	fx2lib/lib/interrupts/suspend_isr.c \
+	fx2lib/lib/interrupts/sutok_isr.c \
+	fx2lib/lib/interrupts/usbreset_isr.c
+
+fx2lib_ints_objects = \
+	fx2lib/lib/interrupts/ep0ack_isr.rel \
+	fx2lib/lib/interrupts/ep0in_isr.rel \
+	fx2lib/lib/interrupts/ep0out_isr.rel \
+	fx2lib/lib/interrupts/ep0ping_isr.rel \
+	fx2lib/lib/interrupts/ep1in_isr.rel \
+	fx2lib/lib/interrupts/ep1out_isr.rel \
+	fx2lib/lib/interrupts/ep1ping_isr.rel \
+	fx2lib/lib/interrupts/ep2ef_isr.rel \
+	fx2lib/lib/interrupts/ep2ff_isr.rel \
+	fx2lib/lib/interrupts/ep2isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep2_isr.rel \
+	fx2lib/lib/interrupts/ep2pf_isr.rel \
+	fx2lib/lib/interrupts/ep2ping_isr.rel \
+	fx2lib/lib/interrupts/ep4ef_isr.rel \
+	fx2lib/lib/interrupts/ep4ff_isr.rel \
+	fx2lib/lib/interrupts/ep4isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep4_isr.rel \
+	fx2lib/lib/interrupts/ep4pf_isr.rel \
+	fx2lib/lib/interrupts/ep4ping_isr.rel \
+	fx2lib/lib/interrupts/ep6ef_isr.rel \
+	fx2lib/lib/interrupts/ep6ff_isr.rel \
+	fx2lib/lib/interrupts/ep6isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep6_isr.rel \
+	fx2lib/lib/interrupts/ep6pf_isr.rel \
+	fx2lib/lib/interrupts/ep6ping_isr.rel \
+	fx2lib/lib/interrupts/ep8ef_isr.rel \
+	fx2lib/lib/interrupts/ep8ff_isr.rel \
+	fx2lib/lib/interrupts/ep8isoerr_isr.rel \
+	fx2lib/lib/interrupts/ep8_isr.rel \
+	fx2lib/lib/interrupts/ep8pf_isr.rel \
+	fx2lib/lib/interrupts/ep8ping_isr.rel \
+	fx2lib/lib/interrupts/errlimit_isr.rel \
+	fx2lib/lib/interrupts/gpifdone_isr.rel \
+	fx2lib/lib/interrupts/gpifwf_isr.rel \
+	fx2lib/lib/interrupts/hispeed_isr.rel \
+	fx2lib/lib/interrupts/ibn_isr.rel \
+	fx2lib/lib/interrupts/sof_isr.rel \
+	fx2lib/lib/interrupts/spare_isr.rel \
+	fx2lib/lib/interrupts/sudav_isr.rel \
+	fx2lib/lib/interrupts/suspend_isr.rel \
+	fx2lib/lib/interrupts/sutok_isr.rel \
+	fx2lib/lib/interrupts/usbreset_isr.rel
+
+fx2lib_libs = \
+	fx2lib/lib/fx2.lib \
+	fx2lib/lib/interrupts/ints.lib
+
+hw_sources = \
+	hw/braintechnology-usb-lps/dscr.a51 \
+	hw/cwav-usbeeax/dscr.a51 \
+	hw/cwav-usbeedx/dscr.a51 \
+	hw/cwav-usbeesx/dscr.a51 \
+	hw/cypress-fx2/dscr.a51 \
+	hw/saleae-logic/dscr.a51 \
+	hw/sigrok-fx2-8ch/dscr.a51 \
+	hw/sigrok-fx2-16ch/dscr.a51
+
+firmwaredir = $(datadir)/sigrok-firmware
+firmware_DATA = $(firmware_binaries)
+dist_noinst_DATA = $(fx2lafw_headers) $(fx2lafw_sources) $(fx2lib_headers) $(fx2lib_sources) $(fx2lib_ints_sources) $(hw_sources)
+dist_noinst_SCRIPTS = autogen.sh
+MOSTLYCLEANFILES = *.asm fx2lib/lib/*.asm fx2lib/lib/*.lib fx2lib/lib/interrupts/*.asm fx2lib/lib/interrupts/*.lib
+CLEANFILES = $(firmware_binaries)
+DISTCLEANFILES = $(dirstamps)
+
+# Custom silent rules prefixes
+SF_V_SDAS = $(sf_v_SDAS_ at AM_V@)
+sf_v_SDAS_ = $(sf_v_SDAS_ at AM_DEFAULT_V@)
+sf_v_SDAS_0 = @echo "  SDAS    " $@;
+sf_v_SDAS_1 = 
+SF_V_SDCC = $(sf_v_SDCC_ at AM_V@)
+sf_v_SDCC_ = $(sf_v_SDCC_ at AM_DEFAULT_V@)
+sf_v_SDCC_0 = @echo "  SDCC    " $@;
+sf_v_SDCC_1 = 
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .a51 .c .fw .ihx .rel
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+install-firmwareDATA: $(firmware_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(firmware_DATA)'; test -n "$(firmwaredir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(firmwaredir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(firmwaredir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(firmwaredir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(firmwaredir)" || exit $$?; \
+	done
+
+uninstall-firmwareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(firmware_DATA)'; test -n "$(firmwaredir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(firmwaredir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@case `sed 15q $(srcdir)/NEWS` in \
+	*"$(VERSION)"*) : ;; \
+	*) \
+	  echo "NEWS not updated; not releasing" 1>&2; \
+	  exit 1;; \
+	esac
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__post_remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__post_remove_distdir)
+
+dist-tarZ: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+
+dist-shar: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_remove_distdir)
+
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build/sub \
+	  && ../../configure \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	    --srcdir=../.. --prefix="$$dc_install_base" \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__post_remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA) all-local
+installdirs:
+	for dir in "$(DESTDIR)$(firmwaredir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-firmwareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-firmwareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am all-local am--refresh check check-am clean \
+	clean-generic cscopelist-am ctags-am dist dist-all dist-bzip2 \
+	dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+	dist-zip distcheck distclean distclean-generic distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-am info \
+	info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-firmwareDATA install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-local pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am uninstall-firmwareDATA
+
+.PRECIOUS: Makefile
+
+
+.PHONY: dist-bin dist-changelog
+
+all-local: $(firmware_binaries)
+
+mostlyclean-local:
+	-$(AM_V_at)find . -type f '(' -name '*.ihx' -o -name '*.lk' \
+		-o -name '*.lst' -o -name '*.map' -o -name '*.mem' \
+		-o -name '*.rel' -o -name '*.rst' -o -name '*.sym' ')' \
+		-exec rm -f '{}' '+'
+
+dist-hook: dist-changelog
+
+dist-changelog:
+	$(AM_V_at)if test -d '$(top_srcdir)/.git'; then \
+		if git -C '$(top_srcdir)' log >.ChangeLog.tmp; \
+		then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
+		else rm -f .ChangeLog.tmp; exit 1; fi; \
+	else :; fi
+
+# Creates a convenience tarball with just the generated *.fw files, so that
+# the users don't have to build them manually.
+dist-bin: $(firmware_binaries)
+	-$(AM_V_at)rm -fr $(distdir_bin)
+	$(AM_V_at)$(MKDIR_P) $(distdir_bin)
+	$(AM_V_at)$(INSTALL_DATA) $(firmware_binaries) $(distdir_bin)
+	$(AM_V_at)$(INSTALL_DATA) $(srcdir)/COPYING $(srcdir)/COPYING.LESSER $(srcdir)/NEWS $(srcdir)/README $(distdir_bin)
+	$(AM_V_at)if test -d '$(top_srcdir)/.git'; \
+	then git -C '$(top_srcdir)' log > $(distdir_bin)/ChangeLog; \
+	else $(INSTALL_DATA) $(srcdir)/ChangeLog $(distdir_bin); fi
+	$(AM_V_at)tar -czf $(distdir_bin).tar.gz $(distdir_bin)
+	-$(AM_V_at)rm -fr $(distdir_bin)
+
+# List dependencies
+$(fx2lafw_objects): $(fx2lafw_headers)
+$(fx2lib_objects): fx2lib/lib/$(dirstamp) $(fx2lib_headers)
+$(fx2lib_ints_objects): fx2lib/lib/interrupts/$(dirstamp) $(fx2lib_headers)
+
+hw/braintechnology-usb-lps/dscr.rel: hw/braintechnology-usb-lps/$(dirstamp) include/dscr.inc
+hw/cwav-usbeeax/dscr.rel: hw/cwav-usbeeax/$(dirstamp) include/dscr.inc
+hw/cwav-usbeedx/dscr.rel: hw/cwav-usbeedx/$(dirstamp) include/dscr.inc
+hw/cwav-usbeesx/dscr.rel: hw/cwav-usbeesx/$(dirstamp) include/dscr.inc
+hw/cypress-fx2/dscr.rel: hw/cypress-fx2/$(dirstamp) include/dscr.inc
+hw/saleae-logic/dscr.rel: hw/saleae-logic/$(dirstamp) include/dscr.inc
+hw/sigrok-fx2-8ch/dscr.rel: hw/sigrok-fx2-8ch/$(dirstamp) include/dscr.inc
+hw/sigrok-fx2-16ch/dscr.rel: hw/sigrok-fx2-16ch/$(dirstamp) include/dscr.inc
+
+# Create build subdirectories
+$(dirstamps):
+	@stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
+	@: > $@
+
+fx2lib/lib/fx2.lib: $(fx2lib_objects)
+	-$(AM_V_at)rm -f $@
+	$(AM_V_GEN)$(SDCCLIB) $@ $(fx2lib_objects)
+
+fx2lib/lib/interrupts/ints.lib: $(fx2lib_ints_objects)
+	-$(AM_V_at)rm -f $@
+	$(AM_V_GEN)$(SDCCLIB) $@ $(fx2lib_ints_objects)
+
+hw/braintechnology-usb-lps/fx2lafw-braintechnology-usb-lps.ihx: hw/braintechnology-usb-lps/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/braintechnology-usb-lps/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cwav-usbeeax/fx2lafw-cwav-usbeeax.ihx: hw/cwav-usbeeax/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeeax/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cwav-usbeedx/fx2lafw-cwav-usbeedx.ihx: hw/cwav-usbeedx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeedx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cwav-usbeesx/fx2lafw-cwav-usbeesx.ihx: hw/cwav-usbeesx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cwav-usbeesx/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/cypress-fx2/fx2lafw-cypress-fx2.ihx: hw/cypress-fx2/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/cypress-fx2/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/saleae-logic/fx2lafw-saleae-logic.ihx: hw/saleae-logic/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/saleae-logic/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/sigrok-fx2-8ch/fx2lafw-sigrok-fx2-8ch.ihx: hw/sigrok-fx2-8ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/sigrok-fx2-8ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+hw/sigrok-fx2-16ch/fx2lafw-sigrok-fx2-16ch.ihx: hw/sigrok-fx2-16ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+	$(AM_V_GEN)$(SDCC) -mmcs51 $(SDCC_LINK_FLAGS) -o $@ hw/sigrok-fx2-16ch/dscr.rel $(fx2lafw_objects) $(fx2lib_libs)
+
+.a51.rel:
+	$(SF_V_SDAS)$(SDAS8051) -glos $(as_includes) $@ $<
+
+.c.rel:
+	$(SF_V_SDCC)$(SDCC) -mmcs51 $(c_includes) -c $< -o $@
+
+ at FOUND_OBJCOPY_TRUE@.ihx.fw:
+ at FOUND_OBJCOPY_TRUE@	$(AM_V_GEN)$(OBJCOPY) -Iihex $< -Obinary $@
+ at FOUND_MAKEBIN_TRUE@@FOUND_OBJCOPY_FALSE at .ihx.fw:
+ at FOUND_MAKEBIN_TRUE@@FOUND_OBJCOPY_FALSE@	$(AM_V_GEN)$(MAKEBIN) -p < $< > $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..652924b
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,47 @@
+0.1.3 (2015-11-26)
+------------------
+
+ * README: Drop references to obsolete sigrok-commits mailing list.
+ * Build system:
+     - Use non-recursive Make setup.
+     - Simplify and/or improve various parts of the build system.
+     - configure: Check the sdcc version (bug #696).
+ * Add firmware files for FX2 devices with official sigrok VID/PID:
+     - 1D50:608C: fx2lafw-sigrok-fx2-8ch.fw
+     - 1D50:608D: fx2lafw-sigrok-fx2-16ch.fw
+   The USB VID/PID pairs are allocated for fx2lafw via the OpenMoko project:
+   http://wiki.openmoko.org/wiki/USB_Product_IDs
+
+0.1.2 (2014-05-06)
+------------------
+
+ * Fix an issue which lead to the data pins not being tri-stated after an
+   aquisition (when the GPIF is idle) but rather being driven.
+ * Bump the firmware version (major.minor) to 1.1. This version is
+   backwards-compatible and doesn't require host-side (libsigrok) changes.
+
+0.1.1 (2013-04-16)
+------------------
+
+ * Add support for the USBee DX. Only digital sampling is supported (as is
+   the case for all other supported devices so far). Analog data acquisition
+   is currently not implemented.
+ * Add support for devices with the older Cypress CY7C68013 (FX2) chip
+   instead of the more recent Cypress CY7C68013A (FX2LP). See also:
+   http://sigrok.org/wiki/Fx2lafw#Cypress_FX2_vs._FX2LP
+ * Convert to a standard autotools based build/configuration system.
+   Installation is now: ./configure && make && make install
+ * README: Update status, website URLs, requirements, etc.
+ * Add the usual HACKING, AUTHORS, and INSTALL files.
+ * Add a 'distbin' Make target, which creates a convenience tarball
+   containing just the generated *.fw files.
+ * Document the download location for the pre-built firmware files tarball.
+ * If 'objcopy' is not found, try to use sdcc's 'makebin' instead.
+   This fixes the build e.g. on some Mac OS X systems without 'objcopy'.
+ * Add support for differently named sdcc tools on various distros.
+
+0.1.0 (2012-07-24)
+------------------
+
+ * Initial release.
+
diff --git a/README b/README
new file mode 100644
index 0000000..404fc23
--- /dev/null
+++ b/README
@@ -0,0 +1,124 @@
+-------------------------------------------------------------------------------
+README
+-------------------------------------------------------------------------------
+
+The sigrok project aims at creating a portable, cross-platform,
+Free/Libre/Open-Source signal analysis software suite that supports various
+device types (such as logic analyzers, oscilloscopes, multimeters, and more).
+
+sigrok-firmware-fx2lafw is a Free/Libre/Open-source firmware for logic
+analyzers based on the Cypress EZ-USB FX2(LP) chip.
+
+
+Status
+------
+
+sigrok-firmware-fx2lafw is in a usable state and has had official
+tarball releases.
+
+
+Requirements
+------------
+
+ - git
+ - make
+ - autoconf >= 2.63
+ - automake >= 1.11
+ - sdcc (>= 2.9.0)
+
+Notes:
+
+ - In order to build fx2lafw you need the 'sdcc' compiler (>= 2.9.0).
+   On Debian you can install it via:
+
+     $ apt-get install sdcc
+
+   This project has been tested to work with sdcc 2.9 and 3.x.
+
+ - You need libsigrok >= 0.1.1 in order to make use of fx2lafw. Earlier
+   versions didn't have support for FX2 devices using this firmware.
+
+
+Building and installing
+-----------------------
+
+In order to get the sigrok-firmware-fx2lafw source code and build it, run:
+
+ $ git clone git://sigrok.org/sigrok-firmware-fx2lafw
+ $ cd sigrok-firmware-fx2lafw
+ $ ./autogen.sh
+ $ ./configure
+ $ make
+
+For installing sigrok-firmware-fx2lafw:
+
+ $ make install
+
+The generated *.fw files are installed into /usr/local/share/sigrok-firmware.
+
+You can override the install location like this:
+
+ $ ./configure --prefix=/usr
+
+See INSTALL or the following wiki page for more (OS-specific) instructions:
+
+ http://sigrok.org/wiki/Building
+
+
+Pre-built firmware files
+------------------------
+
+There are also pre-built firmware files that can be used without having
+to build them from source. You can download those from SourceForge:
+
+  http://sourceforge.net/projects/sigrok/files/binary/sigrok-firmware-fx2lafw/
+
+
+fx2lib
+------
+
+The fx2lafw code uses a (slightly modified) "fx2lib" helper library.
+
+It was imported into fx2lafw from
+
+  git://github.com/ubixum/fx2lib.git
+
+as of Feb 12, 2012 (git hash "416c104cbd").
+
+The following files/directories were removed, as they're not needed
+for our purposes: CHANGELOG, COPYING*, docs/, examples/, fw/, and utils/.
+
+
+Copyright and license
+---------------------
+
+sigrok-firmware-fx2lafw is licensed under the terms of the GNU General Public
+License (GPL), version 2 or later.
+
+It uses additional helper code (fx2lib), licensed under the GNU LGPL
+(version 2.1 or later).
+
+While some individual source code files are licensed under the LGPLv2.1+, and
+some files are licensed under the GPLv2+, this doesn't change the fact that
+the firmware as a whole is licensed under the terms of the GPLv2+.
+
+Please see the individual source files for the full list of copyright holders.
+
+
+Mailing list
+------------
+
+ https://lists.sourceforge.net/lists/listinfo/sigrok-devel
+
+
+IRC
+---
+
+You can find the sigrok developers in the #sigrok IRC channel on Freenode.
+
+
+Website
+-------
+
+ http://sigrok.org/wiki/Fx2lafw
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..c24039f
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,773 @@
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.15], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES([CXX])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES([OBJC])],
+		  [m4_define([AC_PROG_OBJC],
+			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+		  [_AM_DEPENDENCIES([OBJCXX])],
+		  [m4_define([AC_PROG_OBJCXX],
+			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
+  rm -rf conftest.dir
+
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..69e0767
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+##
+## This file is part of the sigrok-firmware-fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+autoreconf --force --install --verbose "$srcdir"
diff --git a/autostuff/install-sh b/autostuff/install-sh
new file mode 100755
index 0000000..59990a1
--- /dev/null
+++ b/autostuff/install-sh
@@ -0,0 +1,508 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2014-09-12.12; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab='	'
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
+
+    -o) chowncmd="$chownprog $2"
+        shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
+
+    -T) is_target_a_directory=never;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --) shift
+        break;;
+
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call 'install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+        u_plus_rw=
+      else
+        u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+        u_plus_rw=
+      else
+        u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for 'test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      dstdir=`dirname "$dst"`
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            # $RANDOM is not portable (e.g. dash);  use it when possible to
+            # lower collision chance
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
+            # create the $tmpdir first (and fail if unsuccessful) to make sure
+            # that nobody tries to guess the $tmpdir name.
+            if (umask $mkdir_umask &&
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      set -f
+      set fnord $dstdir
+      shift
+      set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       set +f &&
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/autostuff/missing b/autostuff/missing
new file mode 100755
index 0000000..f62bbae
--- /dev/null
+++ b/autostuff/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try '$0 --help' for more information"
+  exit 1
+fi
+
+case $1 in
+
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
+
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..5a8782c
--- /dev/null
+++ b/configure
@@ -0,0 +1,3908 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for sigrok-firmware-fx2lafw 0.1.3.
+#
+# Report bugs to <sigrok-devel at lists.sourceforge.net>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and
+$0: sigrok-devel at lists.sourceforge.net about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+as_awk_strverscmp='
+  # Use only awk features that work with 7th edition Unix awk (1978).
+  # My, what an old awk you have, Mr. Solaris!
+  END {
+    while (length(v1) && length(v2)) {
+      # Set d1 to be the next thing to compare from v1, and likewise for d2.
+      # Normally this is a single character, but if v1 and v2 contain digits,
+      # compare them as integers and fractions as strverscmp does.
+      if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
+	# Split v1 and v2 into their leading digit string components d1 and d2,
+	# and advance v1 and v2 past the leading digit strings.
+	for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
+	for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
+	d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
+	d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
+	if (d1 ~ /^0/) {
+	  if (d2 ~ /^0/) {
+	    # Compare two fractions.
+	    while (d1 ~ /^0/ && d2 ~ /^0/) {
+	      d1 = substr(d1, 2); len1--
+	      d2 = substr(d2, 2); len2--
+	    }
+	    if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
+	      # The two components differ in length, and the common prefix
+	      # contains only leading zeros.  Consider the longer to be less.
+	      d1 = -len1
+	      d2 = -len2
+	    } else {
+	      # Otherwise, compare as strings.
+	      d1 = "x" d1
+	      d2 = "x" d2
+	    }
+	  } else {
+	    # A fraction is less than an integer.
+	    exit 1
+	  }
+	} else {
+	  if (d2 ~ /^0/) {
+	    # An integer is greater than a fraction.
+	    exit 2
+	  } else {
+	    # Compare two integers.
+	    d1 += 0
+	    d2 += 0
+	  }
+	}
+      } else {
+	# The normal case, without worrying about digits.
+	d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
+	d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
+      }
+      if (d1 < d2) exit 1
+      if (d1 > d2) exit 2
+    }
+    # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
+    # which mishandles some comparisons of empty strings to integers.
+    if (length(v2)) exit 1
+    if (length(v1)) exit 2
+  }
+'
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='sigrok-firmware-fx2lafw'
+PACKAGE_TARNAME='sigrok-firmware-fx2lafw'
+PACKAGE_VERSION='0.1.3'
+PACKAGE_STRING='sigrok-firmware-fx2lafw 0.1.3'
+PACKAGE_BUGREPORT='sigrok-devel at lists.sourceforge.net'
+PACKAGE_URL='http://www.sigrok.org'
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+SDAS8051
+FOUND_MAKEBIN_FALSE
+FOUND_MAKEBIN_TRUE
+FOUND_OBJCOPY_FALSE
+FOUND_OBJCOPY_TRUE
+MAKEBIN
+OBJCOPY
+SDCCLIB
+SDCC
+LN_S
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir runstatedir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures sigrok-firmware-fx2lafw 0.1.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root
+                          [DATAROOTDIR/doc/sigrok-firmware-fx2lafw]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of sigrok-firmware-fx2lafw 0.1.3:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+
+Report bugs to <sigrok-devel at lists.sourceforge.net>.
+sigrok-firmware-fx2lafw home page: <http://www.sigrok.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+sigrok-firmware-fx2lafw configure 0.1.3
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by sigrok-firmware-fx2lafw $as_me 0.1.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in autostuff "$srcdir"/autostuff; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in autostuff \"$srcdir\"/autostuff" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+# We require at least automake 1.11 (needed for 'silent rules').
+am__api_version='1.15'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+	&& test "$*" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='sigrok-firmware-fx2lafw'
+ VERSION='0.1.3'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=0;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
+# On Fedora, all sdcc tools have an 'sdcc-' prefix in the filename.
+for ac_prog in sdcc sdcc-sdcc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_SDCC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$SDCC"; then
+  ac_cv_prog_SDCC="$SDCC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_SDCC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+SDCC=$ac_cv_prog_SDCC
+if test -n "$SDCC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDCC" >&5
+$as_echo "$SDCC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$SDCC" && break
+done
+
+if test "x$SDCC" = x; then :
+  as_fn_error $? "cannot find sdcc." "$LINENO" 5
+fi
+
+for ac_prog in sdcclib sdcc-sdcclib
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_SDCCLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$SDCCLIB"; then
+  ac_cv_prog_SDCCLIB="$SDCCLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_SDCCLIB="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+SDCCLIB=$ac_cv_prog_SDCCLIB
+if test -n "$SDCCLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDCCLIB" >&5
+$as_echo "$SDCCLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$SDCCLIB" && break
+done
+
+if test "x$SDCCLIB" = x; then :
+  as_fn_error $? "cannot find sdcclib." "$LINENO" 5
+fi
+
+sf_sdcc_version=`$SDCC --version | sed -n 's/.* \([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\) .*/\1/p;q' 2>&5`
+as_arg_v1=$sf_sdcc_version
+as_arg_v2=2.9.0
+awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
+case $? in #(
+  1) :
+    as_fn_error $? "At least version 2.9.0 of sdcc is required." "$LINENO" 5 ;; #(
+  0) :
+     ;; #(
+  2) :
+     ;; #(
+  *) :
+     ;;
+esac
+
+for ac_prog in objcopy
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJCOPY+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJCOPY"; then
+  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_OBJCOPY="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJCOPY=$ac_cv_prog_OBJCOPY
+if test -n "$OBJCOPY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
+$as_echo "$OBJCOPY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$OBJCOPY" && break
+done
+
+for ac_prog in makebin sdcc-makebin
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MAKEBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MAKEBIN"; then
+  ac_cv_prog_MAKEBIN="$MAKEBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MAKEBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MAKEBIN=$ac_cv_prog_MAKEBIN
+if test -n "$MAKEBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEBIN" >&5
+$as_echo "$MAKEBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MAKEBIN" && break
+done
+
+if test "x$OBJCOPY$MAKEBIN" = x; then :
+  as_fn_error $? "cannot find objcopy or makebin." "$LINENO" 5
+fi
+
+ if test "x$OBJCOPY" != x; then
+  FOUND_OBJCOPY_TRUE=
+  FOUND_OBJCOPY_FALSE='#'
+else
+  FOUND_OBJCOPY_TRUE='#'
+  FOUND_OBJCOPY_FALSE=
+fi
+
+ if test "x$MAKEBIN" != x; then
+  FOUND_MAKEBIN_TRUE=
+  FOUND_MAKEBIN_FALSE='#'
+else
+  FOUND_MAKEBIN_TRUE='#'
+  FOUND_MAKEBIN_FALSE=
+fi
+
+
+# The sdcc 8051 assembler binary has/had different names:
+# Newer sdcc, Debian / Ubuntu: sdas8051
+# Newer sdcc, Fedora: sdcc-sdas8051
+# Older sdcc: asx8051
+for ac_prog in sdas8051 sdcc-sdas8051 asx8051
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_SDAS8051+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$SDAS8051"; then
+  ac_cv_prog_SDAS8051="$SDAS8051" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_SDAS8051="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+SDAS8051=$ac_cv_prog_SDAS8051
+if test -n "$SDAS8051"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDAS8051" >&5
+$as_echo "$SDAS8051" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$SDAS8051" && break
+done
+
+if test "x$SDAS8051" = x; then :
+  as_fn_error $? "cannot find sdas8051." "$LINENO" 5
+fi
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+
+if test -z "${FOUND_OBJCOPY_TRUE}" && test -z "${FOUND_OBJCOPY_FALSE}"; then
+  as_fn_error $? "conditional \"FOUND_OBJCOPY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${FOUND_MAKEBIN_TRUE}" && test -z "${FOUND_MAKEBIN_FALSE}"; then
+  as_fn_error $? "conditional \"FOUND_MAKEBIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by sigrok-firmware-fx2lafw $as_me 0.1.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <sigrok-devel at lists.sourceforge.net>.
+sigrok-firmware-fx2lafw home page: <http://www.sigrok.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+sigrok-firmware-fx2lafw config.status 0.1.3
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X "  :F $CONFIG_FILES      "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+  esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+cat >&6 <<_EOF
+
+sigrok-firmware-fx2lafw configuration summary:
+ - Package version................. $PACKAGE_VERSION
+ - Prefix.......................... $prefix
+
+Compile configuration:
+ - C compiler...................... $SDCC
+ - C compiler version.............. $sf_sdcc_version
+
+_EOF
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..6a8f8be
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,78 @@
+##
+## This file is part of the sigrok-firmware-fx2lafw project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+# We require at least autoconf 2.63 (AC_INIT format changed there).
+AC_PREREQ([2.63])
+
+AC_INIT([sigrok-firmware-fx2lafw], [0.1.3],
+	[sigrok-devel at lists.sourceforge.net],
+	[sigrok-firmware-fx2lafw], [http://www.sigrok.org])
+AC_CONFIG_AUX_DIR([autostuff])
+
+# We require at least automake 1.11 (needed for 'silent rules').
+AM_INIT_AUTOMAKE([1.11 -Wall -Werror no-define subdir-objects check-news])
+AM_SILENT_RULES([yes])
+
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+# On Fedora, all sdcc tools have an 'sdcc-' prefix in the filename.
+AC_CHECK_PROGS([SDCC], [sdcc sdcc-sdcc])
+AS_IF([test "x$SDCC" = x],
+	[AC_MSG_ERROR([cannot find sdcc.])])
+
+AC_CHECK_PROGS([SDCCLIB], [sdcclib sdcc-sdcclib])
+AS_IF([test "x$SDCCLIB" = x],
+	[AC_MSG_ERROR([cannot find sdcclib.])])
+
+sf_sdcc_version=`$SDCC --version | sed -n 's/.* \([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\) .*/\1/p;q' 2>&AS_MESSAGE_LOG_FD`
+AS_VERSION_COMPARE([$sf_sdcc_version], [2.9.0],
+	[AC_MSG_ERROR([At least version 2.9.0 of sdcc is required.])])
+
+AC_CHECK_PROGS([OBJCOPY], [objcopy])
+AC_CHECK_PROGS([MAKEBIN], [makebin sdcc-makebin])
+AS_IF([test "x$OBJCOPY$MAKEBIN" = x],
+	[AC_MSG_ERROR([cannot find objcopy or makebin.])])
+
+AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != x])
+AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != x])
+
+# The sdcc 8051 assembler binary has/had different names:
+# Newer sdcc, Debian / Ubuntu: sdas8051
+# Newer sdcc, Fedora: sdcc-sdas8051
+# Older sdcc: asx8051
+AC_CHECK_PROGS([SDAS8051], [sdas8051 sdcc-sdas8051 asx8051])
+AS_IF([test "x$SDAS8051" = x],
+	[AC_MSG_ERROR([cannot find sdas8051.])])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
+cat >&AS_MESSAGE_FD <<_EOF
+
+sigrok-firmware-fx2lafw configuration summary:
+ - Package version................. $PACKAGE_VERSION
+ - Prefix.......................... $prefix
+
+Compile configuration:
+ - C compiler...................... $SDCC
+ - C compiler version.............. $sf_sdcc_version
+
+_EOF
diff --git a/fx2lafw.c b/fx2lafw.c
new file mode 100644
index 0000000..79de096
--- /dev/null
+++ b/fx2lafw.c
@@ -0,0 +1,279 @@
+/*
+ * This file is part of the sigrok-firmware-fx2lafw project.
+ *
+ * Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+/*
+ * fx2lafw is an open-source firmware for Cypress FX2 based logic analyzers.
+ *
+ * It is written in C, using fx2lib as helper library, and sdcc as compiler.
+ * The code is licensed under the terms of the GNU GPL, version 2 or later.
+ *
+ * Technical notes:
+ *
+ *  - We use the FX2 in GPIF mode to sample the data (asynchronously).
+ *  - We use the internal 48MHz clock for GPIF.
+ *  - The 8 channels/pins we sample (the GPIF data bus) are PB0-PB7,
+ *    or PB0-PB7 + PD0-PD7 for 16-channel sampling. 
+ *  - Endpoint 2 (quad-buffered) is used for data transfers from FX2 to host.
+ *
+ * Documentation:
+ *
+ *  - See http://sigrok.org/wiki/Fx2lafw
+ */
+
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <delay.h>
+#include <setupdat.h>
+#include <eputils.h>
+#include <gpif.h>
+#include <command.h>
+#include <fx2lafw.h>
+#include <gpif-acquisition.h>
+
+/* ... */
+volatile __bit got_sud;
+BYTE vendor_command;
+
+static void setup_endpoints(void)
+{
+	/* Setup EP2 (IN). */
+	EP2CFG = (1 << 7) |		  /* EP is valid/activated */
+		 (1 << 6) |		  /* EP direction: IN */
+		 (1 << 5) | (0 << 4) |	  /* EP Type: bulk */
+		 (1 << 3) |		  /* EP buffer size: 1024 */
+		 (0 << 2) |		  /* Reserved. */
+		 (0 << 1) | (0 << 0);	  /* EP buffering: quad buffering */
+	SYNCDELAY();
+
+	/* Disable all other EPs (EP1, EP4, EP6, and EP8). */
+	EP1INCFG &= ~bmVALID;
+	SYNCDELAY();
+	EP1OUTCFG &= ~bmVALID;
+	SYNCDELAY();
+	EP4CFG &= ~bmVALID;
+	SYNCDELAY();
+	EP6CFG &= ~bmVALID;
+	SYNCDELAY();
+	EP8CFG &= ~bmVALID;
+	SYNCDELAY();
+
+	/* EP2: Reset the FIFOs. */
+	/* Note: RESETFIFO() gets the EP number WITHOUT bit 7 set/cleared. */
+	RESETFIFO(0x02)
+
+	/* EP2: Enable AUTOIN mode. Set FIFO width to 8bits. */
+	EP2FIFOCFG = bmAUTOIN;
+	SYNCDELAY();
+
+	/* EP2: Auto-commit 512 (0x200) byte packets (due to AUTOIN = 1). */
+	EP2AUTOINLENH = 0x02;
+	SYNCDELAY();
+	EP2AUTOINLENL = 0x00;
+	SYNCDELAY();
+
+	/* EP2: Set the GPIF flag to 'full'. */
+	EP2GPIFFLGSEL = (1 << 1) | (0 << 1);
+	SYNCDELAY();
+}
+
+static void send_fw_version(void)
+{
+	/* Populate the buffer. */
+	struct version_info *const vi = (struct version_info *)EP0BUF;
+	vi->major = FX2LAFW_VERSION_MAJOR;
+	vi->minor = FX2LAFW_VERSION_MINOR;
+
+	/* Send the message. */
+	EP0BCH = 0;
+	EP0BCL = sizeof(struct version_info);
+}
+
+static void send_revid_version(void)
+{
+	uint8_t *p;
+
+	/* Populate the buffer. */
+	p = (uint8_t *)EP0BUF;
+	*p = REVID;
+
+	/* Send the message. */
+	EP0BCH = 0;
+	EP0BCL = 1;
+}
+
+BOOL handle_vendorcommand(BYTE cmd)
+{
+	/* Protocol implementation */
+	switch (cmd) {
+	case CMD_START:
+		vendor_command = cmd;
+		EP0BCL = 0;
+		return TRUE;
+		break;
+	case CMD_GET_FW_VERSION:
+		send_fw_version();
+		return TRUE;
+		break;
+	case CMD_GET_REVID_VERSION:
+		send_revid_version();
+		return TRUE;
+		break;
+	}
+
+	return FALSE;
+}
+
+BOOL handle_get_interface(BYTE ifc, BYTE *alt_ifc)
+{
+	/* We only support interface 0, alternate interface 0. */
+	if (ifc != 0)
+		return FALSE;
+
+	*alt_ifc = 0;
+	return TRUE;
+}
+
+BOOL handle_set_interface(BYTE ifc, BYTE alt_ifc)
+{
+	/* We only support interface 0, alternate interface 0. */
+	if (ifc != 0 || alt_ifc != 0)
+		return FALSE;
+
+	/* Perform procedure from TRM, section 2.3.7: */
+
+	/* (1) TODO. */
+
+	/* (2) Reset data toggles of the EPs in the interface. */
+	/* Note: RESETTOGGLE() gets the EP number WITH bit 7 set/cleared. */
+	RESETTOGGLE(0x82);
+
+	/* (3) Restore EPs to their default conditions. */
+	/* Note: RESETFIFO() gets the EP number WITHOUT bit 7 set/cleared. */
+	RESETFIFO(0x02);
+	/* TODO */
+
+	/* (4) Clear the HSNAK bit. Not needed, fx2lib does this. */
+
+	return TRUE;
+}
+
+BYTE handle_get_configuration(void)
+{
+	/* We only support configuration 1. */
+	return 1;
+}
+
+BOOL handle_set_configuration(BYTE cfg)
+{
+	/* We only support configuration 1. */
+	return (cfg == 1) ? TRUE : FALSE;
+}
+
+void sudav_isr(void) __interrupt SUDAV_ISR
+{
+	got_sud = TRUE;
+	CLEAR_SUDAV();
+}
+
+void sof_isr(void) __interrupt SOF_ISR __using 1
+{
+	CLEAR_SOF();
+}
+
+void usbreset_isr(void) __interrupt USBRESET_ISR
+{
+	handle_hispeed(FALSE);
+	CLEAR_USBRESET();
+}
+
+void hispeed_isr(void) __interrupt HISPEED_ISR
+{
+	handle_hispeed(TRUE);
+	CLEAR_HISPEED();
+}
+
+void fx2lafw_init(void)
+{
+	/* Set DYN_OUT and ENH_PKT bits, as recommended by the TRM. */
+	REVCTL = bmNOAUTOARM | bmSKIPCOMMIT;
+
+	got_sud = FALSE;
+	vendor_command = 0;
+
+	/* Renumerate. */
+	RENUMERATE_UNCOND();
+
+	SETCPUFREQ(CLK_48M);
+
+	USE_USB_INTS();
+
+	/* TODO: Does the order of the following lines matter? */
+	ENABLE_SUDAV();
+	ENABLE_SOF();
+	ENABLE_HISPEED();
+	ENABLE_USBRESET();
+
+	/* Global (8051) interrupt enable. */
+	EA = 1;
+
+	/* Setup the endpoints. */
+	setup_endpoints();
+
+	/* Put the FX2 into GPIF master mode and setup the GPIF. */
+	gpif_init_la();
+}
+
+void fx2lafw_poll(void)
+{
+	if (got_sud) {
+		handle_setupdata();
+		got_sud = FALSE;
+	}
+
+	if (vendor_command) {
+		switch (vendor_command) {
+		case CMD_START:
+			if ((EP0CS & bmEPBUSY) != 0)
+				break;
+
+			if (EP0BCL == sizeof(struct cmd_start_acquisition)) {
+				gpif_acquisition_start(
+				 (const struct cmd_start_acquisition *)EP0BUF);
+			}
+
+			/* Acknowledge the vendor command. */
+			vendor_command = 0;
+			break;
+		default:
+			/* Unimplemented command. */
+			vendor_command = 0;
+			break;
+		}
+	}
+
+	gpif_poll();
+}
+
+void main(void)
+{
+	fx2lafw_init();
+	while (1)
+		fx2lafw_poll();
+}
diff --git a/fx2lib/include/autovector.h b/fx2lib/include/autovector.h
new file mode 100644
index 0000000..cc0c504
--- /dev/null
+++ b/fx2lib/include/autovector.h
@@ -0,0 +1,218 @@
+// Copyright (C) 2010 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+
+/** \file usbjt.h
+ *
+ * To use usbjt, you must tell the linker where to put the IN2JT.
+ * It must lie on a page boundary or your interrupts won't work right.
+ *
+ * example:
+ * -Wl"-b INT2JT = 0x1A00"
+ *
+ * Make sure that INT2JT doesn't overlap your other code!
+ *
+ * Unlike the standard fx2 interrupts (\ref fx2ints.h), the autovectored
+ * interrupts are defined in assemply and have pre-written function names.
+ * Be sure to override the functions defined in this header or your 
+ * interrupt handler will not be called.
+ **/
+
+#ifndef USBJT_H
+#define USBJT_H
+
+#include "fx2regs.h"
+
+
+
+// this causes usbjt to be included from the lib
+// not used for anything
+extern volatile BYTE INT2JT;
+extern volatile BYTE INT4JT;
+/**
+ * Enable all interrupts (EA=1) separate from this macro.
+ * This macro causes the autovector assembly for int2 interrupts
+ * to be overlayed at 0x43.  In addition, the jump table for the
+ * interrupts will be included in the firmware.  The jump table
+ * must lie on a page boundary.  This is done by passing the linker
+ * arguments to sdcc.
+ *
+ * \code
+ *   sdcc <files> -Wl"-b INT2JT = 0xaddr"
+ * \endcode
+ **/
+#define USE_USB_INTS() {BYTE dummy=INT2JT;\
+                        EUSB=1;\
+                        INTSETUP|=bmAV2EN;}
+/** This macro causes the autovector assemby for int4 to be overlayed
+ * at 0x53.  Don't use this if you want external pin generated int4 interrupts
+ * and want to define your own interrupt handler.  It is possible to use
+ * usb interrupts with autovectoring and not use GPIF interrupts but GPIF
+ * interrupts require the USB jump table.  (You can't USE your own usb interrupt
+ * handler if you want to enable GPIF interrupts.)
+ **/
+#define USE_GPIF_INTS() {BYTE dummy=INT4JT;\
+                        EIEX4=1;\
+                        INTSETUP|=bmAV4EN|INT4IN;}
+             
+
+
+#define CLEAR_USBINT() EXIF &= ~0x10
+#define CLEAR_GPIF() EXIF &= ~0x40
+
+#define ENABLE_SUDAV() USBIE|=bmSUDAV
+#define CLEAR_SUDAV() CLEAR_USBINT(); USBIRQ=bmSUDAV
+
+#define ENABLE_SUTOK() USBIE|=bmSUTOK;
+#define CLEAR_SUTOK() CLEAR_USBINT(); USBIRQ=bmSUTOK
+
+#define ENABLE_SOF() USBIE|=bmSOF
+#define CLEAR_SOF() CLEAR_USBINT(); USBIRQ=bmSOF
+
+#define ENABLE_SUSPEND() USBIE|=bmSUSP
+#define CLEAR_SUSPEND() CLEAR_USBINT(); USBIRQ=bmSUSP
+
+#define ENABLE_USBRESET() USBIE|= bmURES
+#define CLEAR_USBRESET() CLEAR_USBINT(); USBIRQ=bmURES
+
+#define ENABLE_HISPEED() USBIE|=bmHSGRANT
+#define CLEAR_HISPEED() CLEAR_USBINT(); USBIRQ=bmHSGRANT
+
+#define ENABLE_EP1IN() EPIE|=bmEP1IN
+#define CLEAR_EP1IN() CLEAR_USBINT(); EPIRQ=bmEP1IN
+
+#define ENABLE_EP2() EPIE|=bmEP2
+#define CLEAR_EP2() CLEAR_USBINT(); EPIRQ=bmEP2
+
+#define ENABLE_EP6() EPIE|=bmEP6
+#define CLEAR_EP6() CLEAR_USBINT(); EPIRQ=bmEP6
+
+#define ENABLE_EP2ISOERR() USBERRIE |= bmISOEP2
+#define CLEAR_EP2ISOERR() CLEAR_USBINT(); USBERRIRQ = bmISOEP2
+
+#define ENABLE_EP6PF() EP6FIFOIE |= bmBIT2
+#define CLEAR_EP6PF() CLEAR_GPIF(); EP6FIFOIRQ=bmBIT2
+
+#define ENABLE_EP6FF() EP6FIFOIE |= bmBIT0
+#define CLEAR_EP6FF() CLEAR_GPIF(); EP6FIFOIRQ=bmBIT0
+
+#define ENABLE_GPIFDONE() GPIFIE |= 0x01;
+#define CLEAR_GPIFDONE() CLEAR_GPIF(); GPIFIRQ = 0x01;
+
+#define ENABLE_GPIFWF() GPIFIE |= 0x02;
+#define CLEAR_GPIFWF() GLEAR_GPIF(); GPIFIRQ = 0x02;
+
+/**
+ * ez-usb has 12 built in ISRs, to get
+ * sdcc to put these USB ISRs immediately
+ * after the other ISRs (and not waste space)
+ * we start at 13
+ **/
+typedef enum {
+  SUDAV_ISR=13,
+  SOF_ISR,
+  SUTOK_ISR,
+  SUSPEND_ISR,
+  USBRESET_ISR,
+  HISPEED_ISR,
+  EP0ACK_ISR,  
+  EP0IN_ISR,
+  EP0OUT_ISR,
+  EP1IN_ISR,
+  EP1OUT_ISR,
+  EP2_ISR,
+  EP4_ISR,
+  EP6_ISR,
+  EP8_ISR,
+  IBN_ISR,
+  EP0PING_ISR,
+  EP1PING_ISR,
+  EP2PING_ISR,
+  EP4PING_ISR,
+  EP6PING_ISR,
+  EP8PING_ISR,
+  ERRLIMIT_ISR,  
+  EP2ISOERR_ISR,
+  EP4ISOERR_ISR,
+  EP6ISOERR_ISR,
+  EP8ISOERR_ISR,
+  RESERVED_ISR,
+  EP2PF_ISR,
+  EP4PF_ISR,
+  EP6PF_ISR,
+  EP8PF_ISR,
+  EP2EF_ISR,
+  EP4EF_ISR,
+  EP6EF_ISR,
+  EP8EF_ISR,
+  EP2FF_ISR,
+  EP4FF_ISR,
+  EP6FF_ISR,
+  EP8FF_ISR,
+  GPIFDONE_ISR,
+  GPIFWF_ISR
+} USB_ISR;
+
+// you must include the predef of these in the file with your main
+// so lets just define them here
+
+void sudav_isr() __interrupt SUDAV_ISR;
+void sof_isr() __interrupt SOF_ISR;
+void sutok_isr() __interrupt SUTOK_ISR;
+void suspend_isr() __interrupt SUSPEND_ISR;
+void usbreset_isr() __interrupt USBRESET_ISR;
+void hispeed_isr() __interrupt HISPEED_ISR;
+void ep0ack_isr() __interrupt EP0ACK_ISR;
+void ep0in_isr() __interrupt EP0IN_ISR;
+void ep0out_isr() __interrupt EP0OUT_ISR;
+void ep1in_isr() __interrupt EP1IN_ISR;
+void ep1out_isr() __interrupt EP1OUT_ISR;
+void ep2_isr() __interrupt EP2_ISR;
+void ep4_isr() __interrupt EP4_ISR;
+void ep6_isr() __interrupt EP6_ISR;
+void ep8_isr() __interrupt EP8_ISR;
+void ibn_isr() __interrupt IBN_ISR;
+void ep0ping_isr() __interrupt EP0PING_ISR;
+void ep1ping_isr() __interrupt EP1PING_ISR;
+void ep2ping_isr() __interrupt EP2PING_ISR;
+void ep4ping_isr() __interrupt EP4PING_ISR;
+void ep6ping_isr() __interrupt EP6PING_ISR;
+void ep8ping_isr() __interrupt EP8PING_ISR;
+void errlimit_isr() __interrupt ERRLIMIT_ISR;
+void ep2isoerr_isr() __interrupt EP2ISOERR_ISR;
+void ep4isoerr_isr() __interrupt EP4ISOERR_ISR;
+void ep6isoerr_isr() __interrupt EP6ISOERR_ISR;
+void ep8isoerr_isr() __interrupt EP8ISOERR_ISR;
+void spare_isr() __interrupt RESERVED_ISR; // not used
+// gpif ints
+void ep2pf_isr() __interrupt EP2PF_ISR;
+void ep4pf_isr() __interrupt EP4PF_ISR;
+void ep6pf_isr() __interrupt EP6PF_ISR;
+void ep8pf_isr() __interrupt EP8PF_ISR;
+void ep2ef_isr() __interrupt EP2EF_ISR;
+void ep4ef_isr() __interrupt EP4EF_ISR;
+void ep6ef_isr() __interrupt EP6EF_ISR;
+void ep8ef_isr() __interrupt EP8EF_ISR;
+void ep2ff_isr() __interrupt EP2FF_ISR;
+void ep4ff_isr() __interrupt EP4FF_ISR;
+void ep6ff_isr() __interrupt EP6FF_ISR;
+void ep8ff_isr() __interrupt EP8FF_ISR;
+void gpifdone_isr() __interrupt GPIFDONE_ISR;
+void gpifwf_isr() __interrupt GPIFWF_ISR;
+
+#endif
+
diff --git a/fx2lib/include/delay.h b/fx2lib/include/delay.h
new file mode 100644
index 0000000..a1bb36b
--- /dev/null
+++ b/fx2lib/include/delay.h
@@ -0,0 +1,91 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *  Functions for causing delays.
+ * */
+
+
+#ifndef DELAY_H
+#define DELAY_H
+
+#include "fx2types.h"
+
+/**
+ * 0-65536 millis
+ **/
+void delay(WORD millis);
+
+/**
+ * See TRM 15-14,15-15
+ * some registers (r/w) require syncdelay after
+ *
+ * up to the programmer to determine which sync is needed.
+ * for standard 48mhz clock w/ 48mhz IFCONFIG 3 nops is sufficient.
+ *
+ * slower clock and faster ifclock require more delay
+ *
+ * min delay = roof ( 1.5 x (ifclock/clkout + 1) )
+ *
+ * Minimum IFCLOCK is 5mhz but you have to use an
+ * external clock source to go below 30mhz
+ * 
+ * IFCLKSRC 1 = internal, 0=external
+ * 3048mhz 0 = 30mhz, 1 = 48mzh
+ *
+ * Figure your own sync delay out if IFCLKSRC=0.
+ **/
+
+#define NOP __asm nop __endasm
+
+/**
+ * SYNCDELAY2 can work for the following clock speeds
+ *
+ * ifclk/clk
+ * \li 48/12
+ *
+ * ceil(1.5 * (20.8 / 83.3 + 1)) = 2
+ *
+ * \see NOP
+ *
+ **/
+#define SYNCDELAY2 NOP; NOP
+
+/**
+ * SYNCDELAY3 can work for the following clock speeds
+ *
+ * ifcfg/clk
+ * \li 48/24
+ * \li 48/48
+ * \li 30/12
+ * \li 30/24
+ *
+ * \see NOP
+ **/
+#define SYNCDELAY3 NOP; NOP; NOP
+
+/**
+ * SYNCDELAY4 should be used for the following speeds
+ *
+ * ifcfg/clk
+ * \li 30/48
+ *
+ * \see NOP
+ **/
+#define SYNCDELAY4 NOP; NOP; NOP; NOP
+
+#endif
+
diff --git a/fx2lib/include/eputils.h b/fx2lib/include/eputils.h
new file mode 100644
index 0000000..57a3e21
--- /dev/null
+++ b/fx2lib/include/eputils.h
@@ -0,0 +1,86 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *  Functions and macros for working with endpoints.
+ * */
+
+#ifndef EPUTILS_H
+#define EPUTILS_H
+
+#include "fx2types.h"
+
+/**
+ * NOTE you can't use these unless you define SYNCDELAY 
+ * as a macro or function.  The reason is that SYNCDELAY
+ * needs to be longer or shorter depending on your IFCONFIG
+ * settings.  
+ * See delay.h
+ *
+ * Example:
+ * \code
+ *  #define SYNCDELAY() SYNCDELAY4 // SYNCDELAY4 from delay.h
+ * \endcode
+ *
+ *
+ **/
+
+/**
+ * Stalls EP0.
+ **/
+#define STALLEP0() EP0CS |= bmEPSTALL
+
+/**
+ * \brief Reset the toggle on an endpoint.
+ * To use this, the endpoint needs bit 8 to be IN=1,OUT=0
+ **/
+#define RESETTOGGLE(ep) TOGCTL = (ep&0x0F) + ((ep&0x80)>>3); TOGCTL |= bmRESETTOGGLE
+
+
+/**
+ * RESETFIFO should not use 0x80|epnum for IN endpoints
+ * Only use 0x02, 0x04, 0x06, 0x06 for ep value
+ **/
+#define RESETFIFO(ep) {FIFORESET=0x80; SYNCDELAY();\
+                       FIFORESET=ep; SYNCDELAY();\
+                       FIFORESET=0x00; SYNCDELAY();}
+/**
+ * Quickly reset all endpoint FIFOS.
+ **/
+#define RESETFIFOS() {FIFORESET=0x80; SYNCDELAY();\
+                     FIFORESET=0x02; SYNCDELAY();\
+                     FIFORESET=0x04; SYNCDELAY();\
+                     FIFORESET=0x06; SYNCDELAY();\
+                     FIFORESET=0x08; SYNCDELAY();\
+                     FIFORESET=0x00; SYNCDELAY();}
+
+/**
+ * Continually read available bytes from endpoint0 into dst, wait
+ * until more bytes are available, and loop until len bytes have 
+ * been read.
+ **/
+void readep0( BYTE* dst, WORD len );
+
+
+/**
+ * Write bytes from src to ep0, allowing host to transfer data
+ * between 64 byte blocks.
+ **/
+void writeep0 ( BYTE* src, WORD len );
+
+
+
+#endif
diff --git a/fx2lib/include/fx2ints.h b/fx2lib/include/fx2ints.h
new file mode 100644
index 0000000..45ae71e
--- /dev/null
+++ b/fx2lib/include/fx2ints.h
@@ -0,0 +1,116 @@
+// Copyright (C) 2010 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *  Define the standard fx2 interrupts.  For int2 and int4 autovector
+ *  interrupts see \ref autovector.h
+ *
+ *  To enable an interrupt, simply define an interrupt handler function
+ *  and use the appropriate ENABLE_* macro.  Interrupt enable macros
+ *  do not enable interrupts globally.  Use EA=1 to enable interrupts.
+ *
+ *  \code
+ *      void main() {
+ *          ENABLE_RESUME();
+ *          EA=1;
+ *          ...
+ *      }
+ *
+ *      void handle_resume() interrupt RESUME_ISR {
+ *          CLEAR_RESUME();
+ *      }
+ *  \endcode
+ *
+ * */
+
+
+/**
+ * \brief interrupt numbers for standard fx2 interrupts
+
+ **/
+typedef enum {
+ IE0_ISR=0, ///< External interrupt 0
+ TF0_ISR, ///< Timer 0 interrupt
+ IE1_ISR, ///< External interrupt 1
+ TF1_ISR, ///< Timer 1 interrupt  
+ TI_0_ISR, ///< Serial port 0 transmit or receive interrupt
+ TF2_ISR, ///< Timer 2 interrupt
+ RESUME_ISR, ///< Resume interrupt
+ TI_1_ISR, ///< Serial port 1 transmit or receive interrupt
+ USBINT_ISR, ///< Usb Interrupt.  An interrupt handler for this should only be used if not using auto vectored interrupts with int2
+ I2CINT_ISR, ///< I2C Bus interrupt
+ IE4_ISR, ///< External interrupt 4.  An interrupt handler for this should only be used if not using auto vectored interrupts with int4
+ IE5_ISR, ///< External interrupt 5
+ IE6_ISR, ///< External interrupt 6
+} FX2_ISR;
+
+
+/**
+ * \brief Enable the timer 0 interrupt.
+ *
+ * There is not CLEAR_TIMER0 because the timer interrupt flag 
+ * is automatically cleared when the isr is called.
+ **/
+#define ENABLE_TIMER0() ET0=1
+
+/**
+ * \brief Enable timer 1 interrupt
+ * There is no CLEAR_TIMER1 because the timer interrupt flag
+ * is automatically cleared when the isr is called.
+ **/
+#define ENABLE_TIMER1() ET1=1
+
+
+/**
+ * \brief Enable timer 2 interrupt
+ *
+ * This is the same interrupt whether timer 2 overflowed or 
+ * for the external EXF2 flag.
+ **/
+#define ENABLE_TIMER2() ET2=1
+/**
+ *  \brief Clear timer 2 interrupt
+ *
+ *  Clears both the TF2 AND EXF2 flag
+ **/
+#define CLEAR_TIMER2() TF2=0;EXF2=0;
+
+/**
+ * \brief Enable the Resume Interrupt.  Requires EA=1 separately.
+ **/
+#define ENABLE_RESUME() ERESI = 1 
+
+/**
+ * \brief Clear the resume interrupt.  Use within the resume
+ *  interrupt handler.
+ **/
+#define CLEAR_RESUME() RESI=0
+
+
+#define ENABLE_INT4() 
+
+/**
+ * \brief 
+ * Enable external interupt for int5#
+ **/
+#define ENABLE_INT5() EIEX5=1 
+
+/**
+ * \brief 
+ * Clear int5# interrupt
+ **/
+#define CLEAR_INT5() EXIF &= ~0x80
+
diff --git a/fx2lib/include/fx2macros.h b/fx2lib/include/fx2macros.h
new file mode 100644
index 0000000..af749e2
--- /dev/null
+++ b/fx2lib/include/fx2macros.h
@@ -0,0 +1,127 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *  Macros for simple common tasks in fx2 firmware.
+ * */
+
+#ifndef FX2MACROS_H
+#define FX2MACROS_H
+
+#include "fx2regs.h"
+#include "fx2types.h"
+
+#define MSB(addr) (BYTE)((addr >> 8) & 0xff)
+#define LSB(addr) (BYTE)(addr & 0xff)
+#define MAKEWORD(msb,lsb) (((WORD)msb << 8) | lsb)
+
+#define MSW(dword) (WORD)((dword >> 16) & 0xffff)
+#define LSW(dword) (WORD)(dword & 0xffff)
+#define MAKEDWORD(msw,lsw) (((DWORD)msw << 16) | lsw)
+
+// clock stuff
+
+/**
+ * \brief Used for getting and setting the CPU clock speed.
+ **/
+typedef enum { CLK_12M =0, CLK_24M, CLK_48M} CLK_SPD;
+
+/**
+ * \brief Evaluates to a CLK_SPD enum.
+ **/
+#define CPUFREQ (CLK_SPD)((CPUCS & bmCLKSPD) >> 3)
+/**
+ * \brief Sets the cpu to operate at a specific
+ *  clock speed.
+ **/
+#define SETCPUFREQ(SPD) CPUCS = (CPUCS & ~bmCLKSPD) | (SPD << 3)
+
+/**
+ * \brief Evaluates to a DWORD value representing 
+ *  the clock speed in cycles per second. 
+ *
+ * Speeds:
+ *
+ *  \li 12000000L
+ *  \li 24000000L
+ *  \li 48000000L
+ *
+ **/
+#define XTAL (CPUFREQ==CLK_12M ? 12000000L :\
+              CPUFREQ==CLK_24M ? 24000000L : 48000000L)
+
+
+/**
+ * \brief Evaluates to the i2c bus frequency in cyles per
+ * second.
+ *
+ * Speeds:
+ *
+ * \li 400000L
+ * \li 100000L
+ *
+ **/
+#define I2CFREQ ((I2CTL & bm400KHZ) ? 400000L : 100000L)
+
+
+#define IFFREQ (IFCONFIG & bm3048MHZ ? 48000000L : 30000000L)
+#define SETIF30MHZ() IFCONFIG &= ~bm3048MHZ
+#define SETIF48MHZ() IFCONFIG |= bm3048MHZ
+
+
+// eeprom stuff
+#define EEPROM_TWO_BYTE (I2CS & bmBIT4)
+
+/**
+ * \brief Cause the device to disconnect and reconnect to USB.  This macro
+ *  unconditionally renumerates the device no matter how the firmware is loaded.
+ *
+ *  <b>NOTE</b> Windows really doesn't like this if the firmware is loaded
+ *  from an eeprom.  You'll see information messages about the device not
+ *  working properly.  On the other hand, if you are changing the device 
+ *  descriptor, e.g., the vendor and product id, when downloading firmware to the device, 
+ *  you'll need to use this macro instead of the  
+ *  standard RENUMERATE macro.
+ **/
+#define RENUMERATE_UNCOND() USBCS|=bmDISCON|bmRENUM;delay(1500);USBCS&=~bmDISCON
+/**
+ * \brief Cause the device to disconnect and reconnect to the USB bus.  This macro
+ *  doesn't do anything if the firmware is loaded from an eeprom.
+ **/
+#define RENUMERATE() if(!(USBCS&bmRENUM)) {USBCS|=bmDISCON|bmRENUM;delay(1500);USBCS &= ~bmDISCON;}
+
+
+// interrupts
+// USB interrupts are in usbjt.h
+
+
+
+
+/**
+ * \brief TRUE if the FX2 has transitioned to high speed on the USB bus..
+ **/
+#define HISPEED (USBCS&bmHSM)
+
+
+
+
+/**
+ * \brief Evaluates to TRUE if a remote wakeup event has occurred.
+ **/
+#define REMOTE_WAKEUP() (((WAKEUPCS & bmWU) && (WAKEUPCS & bmWUEN)) || ((WAKEUPCS & bmWU2) && (WAKEUPCS & bmWU2EN)))
+
+
+#endif
diff --git a/fx2lib/include/fx2regs.h b/fx2lib/include/fx2regs.h
new file mode 100644
index 0000000..af1e8a0
--- /dev/null
+++ b/fx2lib/include/fx2regs.h
@@ -0,0 +1,628 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *
+ * This is the basic header/register file for working with the cypress fx2
+ * (cyc768013) and variants 8051 chipset.  It contains the special function 
+ * register definitions as well as the special configuration registers 
+ * addresses.
+ * 
+ * The TRM for the fx2 chip contains the full documentation for what each of
+ * these registers do.
+ *
+ * */
+
+
+/** \mainpage FX2LIB Documentation
+ *  \verbinclude README
+ **/
+
+/** \example fw.c
+ * The firmware framework allows for easily beginning a new firware project.
+ **/
+
+#ifndef FX2REGS_H 
+#define FX2REGS_H
+
+#include "fx2types.h"
+
+__xdata __at 0xE400 volatile BYTE GPIF_WAVE_DATA;
+__xdata __at 0xE480 volatile BYTE RES_WAVEDATA_END;
+
+// General Configuration
+
+__xdata __at 0xE600 volatile BYTE CPUCS;  ///< Control & Status
+__xdata __at 0xE601 volatile BYTE IFCONFIG;  ///< Interface Configuration
+__xdata __at 0xE602 volatile BYTE PINFLAGSAB;  ///< FIFO FLAGA and FLAGB Assignments
+__xdata __at 0xE603 volatile BYTE PINFLAGSCD;  ///< FIFO FLAGC and FLAGD Assignments
+__xdata __at 0xE604 volatile BYTE FIFORESET;  ///< Restore FIFOS to default state
+__xdata __at 0xE605 volatile BYTE BREAKPT;  ///< Breakpoint
+__xdata __at 0xE606 volatile BYTE BPADDRH;  ///< Breakpoint Address H
+__xdata __at 0xE607 volatile BYTE BPADDRL;  ///< Breakpoint Address L
+__xdata __at 0xE608 volatile BYTE UART230;  ///< 230 Kbaud clock for T0,T1,T2
+__xdata __at 0xE609 volatile BYTE FIFOPINPOLAR;  ///< FIFO polarities
+__xdata __at 0xE60A volatile BYTE REVID;  ///< Chip Revision
+__xdata __at 0xE60B volatile BYTE REVCTL;  ///< Chip Revision Control
+
+// Endpoint Configuration
+
+__xdata __at 0xE610 volatile BYTE EP1OUTCFG;  ///< Endpoint 1-OUT Configuration
+__xdata __at 0xE611 volatile BYTE EP1INCFG;  ///< Endpoint 1-IN Configuration
+__xdata __at 0xE612 volatile BYTE EP2CFG;  ///< Endpoint 2 Configuration
+__xdata __at 0xE613 volatile BYTE EP4CFG;  ///< Endpoint 4 Configuration
+__xdata __at 0xE614 volatile BYTE EP6CFG;  ///< Endpoint 6 Configuration
+__xdata __at 0xE615 volatile BYTE EP8CFG;  ///< Endpoint 8 Configuration
+__xdata __at 0xE618 volatile BYTE EP2FIFOCFG;  ///< Endpoint 2 FIFO configuration
+__xdata __at 0xE619 volatile BYTE EP4FIFOCFG;  ///< Endpoint 4 FIFO configuration
+__xdata __at 0xE61A volatile BYTE EP6FIFOCFG;  ///< Endpoint 6 FIFO configuration
+__xdata __at 0xE61B volatile BYTE EP8FIFOCFG;  ///< Endpoint 8 FIFO configuration
+__xdata __at 0xE620 volatile BYTE EP2AUTOINLENH;  ///< Endpoint 2 Packet Length H (IN only)
+__xdata __at 0xE621 volatile BYTE EP2AUTOINLENL;  ///< Endpoint 2 Packet Length L (IN only)
+__xdata __at 0xE622 volatile BYTE EP4AUTOINLENH;  ///< Endpoint 4 Packet Length H (IN only)
+__xdata __at 0xE623 volatile BYTE EP4AUTOINLENL;  ///< Endpoint 4 Packet Length L (IN only)
+__xdata __at 0xE624 volatile BYTE EP6AUTOINLENH;  ///< Endpoint 6 Packet Length H (IN only)
+__xdata __at 0xE625 volatile BYTE EP6AUTOINLENL;  ///< Endpoint 6 Packet Length L (IN only)
+__xdata __at 0xE626 volatile BYTE EP8AUTOINLENH;  ///< Endpoint 8 Packet Length H (IN only)
+__xdata __at 0xE627 volatile BYTE EP8AUTOINLENL;  ///< Endpoint 8 Packet Length L (IN only)
+__xdata __at 0xE630 volatile BYTE EP2FIFOPFH;  ///< EP2 Programmable Flag trigger H
+__xdata __at 0xE631 volatile BYTE EP2FIFOPFL;  ///< EP2 Programmable Flag trigger L
+__xdata __at 0xE632 volatile BYTE EP4FIFOPFH;  ///< EP4 Programmable Flag trigger H
+__xdata __at 0xE633 volatile BYTE EP4FIFOPFL;  ///< EP4 Programmable Flag trigger L
+__xdata __at 0xE634 volatile BYTE EP6FIFOPFH;  ///< EP6 Programmable Flag trigger H
+__xdata __at 0xE635 volatile BYTE EP6FIFOPFL;  ///< EP6 Programmable Flag trigger L
+__xdata __at 0xE636 volatile BYTE EP8FIFOPFH;  ///< EP8 Programmable Flag trigger H
+__xdata __at 0xE637 volatile BYTE EP8FIFOPFL;  ///< EP8 Programmable Flag trigger L
+__xdata __at 0xE640 volatile BYTE EP2ISOINPKTS;  ///< EP2 (if ISO) IN Packets per frame (1-3)
+__xdata __at 0xE641 volatile BYTE EP4ISOINPKTS;  ///< EP4 (if ISO) IN Packets per frame (1-3)
+__xdata __at 0xE642 volatile BYTE EP6ISOINPKTS;  ///< EP6 (if ISO) IN Packets per frame (1-3)
+__xdata __at 0xE643 volatile BYTE EP8ISOINPKTS;  ///< EP8 (if ISO) IN Packets per frame (1-3)
+__xdata __at 0xE648 volatile BYTE INPKTEND;  ///< Force IN Packet End
+__xdata __at 0xE649 volatile BYTE OUTPKTEND;  ///< Force OUT Packet End
+
+// Interrupts
+
+__xdata __at 0xE650 volatile BYTE EP2FIFOIE;  ///< Endpoint 2 Flag Interrupt Enable
+__xdata __at 0xE651 volatile BYTE EP2FIFOIRQ;  ///< Endpoint 2 Flag Interrupt Request
+__xdata __at 0xE652 volatile BYTE EP4FIFOIE;  ///< Endpoint 4 Flag Interrupt Enable
+__xdata __at 0xE653 volatile BYTE EP4FIFOIRQ;  ///< Endpoint 4 Flag Interrupt Request
+__xdata __at 0xE654 volatile BYTE EP6FIFOIE;  ///< Endpoint 6 Flag Interrupt Enable
+__xdata __at 0xE655 volatile BYTE EP6FIFOIRQ;  ///< Endpoint 6 Flag Interrupt Request
+__xdata __at 0xE656 volatile BYTE EP8FIFOIE;  ///< Endpoint 8 Flag Interrupt Enable
+__xdata __at 0xE657 volatile BYTE EP8FIFOIRQ;  ///< Endpoint 8 Flag Interrupt Request
+__xdata __at 0xE658 volatile BYTE IBNIE;  ///< IN-BULK-NAK Interrupt Enable
+__xdata __at 0xE659 volatile BYTE IBNIRQ;  ///< IN-BULK-NAK interrupt Request
+__xdata __at 0xE65A volatile BYTE NAKIE;  ///< Endpoint Ping NAK interrupt Enable
+__xdata __at 0xE65B volatile BYTE NAKIRQ;  ///< Endpoint Ping NAK interrupt Request
+__xdata __at 0xE65C volatile BYTE USBIE;  ///< USB Int Enables
+__xdata __at 0xE65D volatile BYTE USBIRQ;  ///< USB Interrupt Requests
+__xdata __at 0xE65E volatile BYTE EPIE;  ///< Endpoint Interrupt Enables
+__xdata __at 0xE65F volatile BYTE EPIRQ;  ///< Endpoint Interrupt Requests
+__xdata __at 0xE660 volatile BYTE GPIFIE;  ///< GPIF Interrupt Enable
+__xdata __at 0xE661 volatile BYTE GPIFIRQ;  ///< GPIF Interrupt Request
+__xdata __at 0xE662 volatile BYTE USBERRIE;  ///< USB Error Interrupt Enables
+__xdata __at 0xE663 volatile BYTE USBERRIRQ;  ///< USB Error Interrupt Requests
+__xdata __at 0xE664 volatile BYTE ERRCNTLIM;  ///< USB Error counter and limit
+__xdata __at 0xE665 volatile BYTE CLRERRCNT;  ///< Clear Error Counter EC[3..0]
+__xdata __at 0xE666 volatile BYTE INT2IVEC;  ///< Interupt 2 (USB) Autovector
+__xdata __at 0xE667 volatile BYTE INT4IVEC;  ///< Interupt 4 (FIFOS & GPIF) Autovector
+__xdata __at 0xE668 volatile BYTE INTSETUP;  ///< Interrupt 2&4 Setup
+
+// Input/Output
+
+__xdata __at 0xE670 volatile BYTE PORTACFG;  ///< I/O PORTA Alternate Configuration
+__xdata __at 0xE671 volatile BYTE PORTCCFG;  ///< I/O PORTC Alternate Configuration
+__xdata __at 0xE672 volatile BYTE PORTECFG;  ///< I/O PORTE Alternate Configuration
+__xdata __at 0xE678 volatile BYTE I2CS;  ///< Control & Status
+__xdata __at 0xE679 volatile BYTE I2DAT;  ///< Data
+__xdata __at 0xE67A volatile BYTE I2CTL;  ///< I2C Control
+__xdata __at 0xE67B volatile BYTE XAUTODAT1;  ///< Autoptr1 MOVX access
+__xdata __at 0xE67C volatile BYTE XAUTODAT2;  ///< Autoptr2 MOVX access
+
+#define EXTAUTODAT1 XAUTODAT1
+#define EXTAUTODAT2 XAUTODAT2
+
+// USB Control
+
+__xdata __at 0xE680 volatile BYTE USBCS;  ///< USB Control & Status
+__xdata __at 0xE681 volatile BYTE SUSPEND;  ///< Put chip into suspend
+__xdata __at 0xE682 volatile BYTE WAKEUPCS;  ///< Wakeup source and polarity
+__xdata __at 0xE683 volatile BYTE TOGCTL;  ///< Toggle Control
+__xdata __at 0xE684 volatile BYTE USBFRAMEH;  ///< USB Frame count H
+__xdata __at 0xE685 volatile BYTE USBFRAMEL;  ///< USB Frame count L
+__xdata __at 0xE686 volatile BYTE MICROFRAME;  ///< Microframe count, 0-7
+__xdata __at 0xE687 volatile BYTE FNADDR;  ///< USB Function address
+
+// Endpoints
+
+__xdata __at 0xE68A volatile BYTE EP0BCH;  ///< Endpoint 0 Byte Count H
+__xdata __at 0xE68B volatile BYTE EP0BCL;  ///< Endpoint 0 Byte Count L
+__xdata __at 0xE68D volatile BYTE EP1OUTBC;  ///< Endpoint 1 OUT Byte Count
+__xdata __at 0xE68F volatile BYTE EP1INBC;  ///< Endpoint 1 IN Byte Count
+__xdata __at 0xE690 volatile BYTE EP2BCH;  ///< Endpoint 2 Byte Count H
+__xdata __at 0xE691 volatile BYTE EP2BCL;  ///< Endpoint 2 Byte Count L
+__xdata __at 0xE694 volatile BYTE EP4BCH;  ///< Endpoint 4 Byte Count H
+__xdata __at 0xE695 volatile BYTE EP4BCL;  ///< Endpoint 4 Byte Count L
+__xdata __at 0xE698 volatile BYTE EP6BCH;  ///< Endpoint 6 Byte Count H
+__xdata __at 0xE699 volatile BYTE EP6BCL;  ///< Endpoint 6 Byte Count L
+__xdata __at 0xE69C volatile BYTE EP8BCH;  ///< Endpoint 8 Byte Count H
+__xdata __at 0xE69D volatile BYTE EP8BCL;  ///< Endpoint 8 Byte Count L
+__xdata __at 0xE6A0 volatile BYTE EP0CS;  ///< Endpoint  Control and Status
+__xdata __at 0xE6A1 volatile BYTE EP1OUTCS;  ///< Endpoint 1 OUT Control and Status
+__xdata __at 0xE6A2 volatile BYTE EP1INCS;  ///< Endpoint 1 IN Control and Status
+__xdata __at 0xE6A3 volatile BYTE EP2CS;  ///< Endpoint 2 Control and Status
+__xdata __at 0xE6A4 volatile BYTE EP4CS;  ///< Endpoint 4 Control and Status
+__xdata __at 0xE6A5 volatile BYTE EP6CS;  ///< Endpoint 6 Control and Status
+__xdata __at 0xE6A6 volatile BYTE EP8CS;  ///< Endpoint 8 Control and Status
+__xdata __at 0xE6A7 volatile BYTE EP2FIFOFLGS;  ///< Endpoint 2 Flags
+__xdata __at 0xE6A8 volatile BYTE EP4FIFOFLGS;  ///< Endpoint 4 Flags
+__xdata __at 0xE6A9 volatile BYTE EP6FIFOFLGS;  ///< Endpoint 6 Flags
+__xdata __at 0xE6AA volatile BYTE EP8FIFOFLGS;  ///< Endpoint 8 Flags
+__xdata __at 0xE6AB volatile BYTE EP2FIFOBCH;  ///< EP2 FIFO total byte count H
+__xdata __at 0xE6AC volatile BYTE EP2FIFOBCL;  ///< EP2 FIFO total byte count L
+__xdata __at 0xE6AD volatile BYTE EP4FIFOBCH;  ///< EP4 FIFO total byte count H
+__xdata __at 0xE6AE volatile BYTE EP4FIFOBCL;  ///< EP4 FIFO total byte count L
+__xdata __at 0xE6AF volatile BYTE EP6FIFOBCH;  ///< EP6 FIFO total byte count H
+__xdata __at 0xE6B0 volatile BYTE EP6FIFOBCL;  ///< EP6 FIFO total byte count L
+__xdata __at 0xE6B1 volatile BYTE EP8FIFOBCH;  ///< EP8 FIFO total byte count H
+__xdata __at 0xE6B2 volatile BYTE EP8FIFOBCL;  ///< EP8 FIFO total byte count L
+__xdata __at 0xE6B3 volatile BYTE SUDPTRH;  ///< Setup Data Pointer high address byte
+__xdata __at 0xE6B4 volatile BYTE SUDPTRL;  ///< Setup Data Pointer low address byte
+__xdata __at 0xE6B5 volatile BYTE SUDPTRCTL;  ///< Setup Data Pointer Auto Mode
+__xdata __at 0xE6B8 volatile BYTE SETUPDAT[8];  ///< 8 bytes of SETUP data
+
+// GPIF
+
+__xdata __at 0xE6C0 volatile BYTE GPIFWFSELECT;  ///< Waveform Selector
+__xdata __at 0xE6C1 volatile BYTE GPIFIDLECS;  ///< GPIF Done, GPIF IDLE drive mode
+__xdata __at 0xE6C2 volatile BYTE GPIFIDLECTL;  ///< Inactive Bus, CTL states
+__xdata __at 0xE6C3 volatile BYTE GPIFCTLCFG;  ///< CTL OUT pin drive
+__xdata __at 0xE6C4 volatile BYTE GPIFADRH;  ///< GPIF Address H
+__xdata __at 0xE6C5 volatile BYTE GPIFADRL;  ///< GPIF Address L
+
+__xdata __at 0xE6CE volatile BYTE GPIFTCB3;  ///< GPIF Transaction Count Byte 3
+__xdata __at 0xE6CF volatile BYTE GPIFTCB2;  ///< GPIF Transaction Count Byte 2
+__xdata __at 0xE6D0 volatile BYTE GPIFTCB1;  ///< GPIF Transaction Count Byte 1
+__xdata __at 0xE6D1 volatile BYTE GPIFTCB0;  ///< GPIF Transaction Count Byte 0
+
+__xdata __at 0xE6D2 volatile BYTE EP2GPIFFLGSEL;  ///< EP2 GPIF Flag select
+__xdata __at 0xE6D3 volatile BYTE EP2GPIFPFSTOP;  ///< Stop GPIF EP2 transaction on prog. flag
+__xdata __at 0xE6D4 volatile BYTE EP2GPIFTRIG;  ///< EP2 FIFO Trigger
+__xdata __at 0xE6DA volatile BYTE EP4GPIFFLGSEL;  ///< EP4 GPIF Flag select
+__xdata __at 0xE6DB volatile BYTE EP4GPIFPFSTOP;  ///< Stop GPIF EP4 transaction on prog. flag
+__xdata __at 0xE6DC volatile BYTE EP4GPIFTRIG;  ///< EP4 FIFO Trigger
+__xdata __at 0xE6E2 volatile BYTE EP6GPIFFLGSEL;  ///< EP6 GPIF Flag select
+__xdata __at 0xE6E3 volatile BYTE EP6GPIFPFSTOP;  ///< Stop GPIF EP6 transaction on prog. flag
+__xdata __at 0xE6E4 volatile BYTE EP6GPIFTRIG;  ///< EP6 FIFO Trigger
+__xdata __at 0xE6EA volatile BYTE EP8GPIFFLGSEL;  ///< EP8 GPIF Flag select
+__xdata __at 0xE6EB volatile BYTE EP8GPIFPFSTOP;  ///< Stop GPIF EP8 transaction on prog. flag
+__xdata __at 0xE6EC volatile BYTE EP8GPIFTRIG;  ///< EP8 FIFO Trigger
+__xdata __at 0xE6F0 volatile BYTE XGPIFSGLDATH;  ///< GPIF Data H (16-bit mode only)
+__xdata __at 0xE6F1 volatile BYTE XGPIFSGLDATLX;  ///< Read/Write GPIF Data L & trigger transac
+__xdata __at 0xE6F2 volatile BYTE XGPIFSGLDATLNOX;  ///< Read GPIF Data L, no transac trigger
+__xdata __at 0xE6F3 volatile BYTE GPIFREADYCFG;  ///< Internal RDY,Sync/Async, RDY5CFG
+__xdata __at 0xE6F4 volatile BYTE GPIFREADYSTAT;  ///< RDY pin states
+__xdata __at 0xE6F5 volatile BYTE GPIFABORT;  ///< Abort GPIF cycles
+
+// UDMA
+
+__xdata __at 0xE6C6 volatile BYTE FLOWSTATE; ///<Defines GPIF flow state
+__xdata __at 0xE6C7 volatile BYTE FLOWLOGIC; ///<Defines flow/hold decision criteria
+__xdata __at 0xE6C8 volatile BYTE FLOWEQ0CTL; ///<CTL states during active flow state
+__xdata __at 0xE6C9 volatile BYTE FLOWEQ1CTL; ///<CTL states during hold flow state
+__xdata __at 0xE6CA volatile BYTE FLOWHOLDOFF;
+__xdata __at 0xE6CB volatile BYTE FLOWSTB; ///<CTL/RDY Signal to use as master data strobe 
+__xdata __at 0xE6CC volatile BYTE FLOWSTBEDGE; ///<Defines active master strobe edge
+__xdata __at 0xE6CD volatile BYTE FLOWSTBHPERIOD; ///<Half Period of output master strobe
+__xdata __at 0xE60C volatile BYTE GPIFHOLDAMOUNT; ///<Data delay shift 
+__xdata __at 0xE67D volatile BYTE UDMACRCH; ///<CRC Upper byte
+__xdata __at 0xE67E volatile BYTE UDMACRCL; ///<CRC Lower byte
+__xdata __at 0xE67F volatile BYTE UDMACRCQUAL; ///<UDMA In only, host terminated use only
+
+// Endpoint Buffers
+
+__xdata __at 0xE740 volatile BYTE EP0BUF[64];  ///< EP0 IN-OUT buffer
+__xdata __at 0xE780 volatile BYTE EP1OUTBUF[64];  ///< EP1-OUT buffer
+__xdata __at 0xE7C0 volatile BYTE EP1INBUF[64];  ///< EP1-IN buffer
+__xdata __at 0xF000 volatile BYTE EP2FIFOBUF[1024];  ///< 512/1024-byte EP2 buffer (IN or OUT)
+__xdata __at 0xF400 volatile BYTE EP4FIFOBUF[1024];  ///< 512 byte EP4 buffer (IN or OUT)
+__xdata __at 0xF800 volatile BYTE EP6FIFOBUF[1024];  ///< 512/1024-byte EP6 buffer (IN or OUT)
+__xdata __at 0xFC00 volatile BYTE EP8FIFOBUF[1024];  ///< 512 byte EP8 buffer (IN or OUT)
+
+// Error Correction Code (ECC) Registers (FX2LP/FX1 only)
+
+__xdata __at 0xE628 volatile BYTE ECCCFG;  ///< ECC Configuration
+__xdata __at 0xE629 volatile BYTE ECCRESET;  ///< ECC Reset
+__xdata __at 0xE62A volatile BYTE ECC1B0;  ///< ECC1 Byte 0
+__xdata __at 0xE62B volatile BYTE ECC1B1;  ///< ECC1 Byte 1
+__xdata __at 0xE62C volatile BYTE ECC1B2;  ///< ECC1 Byte 2
+__xdata __at 0xE62D volatile BYTE ECC2B0;  ///< ECC2 Byte 0
+__xdata __at 0xE62E volatile BYTE ECC2B1;  ///< ECC2 Byte 1
+__xdata __at 0xE62F volatile BYTE ECC2B2;  ///< ECC2 Byte 2
+
+// Feature Registers  (FX2LP/FX1 only)
+__xdata __at 0xE50D volatile BYTE GPCR2;  ///< Chip Features
+
+/**
+ * SFRs below
+ *  According to TRM 15.2, only rows 0 and 8 of the SFRs are bit addressible
+ *  row 0: IOA, IOB, IOC, IOD, SCON1, PSW, ACC, B
+ *  row 8: TCON, SCON0, IE, IP, T2CON, IECON, EIE, EIP
+ *
+ *  All others have to move a byte to the SRF address
+ **/
+
+__sfr __at 0x80 IOA;
+         /*  IOA  */
+         __sbit __at 0x80 + 0 PA0;
+         __sbit __at 0x80 + 1 PA1;
+         __sbit __at 0x80 + 2 PA2;
+         __sbit __at 0x80 + 3 PA3;
+         __sbit __at 0x80 + 4 PA4;
+         __sbit __at 0x80 + 5 PA5;
+         __sbit __at 0x80 + 6 PA6;
+         __sbit __at 0x80 + 7 PA7;
+__sfr __at 0x81 SP;
+__sfr __at 0x82 DPL;
+__sfr __at 0x83 DPH;
+__sfr __at 0x84 DPL1;
+__sfr __at 0x85 DPH1;
+__sfr __at 0x86 DPS;
+__sfr __at 0x87 PCON;
+__sfr __at 0x88 TCON;
+         /*  TCON  */
+         __sbit __at 0x88+0 IT0;
+         __sbit __at 0x88+1 IE0;
+         __sbit __at 0x88+2 IT1;
+         __sbit __at 0x88+3 IE1;
+         __sbit __at 0x88+4 TR0;
+         __sbit __at 0x88+5 TF0;
+         __sbit __at 0x88+6 TR1;
+         __sbit __at 0x88+7 TF1;
+__sfr __at 0x89 TMOD;
+__sfr __at 0x8A TL0;
+__sfr __at 0x8B TL1;
+__sfr __at 0x8C TH0;
+__sfr __at 0x8D TH1;
+__sfr __at 0x8E CKCON;
+__sfr __at 0x90 IOB;
+         /*  IOB  */
+         __sbit __at 0x90 + 0 PB0;
+         __sbit __at 0x90 + 1 PB1;
+         __sbit __at 0x90 + 2 PB2;
+         __sbit __at 0x90 + 3 PB3;
+         __sbit __at 0x90 + 4 PB4;
+         __sbit __at 0x90 + 5 PB5;
+         __sbit __at 0x90 + 6 PB6;
+         __sbit __at 0x90 + 7 PB7;
+__sfr __at 0x91 EXIF;
+         
+//__sfr __at 0x92 MPAGE;
+__sfr __at 0x92 _XPAGE; // same as MPAGE for pdata __sfr access w/ sdcc
+__sfr __at 0x98 SCON0;
+         /*  SCON0  */
+         __sbit __at 0x98+0 RI;
+         __sbit __at 0x98+1 TI;
+         __sbit __at 0x98+2 RB8;
+         __sbit __at 0x98+3 TB8;
+         __sbit __at 0x98+4 REN;
+         __sbit __at 0x98+5 SM2;
+         __sbit __at 0x98+6 SM1;
+         __sbit __at 0x98+7 SM0;
+__sfr __at 0x99 SBUF0;
+
+__sfr __at 0x9A AUTOPTRH1; 
+__sfr __at 0x9B AUTOPTRL1; 
+__sfr __at 0x9D AUTOPTRH2;
+__sfr __at 0x9E AUTOPTRL2; 
+
+__sfr __at 0xA0 IOC;
+         /*  IOC  */
+         __sbit __at 0xA0 + 0 PC0;
+         __sbit __at 0xA0 + 1 PC1;
+         __sbit __at 0xA0 + 2 PC2;
+         __sbit __at 0xA0 + 3 PC3;
+         __sbit __at 0xA0 + 4 PC4;
+         __sbit __at 0xA0 + 5 PC5;
+         __sbit __at 0xA0 + 6 PC6;
+         __sbit __at 0xA0 + 7 PC7;
+__sfr __at 0xA1 INT2CLR;
+__sfr __at 0xA2 INT4CLR;
+
+__sfr __at 0xA8 IE;
+         /*  IE  */
+         __sbit __at 0xA8+0 EX0;
+         __sbit __at 0xA8+1 ET0;
+         __sbit __at 0xA8+2 EX1;
+         __sbit __at 0xA8+3 ET1;
+         __sbit __at 0xA8+4 ES0;
+         __sbit __at 0xA8+5 ET2;
+         __sbit __at 0xA8+6 ES1;
+         __sbit __at 0xA8+7 EA;
+
+__sfr __at 0xAA EP2468STAT;
+__sfr __at 0xAB EP24FIFOFLGS;
+__sfr __at 0xAC EP68FIFOFLGS;
+__sfr __at 0xAF AUTOPTRSETUP;
+__sfr __at 0xB0 IOD;
+         /*  IOD  */
+         __sbit __at 0xB0 + 0 PD0;
+         __sbit __at 0xB0 + 1 PD1;
+         __sbit __at 0xB0 + 2 PD2;
+         __sbit __at 0xB0 + 3 PD3;
+         __sbit __at 0xB0 + 4 PD4;
+         __sbit __at 0xB0 + 5 PD5;
+         __sbit __at 0xB0 + 6 PD6;
+         __sbit __at 0xB0 + 7 PD7;
+__sfr __at 0xB1 IOE;
+__sfr __at 0xB2 OEA;
+__sfr __at 0xB3 OEB;
+__sfr __at 0xB4 OEC;
+__sfr __at 0xB5 OED;
+__sfr __at 0xB6 OEE;
+
+__sfr __at 0xB8 IP;
+         /*  IP  */
+         __sbit __at 0xB8+0 PX0;
+         __sbit __at 0xB8+1 PT0;
+         __sbit __at 0xB8+2 PX1;
+         __sbit __at 0xB8+3 PT1;
+         __sbit __at 0xB8+4 PS0;
+         __sbit __at 0xB8+5 PT2;
+         __sbit __at 0xB8+6 PS1;
+
+__sfr __at 0xBA EP01STAT;
+__sfr __at 0xBB GPIFTRIG;
+
+__sfr __at 0xBD GPIFSGLDATH;
+__sfr __at 0xBE GPIFSGLDATLX;
+__sfr __at 0xBF GPIFSGLDATLNOX;
+
+__sfr __at 0xC0 SCON1;
+         /*  SCON1  */
+         __sbit __at 0xC0+0 RI1;
+         __sbit __at 0xC0+1 TI1;
+         __sbit __at 0xC0+2 RB81;
+         __sbit __at 0xC0+3 TB81;
+         __sbit __at 0xC0+4 REN1;
+         __sbit __at 0xC0+5 SM21;
+         __sbit __at 0xC0+6 SM11;
+         __sbit __at 0xC0+7 SM01;
+__sfr __at 0xC1 SBUF1;
+__sfr __at 0xC8 T2CON;
+         /*  T2CON  */
+         __sbit __at 0xC8+0 CP_RL2;
+         __sbit __at 0xC8+1 C_T2;
+         __sbit __at 0xC8+2 TR2;
+         __sbit __at 0xC8+3 EXEN2;
+         __sbit __at 0xC8+4 TCLK;
+         __sbit __at 0xC8+5 RCLK;
+         __sbit __at 0xC8+6 EXF2;
+         __sbit __at 0xC8+7 TF2;
+__sfr __at 0xCA RCAP2L;
+__sfr __at 0xCB RCAP2H;
+__sfr __at 0xCC TL2;
+__sfr __at 0xCD TH2;
+__sfr __at 0xD0 PSW;
+         /*  PSW  */
+         __sbit __at 0xD0+0 P;
+         __sbit __at 0xD0+1 FL;
+         __sbit __at 0xD0+2 OV;
+         __sbit __at 0xD0+3 RS0;
+         __sbit __at 0xD0+4 RS1;
+         __sbit __at 0xD0+5 F0;
+         __sbit __at 0xD0+6 AC;
+         __sbit __at 0xD0+7 CY;
+__sfr __at 0xD8 EICON; // Was WDCON in DS80C320; Bit Values differ from Reg320
+         /*  EICON  */
+         __sbit __at 0xD8+3 INT6;
+         __sbit __at 0xD8+4 RESI;
+         __sbit __at 0xD8+5 ERESI;
+         __sbit __at 0xD8+7 SMOD1;
+__sfr __at 0xE0 ACC;
+__sfr __at 0xE8 EIE; // EIE Bit Values differ from Reg320
+         /*  EIE  */
+         __sbit __at 0xE8+0 EUSB;
+         __sbit __at 0xE8+1 EI2C;
+         __sbit __at 0xE8+2 EIEX4;
+         __sbit __at 0xE8+3 EIEX5;
+         __sbit __at 0xE8+4 EIEX6;
+__sfr __at 0xF0 B;
+__sfr __at 0xF8 EIP; // EIP Bit Values differ from Reg320
+         /*  EIP  */
+         __sbit __at 0xF8+0 PUSB;
+         __sbit __at 0xF8+1 PI2C;
+         __sbit __at 0xF8+2 EIPX4;
+         __sbit __at 0xF8+3 EIPX5;
+         __sbit __at 0xF8+4 EIPX6;
+
+
+/* CPU Control & Status Register (CPUCS) */
+#define bmPRTCSTB    bmBIT5
+#define bmCLKSPD     (bmBIT4 | bmBIT3)
+#define bmCLKSPD1    bmBIT4
+#define bmCLKSPD0    bmBIT3
+#define bmCLKINV     bmBIT2
+#define bmCLKOE      bmBIT1
+#define bm8051RES    bmBIT0
+/* Port Alternate Configuration Registers */
+/* Port A (PORTACFG) */
+#define bmFLAGD      bmBIT7
+#define bmINT1       bmBIT1
+#define bmINT0       bmBIT0
+/* Port C (PORTCCFG) */
+#define bmGPIFA7     bmBIT7
+#define bmGPIFA6     bmBIT6
+#define bmGPIFA5     bmBIT5
+#define bmGPIFA4     bmBIT4
+#define bmGPIFA3     bmBIT3
+#define bmGPIFA2     bmBIT2
+#define bmGPIFA1     bmBIT1
+#define bmGPIFA0     bmBIT0
+/* Port E (PORTECFG) */
+#define bmGPIFA8     bmBIT7
+#define bmT2EX       bmBIT6
+#define bmINT6       bmBIT5
+#define bmRXD1OUT    bmBIT4
+#define bmRXD0OUT    bmBIT3
+#define bmT2OUT      bmBIT2
+#define bmT1OUT      bmBIT1
+#define bmT0OUT      bmBIT0
+
+/* I2C Control & Status Register (I2CS) */
+#define bmSTART      bmBIT7
+#define bmSTOP       bmBIT6
+#define bmLASTRD     bmBIT5
+#define bmID         (bmBIT4 | bmBIT3)
+#define bmBERR       bmBIT2
+#define bmACK        bmBIT1
+#define bmDONE       bmBIT0
+/* I2C Control Register (I2CTL) */
+#define bmSTOPIE     bmBIT1
+#define bm400KHZ     bmBIT0
+/* Interrupt 2 (USB) Autovector Register (INT2IVEC) */
+#define bmIV4        bmBIT6
+#define bmIV3        bmBIT5
+#define bmIV2        bmBIT4
+#define bmIV1        bmBIT3
+#define bmIV0        bmBIT2
+/* USB Interrupt Request & Enable Registers (USBIE/USBIRQ) */
+#define bmEP0ACK     bmBIT6
+#define bmHSGRANT    bmBIT5
+#define bmURES       bmBIT4
+#define bmSUSP       bmBIT3
+#define bmSUTOK      bmBIT2
+#define bmSOF        bmBIT1
+#define bmSUDAV      bmBIT0
+/* USBERRIE/IRQ */
+#define bmERRLIMIT  bmBIT0
+#define bmISOEP2    bmBIT4
+#define bmISOEP4    bmBIT5
+#define bmISOEP6    bmBIT6
+#define bmISOEP8    bmBIT7
+
+/* Endpoint Interrupt & Enable Registers (EPIE/EPIRQ) */
+#define bmEP0IN     bmBIT0
+#define bmEP0OUT    bmBIT1
+#define bmEP1IN     bmBIT2
+#define bmEP1OUT    bmBIT3
+#define bmEP2       bmBIT4
+#define bmEP4       bmBIT5
+#define bmEP6       bmBIT6
+#define bmEP8       bmBIT7
+/* Breakpoint register (BREAKPT) */
+#define bmBREAK      bmBIT3
+#define bmBPPULSE    bmBIT2
+#define bmBPEN       bmBIT1
+/* Interrupt 2 & 4 Setup (INTSETUP) */
+#define bmAV2EN      bmBIT3
+#define INT4IN       bmBIT1
+#define bmAV4EN      bmBIT0
+/* USB Control & Status Register (USBCS) */
+#define bmHSM        bmBIT7
+#define bmDISCON     bmBIT3
+#define bmNOSYNSOF   bmBIT2
+#define bmRENUM      bmBIT1
+#define bmSIGRESUME  bmBIT0
+/* Wakeup Control and Status Register (WAKEUPCS) */
+#define bmWU2        bmBIT7
+#define bmWU         bmBIT6
+#define bmWU2POL     bmBIT5
+#define bmWUPOL      bmBIT4
+#define bmDPEN       bmBIT2
+#define bmWU2EN      bmBIT1
+#define bmWUEN       bmBIT0
+/* End Point 0 Control & Status Register (EP0CS) */
+#define bmHSNAK      bmBIT7
+/* End Point 0-1 Control & Status Registers (EP0CS/EP1OUTCS/EP1INCS) */
+#define bmEPBUSY     bmBIT1
+#define bmEPSTALL    bmBIT0
+/* End Point 2-8 Control & Status Registers (EP2CS/EP4CS/EP6CS/EP8CS) */
+#define bmNPAK       (bmBIT6 | bmBIT5 | bmBIT4)
+#define bmEPFULL     bmBIT3
+#define bmEPEMPTY    bmBIT2
+/* Endpoint Status (EP2468STAT) __SFR bits */
+#define bmEP8FULL    bmBIT7
+#define bmEP8EMPTY   bmBIT6
+#define bmEP6FULL    bmBIT5
+#define bmEP6EMPTY   bmBIT4
+#define bmEP4FULL    bmBIT3
+#define bmEP4EMPTY   bmBIT2
+#define bmEP2FULL    bmBIT1
+#define bmEP2EMPTY   bmBIT0
+/* Endpoint Config (EP[24]CFG) */
+#define bmBUF       (bmBIT0|bmBIT1)
+/* Endpoint Config (EP[2468]CFG) */
+#define bmSIZE      bmBIT3
+#define bmTYPE      (bmBIT4|bmBIT5)
+#define bmDIR       bmBIT6
+#define bmVALID     bmBIT7
+/* SETUP Data Pointer Auto Mode (SUDPTRCTL) */
+#define bmSDPAUTO    bmBIT0
+/* Endpoint Data Toggle Control (TOGCTL) */
+#define bmQUERYTOGGLE  bmBIT7
+#define bmSETTOGGLE    bmBIT6
+#define bmRESETTOGGLE  bmBIT5
+#define bmTOGCTLEPMASK bmBIT3 | bmBIT2 | bmBIT1 | bmBIT0
+/* IBN (In Bulk Nak) enable and request bits (IBNIE/IBNIRQ) */
+#define bmEP8IBN     bmBIT5
+#define bmEP6IBN     bmBIT4
+#define bmEP4IBN     bmBIT3
+#define bmEP2IBN     bmBIT2
+#define bmEP1IBN     bmBIT1
+#define bmEP0IBN     bmBIT0
+
+/* PING-NAK enable and request bits (NAKIE/NAKIRQ) */
+#define bmEP8PING     bmBIT7
+#define bmEP6PING     bmBIT6
+#define bmEP4PING     bmBIT5
+#define bmEP2PING     bmBIT4
+#define bmEP1PING     bmBIT3
+#define bmEP0PING     bmBIT2
+#define bmIBN         bmBIT0
+
+/* Interface Configuration bits (IFCONFIG) */
+#define bmIFCLKSRC    bmBIT7
+#define bm3048MHZ     bmBIT6
+#define bmIFCLKOE     bmBIT5
+#define bmIFCLKPOL    bmBIT4
+#define bmASYNC       bmBIT3
+#define bmGSTATE      bmBIT2
+#define bmIFCFG1      bmBIT1
+#define bmIFCFG0      bmBIT0
+#define bmIFCFGMASK   (bmIFCFG0 | bmIFCFG1)
+#define bmIFGPIF      bmIFCFG1
+
+/* EP 2468 FIFO Configuration bits (EP2FIFOCFG,EP4FIFOCFG,EP6FIFOCFG,EP8FIFOCFG) */
+#define bmINFM       bmBIT6
+#define bmOEP        bmBIT5
+#define bmAUTOOUT    bmBIT4
+#define bmAUTOIN     bmBIT3
+#define bmZEROLENIN  bmBIT2
+#define bmWORDWIDE   bmBIT0
+
+/* Chip Revision Control Bits (REVCTL) - used to ebable/disable revision specidic
+   features */ 
+#define bmNOAUTOARM    bmBIT1
+#define bmSKIPCOMMIT   bmBIT0
+
+/* Fifo Reset bits (FIFORESET) */
+#define bmNAKALL       bmBIT7
+
+/* Chip Feature Register (GPCR2) */
+#define bmFULLSPEEDONLY    bmBIT4
+
+#endif   /* FX2REGS_H */
diff --git a/fx2lib/include/fx2types.h b/fx2lib/include/fx2types.h
new file mode 100644
index 0000000..7401aa5
--- /dev/null
+++ b/fx2lib/include/fx2types.h
@@ -0,0 +1,50 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *  define standard types of fixed widths.
+ * */
+
+#ifndef FXTYPES_H
+#define FXTYPES_H
+
+typedef unsigned int WORD;
+typedef unsigned char BYTE;
+typedef unsigned long DWORD;
+typedef unsigned char BOOL; 
+typedef enum {
+ FALSE=0,
+ TRUE
+} BOOL_VALS;
+
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+/*-----------------------------------------------------------------------------
+   Bit Masks
+-----------------------------------------------------------------------------*/
+
+#define bmBIT0	1
+#define bmBIT1	2
+#define bmBIT2	4
+#define bmBIT3	8
+#define bmBIT4	16
+#define bmBIT5	32
+#define bmBIT6	64
+#define bmBIT7	128
+
+#endif
diff --git a/fx2lib/include/gpif.h b/fx2lib/include/gpif.h
new file mode 100644
index 0000000..8b568cd
--- /dev/null
+++ b/fx2lib/include/gpif.h
@@ -0,0 +1,110 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/*! \file 
+ *
+ * These functions do the same thing that the Cypress gpif designer expored c file does.
+ * Instead of including their file directly in your project, you include just the
+ * generated waveform data.  The gpif2dat script in the utils folder will export your
+ * waveform data to a file that can be included in your project.
+ * */
+
+#ifndef GPIF_H
+#define GPIF_H
+
+#include "fx2types.h"
+
+#define GPIFDONE (GPIFTRIG&0x80)
+#define GPIFTC16 (MAKEWORD(GPIFTCB1,GPIFTCB0))
+#define GPIFTC32 (MAKEDWORD(MAKEWORD(GPIFTCB3,GPIFTCB2),MAKEWORD(GPIFTCB1,GPIFTCB0)))
+
+
+/**
+ * Gpif designer generates a c file with waveform data.
+ * Copy the WaveData[128] array
+ * and the InitData[7] to your code somewhere
+ * Then this function is pretty much the reset of the generated
+ * code but ported to sdcc.
+ *
+ * uses syncdelay of 4 which might not be long enough if peripheral
+ * runs slower than 30mhz.  May not affect anything.
+ *
+ * IFCONFIG is set with IFCFG[1:0] = 10 for GPIF master but you still
+ * have to set the ifclk, polarity, and the rest of the bits
+ **/
+
+void gpif_init( BYTE* waveform, BYTE* initdata );
+
+/**
+ * Uses the correct bytes from your flowstates array.
+ * This may or may not be needed depending on whether
+ * your waveform data uses flowstates.  If you don't
+ * know if you need them or not, you probably don't.
+ *
+ * flowstates should have 36 elements.
+ * bank should be 0-3
+ **/
+void gpif_setflowstate( BYTE* flowstates, BYTE bank);
+
+
+
+//! These defines/functions pretty much out of the TRM 10.4
+#define GPIFTRGWR 0
+#define GPIFTRGRD 4
+typedef enum {
+    GPIF_EP2 = 0,
+    GPIF_EP4 = 1,
+    GPIF_EP6 = 2,
+    GPIF_EP8 = 3
+} GPIF_EP_NUM;
+
+/**
+ * \brief Simple function to help set the transaction count for gpif
+ * transactions.
+ * \param tc 32 bit Transaction Count
+ **/
+void gpif_set_tc32(DWORD tc);
+/**
+ * \brief Simple function to set transaction count for gpif transactions.
+ * \param tc 16 bit Transaction Count
+ **/
+void gpif_set_tc16(WORD tc);
+
+
+/**
+ * Use the gpif to read a single word at a time.
+ * Read len words and store in res
+ *
+ * At least one EPxFIFOCFG has to have wordwide=1 or this
+ * functions won't transfer both bytes.
+ **/
+
+void gpif_single_read16( WORD* res , WORD len);
+
+/**
+ * Use the gpif to write a single word at a time.
+ * Write len words from data
+ *
+ * At leat one EPxFIFOCFG has to have wordwide=1 or this
+ * function won't transfer both bytes.
+ **/
+void gpif_single_write16( WORD* __data, WORD len);
+
+void gpif_fifo_read ( GPIF_EP_NUM ep_num );
+
+void gpif_fifo_write( GPIF_EP_NUM ep_num );
+
+#endif
diff --git a/fx2lib/include/i2c.h b/fx2lib/include/i2c.h
new file mode 100644
index 0000000..3d7d5f3
--- /dev/null
+++ b/fx2lib/include/i2c.h
@@ -0,0 +1,97 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/** \file i2c.h 
+ *  Utilities for reading and writing to i2c devices and as eeproms.
+ **/
+
+#ifndef I2C_H
+#define I2C_H
+
+#include "fx2types.h"
+
+/**
+ * i2c_write and i2c_read set this to FALSE at the beginning of a 
+ * transaction.  If for some reason, the read/write is taking too
+ * long or not returning, firmware can set this to TRUE to cause the
+ * routine to abort.  (Usually done via an interrupt).
+ **/
+extern volatile __xdata BOOL cancel_i2c_trans;
+
+/**
+ * \brief write data to i2c bus.
+ *
+ *  Writes data from addr buffer 1st, then data buffer. 
+ *  Either buffer can be NULL (as long as you set lenN to 0).
+ *  
+ *  Two buffers allows writing data all in one i2c write command without
+ *  having to write a hardware address and a data byte with each 
+ *  i2c transaction.
+ *
+ * \param addr i2c address
+ * \param len1 length of addr data
+ * \param addr_buf addr data
+ * \param len2 length of data
+ * \param data_buf data bytes
+ **/
+BOOL i2c_write ( BYTE addr, WORD len1, BYTE* addr_buf, WORD len2, BYTE* data_buf );
+
+/**
+ * \brief read data on the i2c bus.
+ *
+ * \param addr i2c address
+ * \param len number of bytes to read
+ * \param buf buffer to store data
+ **/
+BOOL i2c_read ( BYTE addr, WORD len, BYTE* buf);
+
+/**
+ * \brief read data from an attached eeprom.
+ *
+ * Writes the address of the data to read then reads len bytes into buf.
+ * This function checks the I2CS register to determine if a one or two
+ * byte address eepom was detected on the i2c bus.  Reading from proms
+ * at non-standard addresses my require using the i2c_read/write commands
+ * explicitly.
+ *
+ * \param prom_addr eeprom i2c address
+ * \param addr address of bytes to start reading
+ * \param len number of bytes to read
+ * \param buf data buffer
+ **/
+BOOL eeprom_read( BYTE prom_addr, WORD addr, WORD len, BYTE* buf);
+
+/**
+ * \brief write data to the eeprom
+ *
+ * This function checks the I2CS register to determin if a one or two
+ * two byte eeprom is detected.  If the prom is not detected at boot time
+ * or is connected to alternate addresses, the i2c_read/write commands should
+ * be used explicitly insread of using this function.
+ *
+ * For each byte in buf, the address is written and then the data byte. Many 
+ * proms support writing multiple bytes at the same time.  For these, it is
+ * also better to use i2c_read/write explicitly.  This function is rather slow
+ * but is effective.
+ *
+ * \param prom_addr eeprom i2c address
+ * \param addr address of bytes to start writing
+ * \param len number of bytes to write
+ * \param buf data buffer
+ **/
+BOOL eeprom_write( BYTE prom_addr, WORD addr, WORD len, BYTE* buf);
+
+#endif
diff --git a/fx2lib/include/lights.h b/fx2lib/include/lights.h
new file mode 100644
index 0000000..7b1a01e
--- /dev/null
+++ b/fx2lib/include/lights.h
@@ -0,0 +1,96 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/** \file lights.h
+ * macros for turning lights on the EZ-USB development board on and off.
+ **/
+
+#ifndef LIGHTS_H
+#define LIGHTS_H
+
+#include "fx2types.h"
+
+#ifndef FX1
+// FX2 Dev board lights
+#define D2ONH #0x88 // assembly high byte of light addr 
+#define D2OFFH #0x80 
+#define D3ONH #0x98 
+#define D3OFFH #0x90 
+#define D4ONH #0xA8 
+#define D4OFFH #0xA0 
+#define D5ONH #0xB8 
+#define D5OFFH #0xB0 
+volatile xdata at 0x8800 BYTE D2ON;
+volatile xdata at 0x8000 BYTE D2OFF;
+volatile xdata at 0x9800 BYTE D3ON;
+volatile xdata at 0x9000 BYTE D3OFF;
+volatile xdata at 0xA800 BYTE D4ON;
+volatile xdata at 0xA000 BYTE D4OFF;
+volatile xdata at 0xB800 BYTE D5ON;
+volatile xdata at 0xB000 BYTE D5OFF;
+#else
+// FX1 dev board lights
+#define D2ONH #0x80 // assembly high byte of light addr 
+#define D2OFFH #0x81 
+#define D3ONH #0x90 
+#define D3OFFH #0x91 
+#define D4ONH #0xA0 
+#define D4OFFH #0xA1 
+#define D5ONH #0xB0 
+#define D5OFFH #0xB1 
+volatile xdata at 0x8000 BYTE D2ON;
+volatile xdata at 0x8100 BYTE D2OFF;
+volatile xdata at 0x9000 BYTE D3ON;
+volatile xdata at 0x9100 BYTE D3OFF;
+volatile xdata at 0xA000 BYTE D4ON;
+volatile xdata at 0xA100 BYTE D4OFF;
+volatile xdata at 0xB000 BYTE D5ON;
+volatile xdata at 0xB100 BYTE D5OFF;
+#endif
+
+/**
+ * Easier to use macros defined below 
+**/
+#define activate_light(LIGHT_ADDR) __asm \
+ mov __XPAGE, LIGHT_ADDR \
+ __endasm; __asm \
+ movx a, @r0 \
+__endasm \
+
+/**
+ *  Easy to make lights blink with these macros:
+ *  \code
+ *      WORD ct=0;
+ *      BOOL on=FALSE;
+ *      while (TRUE) {
+ *          if (!ct) {
+ *              on=!on;
+ *              if (on) d2on(); else d2off();
+ *          }
+ *          ++ct;
+ *      }
+ *  \endcode
+ **/
+#define d2on() activate_light(D2ONH)
+#define d2off() activate_light(D2OFFH)
+#define d3on() activate_light(D3ONH)
+#define d3off() activate_light(D3OFFH)
+#define d4on() activate_light(D4ONH)
+#define d4off() activate_light(D4OFFH)
+#define d5on() activate_light(D5ONH)
+#define d5off() activate_light(D5OFFH)
+
+#endif
diff --git a/fx2lib/include/serial.h b/fx2lib/include/serial.h
new file mode 100644
index 0000000..df5c782
--- /dev/null
+++ b/fx2lib/include/serial.h
@@ -0,0 +1,55 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+/** \file serial.h
+ * defines functions to print to a serial console with SIO0
+ **/
+
+#include "fx2types.h"
+
+
+/**
+ * This function inits sio0 to use T2CON (timer 2)
+ * See TRM 14.3.4.1 (Table 14-16)
+ * Certain baud rates have too high an error rate to work.  All baud rates are .16%
+ * except:
+ *
+ *          12MHZ      24MHZ
+ *   \li 57600  -6.99%
+ *   \li 38400  -2.34%     -2.34%
+ *   \li 19200  -2.34%
+ *
+ *   Possible Baud rates:
+ *    \li 2400
+ *    \li 4800
+ *    \li 9600
+ *    \li 19200
+ *    \li 28800
+ *    \li 38400
+ *    \li 57600
+ *
+ *    Any of these rates should work except 57600 at 12mhz.  -2.34% is pushing
+ *    most hardware specs for working.  All rates at 48mhz work at .16%
+ **/
+
+void sio0_init( WORD baud_rate ) __critical ; // baud_rate max should be 57600 since int=2 bytes
+
+/**
+ putchar('\\n') or putchar('\\r') both transmit \\r\\n
+ Just use one or the other. (This makes terminal echo easy)
+**/
+void putchar(char c);
+char getchar();
diff --git a/fx2lib/include/setupdat.h b/fx2lib/include/setupdat.h
new file mode 100644
index 0000000..cbae0e0
--- /dev/null
+++ b/fx2lib/include/setupdat.h
@@ -0,0 +1,223 @@
+// Copyright (C) 2009 Ubixum, Inc. 
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifndef SETUPDAT_H
+#define SETUPDAT_H
+
+#include "fx2regs.h"
+#include "delay.h"
+/** \file setupdat.h
+  Utilities for handling setup data and vendor commands.
+
+ \verbatim
+
+ This module needs initialized with a device descriptor.
+ NOTE that your descriptors need to be located in code memory
+ to use the SUDPTRH:L to auto transfer the data
+ 
+ and vendor commands handler.  You have to provide callbacks.
+
+DEVICE DESCRIPTORS
+ 
+ // copy the dscr_asm file from the lib dir to your
+ // own project directory, change it how
+ // you want, and link it against your project
+
+VENDOR COMMANDS
+
+  0xA0 is handled by ez-usb firmware.  (Upload/Download ram)
+  0xA1-0xAF is reserved for other ez-usb functions so don't use that
+  Any other value (Above 0x0C anyway) can be used for device specific
+  commands.
+  
+  If you include this file, you need to define a function for vendor
+  commands even if you don't want to implement any vendor commands.
+  The function should return TRUE if you handled the command and FALSE
+  if you didn't.  The handle_setup function calls
+  EP0CS |= bmHSNAK;
+  before returning so there is no reason to set that bit in your
+  vendor command handler.  (You do need to Set EP0 data and
+  byte counts appropriately though.)
+  
+  // return TRUE if you handle the command 
+  // you can directly get SETUPDAT[0-7] for the data sent with the command
+  BOOL handle_vendorcommand(BYTE cmd) { return FALSE; }
+  // a note  on vencor commands
+  // this from the usb spec for requesttype
+        D7 Data Phase Transfer Direction
+        0 = Host to Device
+        1 = Device to Host
+        D6..5 Type
+        0 = Standard
+        1 = Class
+        2 = Vendor
+        3 = Reserved
+        D4..0 Recipient
+        0 = Device
+        1 = Interface
+        2 = Endpoint
+        3 = Other
+        4..31 = Reserved
+  // if you want libusb to send data back to the host via ep0, you need to make
+  // sure the requesttype had 1 in bit 7.  This is for libusb on linux anyway.
+  
+  
+  // set *alt_ifc to the current alt interface for ifc
+  BOOL handle_get_interface(BYTE ifc, BYTE* alt_ifc) { *ifc=0;*alt_ifc=0;}
+  // return TRUE if you set the interface requested
+  // NOTE this function should reconfigure and reset the endpoints
+  // according to the interface descriptors you provided.
+  BOOL handle_set_interface(BYTE ifc,BYTE alt_ifc) { return TRUE; }
+  // handle getting and setting the configuration
+  // 0 is the default.  If you support more than one config
+  // keep track of the config number and return the correct number
+  // config numbers are set int the dscr file.
+  BYTE handle_get_configuration() { return 1; }
+  // return TRUE if you handle this request
+  // NOTE changing config requires the device to reset all the endpoints
+  BOOL handle_set_configuration(BYTE cfg) { return FALSE; }
+  // ep num (byte 7 is dir 1=IN,0=OUT)
+  // client needs to reset the endpoint to default state
+  void handle_reset_ep(BYTE ep) { }
+
+  \endverbatim
+*/
+
+
+#define SETUP_VALUE() MAKEWORD(SETUPDAT[3],SETUPDAT[2])
+#define SETUP_INDEX() MAKEWORD(SETUPDAT[5],SETUPDAT[4])
+#define SETUP_LENGTH() MAKEWORD(SETUPDAT[7],SETUPDAT[6]) 
+#define SETUP_TYPE SETUPDAT[0]
+
+/**
+ * self_powered is set to FALSE by default.  It is 
+ * used for GET_FEATURE requests.  Firmware can set it to 
+ * TRUE if the device is not powered by the USB bus.
+ **/
+extern volatile BOOL self_powered;
+
+/**
+ * remote_wakeup_allowed defaults to FALSE but can be
+ * set to TRUE with SET_FEATURE from the host. (firmware shouldn't 
+ * set this.)
+ **/
+extern volatile BOOL remote_wakeup_allowed;
+
+//! see TRM 2-3
+//! here are the usb setup data commands
+//! these are the usb spec pretty much
+
+typedef enum {
+    GET_STATUS,
+    CLEAR_FEATURE,
+    // 0x02 is reserved
+    SET_FEATURE=0x03,
+    // 0x04 is reserved
+    SET_ADDRESS=0x05, // this is handled by EZ-USB core unless RENUM=0
+    GET_DESCRIPTOR,
+    SET_DESCRIPTOR,
+    GET_CONFIGURATION,
+    SET_CONFIGURATION,
+    GET_INTERFACE,
+    SET_INTERFACE,
+    SYNC_FRAME
+} SETUP_DATA;
+
+
+/**
+ * returns the control/status register for an end point
+ * (bit 7=1 for IN, 0 for out
+ **/
+__xdata BYTE* ep_addr(BYTE ep);
+
+/*
+ You can call this function directly if you are polling
+ for setup data in your main loop.
+ You can also use the usbjt and enable the sudav isr
+ and call the function from withing the sudav isr routine
+*/
+void handle_setupdata();
+
+
+/**
+    For devices to properly handle usb hispeed
+    (This is if your descriptor has high speed and full speed versions
+     and it should since the fx2lp is a high speed capable device
+    )
+    enable both USBRESET and HISPEED interrupts and
+    call this function to switch the descriptors.  This function uses
+    a __critical section to switch the descriptors and is safe to call
+    from the hispeed or reset interrupt.  See \ref fw.c
+
+    \param highspeed Call the function with highspeed = TRUE if 
+        calling because the highspeed interrupt was received.
+        If calling from usbreset, call with highspeed=false
+**/
+void handle_hispeed( BOOL highspeed );
+
+
+/* descriptor types */
+#define DSCR_DEVICE_TYPE 1
+#define DSCR_CONFIG_TYPE 2
+#define DSCR_STRING_TYPE 3
+#define DSCR_DEVQUAL_TYPE 6
+#define DSCR_OTHERSPD_TYPE 7
+
+/* usb spec 2 */
+#define DSCR_BCD 2
+
+
+/* device descriptor */
+#define DSCR_DEVICE_LEN 18
+
+typedef struct {
+    BYTE dsc_len; // descriptor length (18 for this )
+    BYTE dsc_type; // dscr type
+    WORD bcd; // bcd
+    BYTE dev_class; // device class
+    BYTE dev_subclass; // sub class
+    BYTE dev_protocol; // sub sub class
+    BYTE max_pkt; // max packet size
+    WORD vendor_id;
+    WORD product_id;
+    WORD dev_version; // product version id
+    BYTE idx_manstr; //  manufacturer string index
+    BYTE idx_devstr; // product string index
+    BYTE idx_serstr; // serial number index
+    BYTE num_configs; // number of configurations
+        
+} DEVICE_DSCR;
+
+
+/* config descriptor */
+#define DSCR_CONFIG_LEN 9
+typedef struct {
+    BYTE dsc_len; // 9 for this one
+    BYTE dsc_type; // dscr type
+    
+} CONFIG_DSCR;
+
+/* string descriptor */
+typedef struct {
+    BYTE dsc_len;
+    BYTE dsc_type;
+    BYTE pstr;
+} STRING_DSCR;
+
+
+
+
+#endif
diff --git a/fx2lib/lib/delay.c b/fx2lib/lib/delay.c
new file mode 100644
index 0000000..3e41e19
--- /dev/null
+++ b/fx2lib/lib/delay.c
@@ -0,0 +1,73 @@
+/**
+ * Copyright (C) 2009 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <delay.h>
+
+void delay(WORD millis) {
+    /**
+     * It takes 12 crystal pulses to make 1 machine cycle (8051.com)
+     * ez-usb trm 1.13
+     *  83.3 ns at 48mhz per instruction cycle
+     *  (assume 166.6ns at 24mhz)
+     *  (assume 333.3ns at 12mhz)
+     * ez-usb trm 12.1
+     *  Includes the cycles for each instruction
+     **/    
+    WORD loop_count;
+    volatile WORD count;  // NOTE perhaps use different solutions w/ out volatile
+    
+    
+    // set count to the number of times we need to
+    // go around a loop for 1 millisecond
+    
+    // then do that loop millis times. (1000 us=1ms)
+    
+    // 48mhz: 1000 us / (17 cycles * 83.3 ns / cycle / 1000 ns/us) = 706
+    // 24mhz: 353
+    // 12mhz: 177
+    // recalculate if the number of cycles changes
+    // like if you change the loop below
+    loop_count = CPUFREQ == CLK_12M ? 177 :
+                 CPUFREQ == CLK_24M ? 353 : 706;
+    
+    // sdcc generated assembly
+    /*  cycles   code
+                ;   delay.c:31: do {
+                00101$:
+                ;   delay.c:32: } while ( --count );
+        2           dec _delay_count_1_1
+        2           mov a,#0xff
+        4           cjne    a,_delay_count_1_1,00121$
+        2           dec (_delay_count_1_1 + 1)
+                00121$:
+        2           mov a,_delay_count_1_1
+        2           orl a,(_delay_count_1_1 + 1)
+        3           jnz 00101$
+        
+        Total 17
+    */
+    
+    do {
+        count = loop_count;
+        do {            
+        } while ( --count );        
+    } while ( --millis );
+    
+}
diff --git a/fx2lib/lib/eputils.c b/fx2lib/lib/eputils.c
new file mode 100644
index 0000000..e459aee
--- /dev/null
+++ b/fx2lib/lib/eputils.c
@@ -0,0 +1,60 @@
+/**
+ * Copyright (C) 2009 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+
+
+
+#include <eputils.h>
+
+#include <fx2regs.h>
+
+#ifdef DEBUG_EPUTILS
+#include <stdio.h>
+#else
+#define printf(...)
+#endif
+
+void readep0( BYTE* dst, WORD len) {
+    WORD read = 0; // n bytes read
+    BYTE c,avail;
+    while (read < len) {
+        EP0BCH = 0;
+        // NOTE need syncdelay?
+        EP0BCL = 0; // re-arm ep so host can send more
+        while (EP0CS & bmEPBUSY);
+        avail = EP0BCL; // max size fits in one byte (64 bytes)
+        for (c=0;c<avail;++c)
+            dst[read+c] = EP0BUF[c];
+        read += avail;
+    }
+}
+
+
+void writeep0( BYTE* src, WORD len) {
+    WORD written = 0;
+    BYTE c;
+    while ( written < len ) {
+        while ( EP0CS & bmEPBUSY ); // wait
+        for (c=0;c<64 && written<len;++c ) {
+            EP0BUF[c] = src[written++];
+        }
+        EP0BCH = 0;
+        EP0BCL= c;
+        printf ( "Write %d bytes\n", c );
+    }
+}
diff --git a/fx2lib/lib/gpif.c b/fx2lib/lib/gpif.c
new file mode 100644
index 0000000..9e03361
--- /dev/null
+++ b/fx2lib/lib/gpif.c
@@ -0,0 +1,182 @@
+/**
+ * Copyright (C) 2009 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <delay.h>
+
+#include <gpif.h>
+
+#define SYNCDELAY() SYNCDELAY4
+
+void gpif_init( BYTE* wavedata, BYTE* initdata ) {
+    
+    BYTE i;
+ 
+  // Registers which require a synchronization delay, see section 15.14
+  // FIFORESET        FIFOPINPOLAR
+  // INPKTEND         OUTPKTEND
+  // EPxBCH:L         REVCTL
+  // GPIFTCB3         GPIFTCB2
+  // GPIFTCB1         GPIFTCB0
+  // EPxFIFOPFH:L     EPxAUTOINLENH:L
+  // EPxFIFOCFG       EPxGPIFFLGSEL
+  // PINFLAGSxx       EPxFIFOIRQ
+  // EPxFIFOIE        GPIFIRQ
+  // GPIFIE           GPIFADRH:L
+  // UDMACRCH:L       EPxGPIFTRIG
+  // GPIFTRIG
+  
+  // Note: The pre-REVE EPxGPIFTCH/L register are affected, as well...
+  //      ...these have been replaced by GPIFTC[B3:B0] registers
+ 
+  // 8051 doesn't have access to waveform memories 'til
+  // the part is in GPIF mode.
+ 
+  // IFCLKSRC=1   , FIFOs executes on internal clk source
+  // xMHz=1       , 48MHz internal clk rate
+  // IFCLKOE=0    , Don't drive IFCLK pin signal at 48MHz
+  // IFCLKPOL=0   , Don't invert IFCLK pin signal from internal clk
+  // ASYNC=1      , master samples asynchronous
+  // GSTATE=1     , Drive GPIF states out on PORTE[2:0], debug WF
+  // IFCFG[1:0]=10, FX2 in GPIF master mode  IFCONFIG
+  IFCONFIG &= ~0x03; // turn off IFCFG[1:0]
+  IFCONFIG |= 0x02; // set's IFCFG[1:0] to 10 to put in GPIF master mode.
+  
+ 
+  GPIFABORT = 0xFF;  // abort any waveforms pending
+ 
+  GPIFREADYCFG = initdata[ 0 ];
+  GPIFCTLCFG = initdata[ 1 ];
+  GPIFIDLECS = initdata[ 2 ];
+  GPIFIDLECTL = initdata[ 3 ];
+  GPIFWFSELECT = initdata[ 5 ];
+  GPIFREADYSTAT = initdata[ 6 ];
+ 
+  // use dual autopointer feature... 
+  AUTOPTRSETUP = 0x07;          // inc both pointers, 
+                                // ...warning: this introduces pdata hole(s)
+                                // ...at E67B (XAUTODAT1) and E67C (XAUTODAT2)
+  
+  // source
+  AUTOPTRH1 = MSB( (WORD)wavedata );
+  AUTOPTRL1 = LSB( (WORD)wavedata );
+  
+  // destination
+  AUTOPTRH2 = 0xE4;
+  AUTOPTRL2 = 0x00;
+ 
+  // transfer
+  for ( i = 0x00; i < 128; i++ )
+  {
+    EXTAUTODAT2 = EXTAUTODAT1;
+  }
+ 
+// Configure GPIF Address pins, output initial value,
+// these instructions don't do anything on the
+// smaller chips (e.g., 56 pin model only has ports a,b,d)
+  PORTCCFG = 0xFF;    // [7:0] as alt. func. GPIFADR[7:0]
+  OEC = 0xFF;         // and as outputs
+  PORTECFG |= 0x80;   // [8] as alt. func. GPIFADR[8]
+  OEE |= 0x80;        // and as output
+ 
+// ...OR... tri-state GPIFADR[8:0] pins
+//  PORTCCFG = 0x00;  // [7:0] as port I/O
+//  OEC = 0x00;       // and as inputs
+//  PORTECFG &= 0x7F; // [8] as port I/O
+//  OEE &= 0x7F;      // and as input
+ 
+// GPIF address pins update when GPIFADRH/L written
+  SYNCDELAY();                    // 
+  GPIFADRH = 0x00;    // bits[7:1] always 0
+  SYNCDELAY();                    // 
+  GPIFADRL = 0x00;    // point to PERIPHERAL address 0x0000
+
+// set the initial flowstates to be all 0 in case flow states are not used
+
+  FLOWSTATE = 0;
+  FLOWLOGIC = 0;
+  FLOWEQ0CTL = 0;
+  FLOWEQ1CTL = 0;
+  FLOWHOLDOFF = 0;
+  FLOWSTB = 0;
+  FLOWSTBEDGE = 0;
+  FLOWSTBHPERIOD = 0;
+}
+
+void gpif_setflowstate( BYTE* flowstates, BYTE bank) {
+  BYTE base = 9*bank;
+  FLOWSTATE = flowstates[ base ];
+  FLOWLOGIC = flowstates[ base+1 ];
+  FLOWEQ0CTL = flowstates[ base+2 ];
+  FLOWEQ1CTL = flowstates[ base+3 ];
+  FLOWHOLDOFF = flowstates[ base+4 ];
+  FLOWSTB = flowstates[ base+5 ];
+  FLOWSTBEDGE = flowstates[ base+6 ];
+  FLOWSTBHPERIOD = flowstates[ base+7 ];
+}
+
+void gpif_set_tc32(DWORD tc) {
+    GPIFTCB3 = MSB(MSW(tc));
+    SYNCDELAY();
+    GPIFTCB2 = LSB(MSW(tc));
+    SYNCDELAY();
+    GPIFTCB1 = MSB(LSW(tc));
+    SYNCDELAY();
+    GPIFTCB0 = LSB(LSW(tc));
+}
+void gpif_set_tc16(WORD tc) {
+    GPIFTCB1= MSB(tc);
+    SYNCDELAY();
+    GPIFTCB0= LSB(tc);
+}
+
+
+void gpif_single_read16( WORD* res, WORD len ){
+    BYTE c;    
+    while (!(GPIFTRIG & 0x80)); // wait done
+    // dummy read to trigger real read
+    res[0] = XGPIFSGLDATLX;
+    for (c=0;c<len;++c) {
+     while ( !(GPIFTRIG & 0x80) ); // wait done
+     // real read
+     res[c] = GPIFSGLDATH << 8;
+     // whether or not to do another transfer is controlled by GPIFSGLDATLNOX or ..DATLX
+     res[c] |= c==len-1 ? GPIFSGLDATLNOX : GPIFSGLDATLX ;
+    }
+}
+
+void gpif_single_write16( WORD* dat, WORD len) {
+   BYTE c;
+   for (c=0;c<len;++c) {
+    while (!(GPIFTRIG & 0x80) );
+    XGPIFSGLDATH = MSB(dat[c]);
+    XGPIFSGLDATLX = LSB(dat[c]);
+   }
+}
+
+void gpif_fifo_read ( GPIF_EP_NUM ep_num ) {
+    while ( !(GPIFTRIG & 0x80 ) ); // wait until things are finished
+    GPIFTRIG = GPIFTRGRD | ep_num;
+}
+
+void gpif_fifo_write ( GPIF_EP_NUM ep_num ) {
+    while ( !(GPIFTRIG & 0x80) ); // wait until things are finished
+    GPIFTRIG = ep_num; // R/W=0, E[1:0] = ep_num
+}
diff --git a/fx2lib/lib/i2c.c b/fx2lib/lib/i2c.c
new file mode 100644
index 0000000..c18bcee
--- /dev/null
+++ b/fx2lib/lib/i2c.c
@@ -0,0 +1,298 @@
+/**
+ * Copyright (C) 2009 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <stdio.h> // NOTE this needs deleted
+
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <i2c.h>
+#include <delay.h>
+
+
+//#define DEBUG_I2C 1
+
+#ifdef DEBUG_I2C
+#define i2c_printf(...) printf(__VA_ARGS__)
+#else
+#define i2c_printf(...)
+#endif
+
+
+volatile __xdata BOOL cancel_i2c_trans;
+#define CHECK_I2C_CANCEL() if (cancel_i2c_trans) return FALSE
+
+/**
+ *
+    1. Set START=1. If BERR=1, start timer*.
+    2. Write the 7-bit peripheral address and the direction bit (0 for a write) to I2DAT.
+    3. Wait for DONE=1 or for timer to expire*. If BERR=1, go to step 1.
+    4. If ACK=0, go to step 9.
+    5. Load I2DAT with a data byte.
+    6. Wait for DONE=1*. If BERR=1, go to step 1.
+    7. If ACK=0, go to step 9.
+    8. Repeat steps 5-7 for each byte until all bytes have been transferred.
+    9. Set STOP=1. Wait for STOP = 0 before initiating another transfer.
+ **/
+BOOL i2c_write ( BYTE addr, WORD len, BYTE *addr_buf, WORD len2, BYTE* data_buf ) {
+    
+    WORD cur_byte;
+    WORD total_bytes = len+len2; // NOTE overflow error?
+    BYTE retry_count=2; // two tries to write address/read ack
+    cancel_i2c_trans=FALSE;
+    //BOOL wait=FALSE; // use timer if needed
+
+    // 1. Set START=1. If BERR=1, start timer*.
+    step1:
+        CHECK_I2C_CANCEL();
+        cur_byte=0;
+        I2CS |= bmSTART;
+        if ( I2CS & bmBERR ) {
+            i2c_printf ( "Woops.. need to do the timer\n" );
+            delay(10); // way too long probably
+            goto step1;
+            }
+   
+    
+    // 2. Write the 7-bit peripheral address and the direction bit (0 for a write) to I2DAT.
+        I2DAT = addr << 1;
+        
+    // 3. Wait for DONE=1 or for timer to expire*. If BERR=1, go to step 1.
+        while ( !(I2CS & bmDONE) && !cancel_i2c_trans);
+        CHECK_I2C_CANCEL();
+        if (I2CS&bmBERR) {
+            i2c_printf ( "bmBERR, going to step 1\n" );
+            goto step1;
+        }
+    
+        
+    // 4. If ACK=0, go to step 9.
+    if ( !(I2CS & bmACK) ) {
+        I2CS |= bmSTOP;
+        while ( (I2CS & bmSTOP) && !cancel_i2c_trans);
+        CHECK_I2C_CANCEL();
+        --retry_count;
+        if (!retry_count){
+            i2c_printf ( "No ack after writing address.! Fail\n");
+            return FALSE;
+        }
+        delay(10);
+        goto step1;
+    }
+    
+    // 8. Repeat steps 5-7 for each byte until all bytes have been transferred.
+    while ( cur_byte < total_bytes ) {
+        // 5. Load I2DAT with a data byte.
+        I2DAT = cur_byte < len ? addr_buf[cur_byte] : data_buf[cur_byte-len];
+        ++cur_byte;
+        // 6. Wait for DONE=1*. If BERR=1, go to step 1.
+        while (!(I2CS&bmDONE) && !cancel_i2c_trans); CHECK_I2C_CANCEL();
+        if ( I2CS&bmBERR ) {
+         i2c_printf ( "bmBERR on byte %d. Going to step 1\n" , cur_byte-1 );
+         goto step1;
+         //return FALSE;
+        }
+        // 7. If ACK=0, go to step 9.
+        if ( !(I2CS & bmACK) ) {
+            I2CS |= bmSTOP;
+            while ( (I2CS&bmSTOP) && !cancel_i2c_trans);
+            i2c_printf ( "No Ack after byte %d. Fail\n", cur_byte-1 );
+            return FALSE; 
+        }
+    }
+
+    
+    // 9. Set STOP=1. Wait for STOP = 0 before initiating another transfer.
+    //real step 9
+    I2CS |= bmSTOP;
+    while ( (I2CS & bmSTOP) && !cancel_i2c_trans);
+    CHECK_I2C_CANCEL();
+
+    return TRUE;
+
+}
+
+/*
+ trm 13.4.4
+ 
+    1. Set START=1. If BERR = 1, start timer*.
+    2. Write the 7-bit peripheral address and the direction bit (1 for a read) to I2DAT.
+    3. Wait for DONE=1 or for timer to expire*. If BERR=1, go to step 1.
+    4. If ACK=0, set STOP=1 and go to step 15.
+    5. Read I2DAT to initiate the first burst of nine SCL pulses to clock in the first byte from the slave.
+    Discard the value that was read from I2DAT.
+    6. Wait for DONE=1. If BERR=1, go to step 1.
+    7. Read the just-received byte of data from I2DAT. This read also initiates the next read transfer.
+    8. Repeat steps 6 and 7 for each byte until ready to read the second-to-last byte.
+    9. Wait for DONE=1. If BERR=1, go to step 1.
+    10. Before reading the second-to-last I2DAT byte, set LASTRD=1.
+    11. Read the second-to-last byte from I2DAT. With LASTRD=1, this initiates the final byte read on
+    the bus.
+    12. Wait for DONE=1. If BERR=1, go to step 1.
+    13. Set STOP=1.
+    14. Read the final byte from I2DAT immediately (the next instruction) after setting the STOP bit. By
+    reading I2DAT while the "stop" condition is being generated, the just-received data byte will be
+    retrieved without initiating an extra read transaction (nine more SCL pulses) on the I²Cbus.
+    15. Wait for STOP = 0 before initiating another transfer
+*/
+
+/*
+  * timer should be at least as long as longest start-stop interval on the bus
+  serial clock for i2c bus runs at 100khz by default and can run at 400khz for devices that support it
+  start-stop interval is about 9 serial clock cycles
+  400KHZ bit 0=100khz, 1=400khz
+  
+  how many cycles at XTAL cycles/second = 9 cycles at 400k (or 100k) cycles/second
+  
+  timeout = n i2c cycles / I2C cycles/sec = timeout seconds
+          timeout seconds * XTAL cycles/sec = XTAL cycles
+          9 / 400 (or 100) * (XTAL)
+  
+*/
+BOOL i2c_read( BYTE addr, WORD len, BYTE* buf) {
+    
+    
+    BYTE tmp;
+    WORD cur_byte;
+    cancel_i2c_trans=FALSE;
+    //WORD timeout_cycles = (WORD)(9.0 * XTAL / I2CFREQ );
+    
+    // 1. Set START=1. If BERR = 1, start timer*.
+    start:
+        CHECK_I2C_CANCEL();
+        cur_byte=0;        
+
+        I2CS |= bmSTART;
+        if ( I2CS & bmBERR ) {            
+            i2c_printf ( "Woops, step1 BERR, need to do timeout\n");
+            delay(10); // NOTE way too long
+            goto start;
+        }
+        
+    // 2. Write the 7-bit peripheral address and the direction bit (1 for a read) to I2DAT.
+        I2DAT = (addr << 1) | 1; // last 1 for read
+    
+    // 3. Wait for DONE=1 or for timer to expire*. If BERR=1, go to step 1.
+                
+        while ( !(I2CS & bmDONE) && !cancel_i2c_trans ); CHECK_I2C_CANCEL();
+        if ( I2CS & bmBERR )
+            goto start;
+            
+    // 4. If ACK=0, set STOP=1 and go to step 15.
+        if (!(I2CS&bmACK) ) {
+            I2CS |= bmSTOP;
+            while ( (I2CS&bmSTOP) && !cancel_i2c_trans );
+            return FALSE; 
+        }
+        
+    // with only one byte to read, this needs set here.
+    // (In this case, the tmp read is the 2nd to last read)
+    if ( len==1 ) I2CS |= bmLASTRD; 
+        
+    // 5. Read I2DAT to initiate the first burst of nine SCL pulses to clock in the first byte from the slave.
+    //    Discard the value that was read from I2DAT.
+        tmp = I2DAT; // discard read
+    
+    while (len>cur_byte+1) { // reserve last byte read for after the loop
+        
+        // 6. Wait for DONE=1. If BERR=1, go to step 1.
+        // 9. Wait for DONE=1. If BERR=1, go to step 1.
+        while (!(I2CS&bmDONE) && !cancel_i2c_trans); CHECK_I2C_CANCEL(); 
+        if ( I2CS&bmBERR ) goto start;
+
+        // 10. Before reading the second-to-last I2DAT byte, set LASTRD=1.
+        if (len==cur_byte+2) // 2nd to last byte
+            I2CS |= bmLASTRD;
+        
+        // 7. Read the just-received byte of data from I2DAT. This read also initiates the next read transfer.
+        // 11. Read the second-to-last byte from I2DAT. With LASTRD=1, this initiates the final byte read on
+        //     the bus.
+            buf[cur_byte++] = I2DAT;
+                        
+        // 8. Repeat steps 6 and 7 for each byte until ready to read the second-to-last byte.
+    }
+    
+    //12. Wait for DONE=1. If BERR=1, go to step 1.
+        while (!(I2CS&bmDONE) && !cancel_i2c_trans); CHECK_I2C_CANCEL();
+        if ( I2CS&bmBERR ) goto start;
+    // 13. Set STOP=1.
+        I2CS |= bmSTOP;
+    // 14. Read the final byte from I2DAT immediately (the next instruction) after setting the STOP bit. By
+    // reading I2DAT while the "stop" condition is being generated, the just-received data byte will be
+    // retrieved without initiating an extra read transaction (nine more SCL pulses) on the I²Cbus.
+        buf[cur_byte] = I2DAT; // use instead of buffer addressing so next instruction reads I2DAT
+
+    while ( (I2CS&bmSTOP) && !cancel_i2c_trans); CHECK_I2C_CANCEL();
+
+    return TRUE;
+}
+
+
+
+BOOL eeprom_write(BYTE prom_addr, WORD addr, WORD length, BYTE* buf) {
+    BYTE addr_len=0;
+    // 1st bytes of buffer are address and next byte is value
+    BYTE data_buffer[3];
+    WORD cur_byte=0;
+
+#ifdef DEBUG_I2C
+    if ( EEPROM_TWO_BYTE ) {
+        i2c_printf ( "Two Byte EEProm Address detected.\n" );
+    } else {
+        i2c_printf ( "Single Byte EEProm address detected.\n" );
+    }
+#endif
+    
+    while ( cur_byte<length ) {
+        addr_len=0;
+        if (EEPROM_TWO_BYTE) {
+            data_buffer[addr_len++] = MSB(addr);
+        }
+        data_buffer[addr_len++] = LSB(addr);
+        data_buffer[addr_len++] = buf[cur_byte++];
+
+        i2c_printf ( "%02x " , data_buffer[addr_len-1] );
+        
+        if ( ! i2c_write ( prom_addr, addr_len, data_buffer, 0, NULL ) ) return FALSE;
+        ++addr; // next byte goes to next address
+    }
+
+    return TRUE;
+    
+}
+
+
+BOOL eeprom_read (BYTE prom_addr, WORD addr, WORD length, BYTE *buf)
+{
+
+    BYTE eeprom_addr[2];
+    BYTE addr_len=0;
+    if (EEPROM_TWO_BYTE) 
+        eeprom_addr[addr_len++] = MSB(addr);
+    
+    eeprom_addr[addr_len++] = LSB(addr);
+
+    // write the address we want to read to the prom
+    //printf ("Starting Addr Write with addr len %d\n", addr_len);
+    if ( !i2c_write( prom_addr, addr_len, eeprom_addr, 0, NULL ) ) return FALSE;
+    //printf ( "Starting read\n" );
+    if ( !i2c_read ( prom_addr, length, buf ) ) return FALSE;
+
+    return TRUE;
+    
+}
+
diff --git a/fx2lib/lib/int4av.a51 b/fx2lib/lib/int4av.a51
new file mode 100644
index 0000000..85bce78
--- /dev/null
+++ b/fx2lib/lib/int4av.a51
@@ -0,0 +1,28 @@
+; Copyright (C) 2010 Ubixum, Inc. 
+;
+; This library is free software; you can redistribute it and/or
+; modify it under the terms of the GNU Lesser General Public
+; License as published by the Free Software Foundation; either
+; version 2.1 of the License, or (at your option) any later version.
+; 
+; This library is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+; Lesser General Public License for more details.
+; 
+; You should have received a copy of the GNU Lesser General Public
+; License along with this library; if not, write to the Free Software
+; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+.module INT4AV ; jump table for int4AV (GPIF & endpoint interrupts)
+
+.globl _INT4JT
+
+.area INT4AV (ABS,OVR)
+.org    0x53 ; where INT4 jumps to 
+_INT4AV = #. + 2
+    ljmp _INT2JT ; the addr gets replaced so this really goes to int4jt locations
+
+
+.area INT4JT ( CODE )
+_INT4JT: ; doesn't do anything but forces this module to be linked in if gpif macro used.
diff --git a/fx2lib/lib/interrupts/ep0ack_isr.c b/fx2lib/lib/interrupts/ep0ack_isr.c
new file mode 100644
index 0000000..3ea4b1e
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep0ack_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep0ack_isr() __interrupt EP0ACK_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep0in_isr.c b/fx2lib/lib/interrupts/ep0in_isr.c
new file mode 100644
index 0000000..d0ebc22
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep0in_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep0in_isr() __interrupt EP0IN_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep0out_isr.c b/fx2lib/lib/interrupts/ep0out_isr.c
new file mode 100644
index 0000000..5c76574
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep0out_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep0out_isr() __interrupt EP0OUT_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep0ping_isr.c b/fx2lib/lib/interrupts/ep0ping_isr.c
new file mode 100644
index 0000000..85716c9
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep0ping_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep0ping_isr() __interrupt EP0PING_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep1in_isr.c b/fx2lib/lib/interrupts/ep1in_isr.c
new file mode 100644
index 0000000..afc8841
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep1in_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep1in_isr() __interrupt EP1IN_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep1out_isr.c b/fx2lib/lib/interrupts/ep1out_isr.c
new file mode 100644
index 0000000..51f5b5c
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep1out_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep1out_isr() __interrupt EP1OUT_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep1ping_isr.c b/fx2lib/lib/interrupts/ep1ping_isr.c
new file mode 100644
index 0000000..fa77349
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep1ping_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep1ping_isr() __interrupt EP1PING_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep2_isr.c b/fx2lib/lib/interrupts/ep2_isr.c
new file mode 100644
index 0000000..d91764e
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep2_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep2_isr() __interrupt EP2_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep2ef_isr.c b/fx2lib/lib/interrupts/ep2ef_isr.c
new file mode 100644
index 0000000..d1509a7
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep2ef_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep2ef_isr() __interrupt EP2EF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep2ff_isr.c b/fx2lib/lib/interrupts/ep2ff_isr.c
new file mode 100644
index 0000000..ebfa8f1
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep2ff_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep2ff_isr() __interrupt EP2FF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep2isoerr_isr.c b/fx2lib/lib/interrupts/ep2isoerr_isr.c
new file mode 100644
index 0000000..1bd1a72
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep2isoerr_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep2isoerr_isr() __interrupt EP2ISOERR_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep2pf_isr.c b/fx2lib/lib/interrupts/ep2pf_isr.c
new file mode 100644
index 0000000..f12c5ba
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep2pf_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep2pf_isr() __interrupt EP2PF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep2ping_isr.c b/fx2lib/lib/interrupts/ep2ping_isr.c
new file mode 100644
index 0000000..e292648
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep2ping_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep2ping_isr() __interrupt EP2PING_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep4_isr.c b/fx2lib/lib/interrupts/ep4_isr.c
new file mode 100644
index 0000000..249162e
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep4_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep4_isr() __interrupt EP4_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep4ef_isr.c b/fx2lib/lib/interrupts/ep4ef_isr.c
new file mode 100644
index 0000000..3e6f102
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep4ef_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep4ef_isr() __interrupt EP4EF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep4ff_isr.c b/fx2lib/lib/interrupts/ep4ff_isr.c
new file mode 100644
index 0000000..eb15bdb
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep4ff_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep4ff_isr() __interrupt EP4FF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep4isoerr_isr.c b/fx2lib/lib/interrupts/ep4isoerr_isr.c
new file mode 100644
index 0000000..bd874c5
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep4isoerr_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep4isoerr_isr() __interrupt EP4ISOERR_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep4pf_isr.c b/fx2lib/lib/interrupts/ep4pf_isr.c
new file mode 100644
index 0000000..a8d3f08
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep4pf_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep4pf_isr() __interrupt EP4PF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep4ping_isr.c b/fx2lib/lib/interrupts/ep4ping_isr.c
new file mode 100644
index 0000000..14b39cc
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep4ping_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep4ping_isr() __interrupt EP4PING_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep6_isr.c b/fx2lib/lib/interrupts/ep6_isr.c
new file mode 100644
index 0000000..dc6551e
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep6_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep6_isr() __interrupt EP6_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep6ef_isr.c b/fx2lib/lib/interrupts/ep6ef_isr.c
new file mode 100644
index 0000000..cf29ba7
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep6ef_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep6ef_isr() __interrupt EP6EF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep6ff_isr.c b/fx2lib/lib/interrupts/ep6ff_isr.c
new file mode 100644
index 0000000..3777f6e
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep6ff_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep6ff_isr() __interrupt EP6FF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep6isoerr_isr.c b/fx2lib/lib/interrupts/ep6isoerr_isr.c
new file mode 100644
index 0000000..f660858
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep6isoerr_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep6isoerr_isr() __interrupt EP6ISOERR_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep6pf_isr.c b/fx2lib/lib/interrupts/ep6pf_isr.c
new file mode 100644
index 0000000..bc1ae7b
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep6pf_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep6pf_isr() __interrupt EP6PF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep6ping_isr.c b/fx2lib/lib/interrupts/ep6ping_isr.c
new file mode 100644
index 0000000..eaabbbc
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep6ping_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep6ping_isr() __interrupt EP6PING_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep8_isr.c b/fx2lib/lib/interrupts/ep8_isr.c
new file mode 100644
index 0000000..a82eef0
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep8_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep8_isr() __interrupt EP8_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep8ef_isr.c b/fx2lib/lib/interrupts/ep8ef_isr.c
new file mode 100644
index 0000000..deca21e
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep8ef_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep8ef_isr() __interrupt EP8EF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep8ff_isr.c b/fx2lib/lib/interrupts/ep8ff_isr.c
new file mode 100644
index 0000000..6fcb0c1
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep8ff_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep8ff_isr() __interrupt EP8FF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep8isoerr_isr.c b/fx2lib/lib/interrupts/ep8isoerr_isr.c
new file mode 100644
index 0000000..0d75ff4
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep8isoerr_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep8isoerr_isr() __interrupt EP8ISOERR_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ep8pf_isr.c b/fx2lib/lib/interrupts/ep8pf_isr.c
new file mode 100644
index 0000000..f3a329c
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep8pf_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep8pf_isr() __interrupt EP8PF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/ep8ping_isr.c b/fx2lib/lib/interrupts/ep8ping_isr.c
new file mode 100644
index 0000000..0bc4abf
--- /dev/null
+++ b/fx2lib/lib/interrupts/ep8ping_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ep8ping_isr() __interrupt EP8PING_ISR {}
+
diff --git a/fx2lib/lib/interrupts/errlimit_isr.c b/fx2lib/lib/interrupts/errlimit_isr.c
new file mode 100644
index 0000000..115418d
--- /dev/null
+++ b/fx2lib/lib/interrupts/errlimit_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void errlimit_isr() __interrupt ERRLIMIT_ISR {}
+
diff --git a/fx2lib/lib/interrupts/gpifdone_isr.c b/fx2lib/lib/interrupts/gpifdone_isr.c
new file mode 100644
index 0000000..6b8b48d
--- /dev/null
+++ b/fx2lib/lib/interrupts/gpifdone_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void gpifdone_isr() __interrupt GPIFDONE_ISR{}
+
diff --git a/fx2lib/lib/interrupts/gpifwf_isr.c b/fx2lib/lib/interrupts/gpifwf_isr.c
new file mode 100644
index 0000000..de0ab4d
--- /dev/null
+++ b/fx2lib/lib/interrupts/gpifwf_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void gpifwf_isr() __interrupt GPIFWF_ISR{}
+
diff --git a/fx2lib/lib/interrupts/hispeed_isr.c b/fx2lib/lib/interrupts/hispeed_isr.c
new file mode 100644
index 0000000..14f440a
--- /dev/null
+++ b/fx2lib/lib/interrupts/hispeed_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void hispeed_isr() __interrupt HISPEED_ISR {}
+
diff --git a/fx2lib/lib/interrupts/ibn_isr.c b/fx2lib/lib/interrupts/ibn_isr.c
new file mode 100644
index 0000000..4f54937
--- /dev/null
+++ b/fx2lib/lib/interrupts/ibn_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void ibn_isr() __interrupt IBN_ISR {}
+
diff --git a/fx2lib/lib/interrupts/sof_isr.c b/fx2lib/lib/interrupts/sof_isr.c
new file mode 100644
index 0000000..15349c8
--- /dev/null
+++ b/fx2lib/lib/interrupts/sof_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void sof_isr() __interrupt SOF_ISR {}
+
diff --git a/fx2lib/lib/interrupts/spare_isr.c b/fx2lib/lib/interrupts/spare_isr.c
new file mode 100644
index 0000000..fa84995
--- /dev/null
+++ b/fx2lib/lib/interrupts/spare_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void spare_isr() __interrupt RESERVED_ISR {}
+
diff --git a/fx2lib/lib/interrupts/sudav_isr.c b/fx2lib/lib/interrupts/sudav_isr.c
new file mode 100644
index 0000000..e72a1a1
--- /dev/null
+++ b/fx2lib/lib/interrupts/sudav_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void sudav_isr() __interrupt SUDAV_ISR {}
+
diff --git a/fx2lib/lib/interrupts/suspend_isr.c b/fx2lib/lib/interrupts/suspend_isr.c
new file mode 100644
index 0000000..ef56b9c
--- /dev/null
+++ b/fx2lib/lib/interrupts/suspend_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void suspend_isr() __interrupt SUSPEND_ISR {}
+
diff --git a/fx2lib/lib/interrupts/sutok_isr.c b/fx2lib/lib/interrupts/sutok_isr.c
new file mode 100644
index 0000000..d857eb7
--- /dev/null
+++ b/fx2lib/lib/interrupts/sutok_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void sutok_isr() __interrupt SUTOK_ISR {}
+
diff --git a/fx2lib/lib/interrupts/usbreset_isr.c b/fx2lib/lib/interrupts/usbreset_isr.c
new file mode 100644
index 0000000..cf0bc47
--- /dev/null
+++ b/fx2lib/lib/interrupts/usbreset_isr.c
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2010 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+#include <autovector.h>
+
+void usbreset_isr() __interrupt USBRESET_ISR {}
+
diff --git a/fx2lib/lib/serial.c b/fx2lib/lib/serial.c
new file mode 100644
index 0000000..094d311
--- /dev/null
+++ b/fx2lib/lib/serial.c
@@ -0,0 +1,92 @@
+/**
+ * Copyright (C) 2009 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <serial.h>
+
+
+/**
+ * using the comp port implies that timer 2 will be used as
+ * a baud rate generator.  (Don't use timer 2)
+ **/
+void sio0_init( WORD baud_rate ) __critical { // baud_rate max should be 57600 since int=2 bytes
+	
+    WORD hl; // hl value for reload	
+	BYTE mult; // multiplier for clock speed
+    DWORD tmp; // scratch for mult/divide
+
+    // 0 = 12mhz, 1=24mhz, 2=48mhz    
+	mult = CPUFREQ == CLK_12M ? 1 :
+           CPUFREQ == CLK_24M ? 2 : 4; // since only 3 clock speeds, fast switch instead of doing 2^clock speed pow(2,clkspd)
+
+	// set the clock rate
+	// use clock 2
+	RCLK=1;TCLK=1;
+
+//    RCAP2H:L = 0xFFFF - CLKOUT / 32 x baud_rate
+
+    // in order to round to nearest value..
+    // tmp * 2 // double
+    // tmp / rate // do the divide
+    // tmp + 1 // add one (which is like adding 1/2)
+    // tmp / 2 // back to original rounded 
+    tmp = mult * 375000L * 2 ;
+    tmp /= baud_rate;
+    tmp += 1;
+    tmp /= 2;
+
+    hl = 0xFFFF - (WORD)tmp;
+
+	RCAP2H= MSB(hl);
+	// seems that the 24/48mhz calculations are always one less than suggested values    
+    // trm table 14-16
+	RCAP2L= LSB(hl) + (mult>0?1:0);
+	TR2=1; // start the timer
+	
+	// set up the serial port	
+	SM0 = 0; SM1=1;// serial mode 1 (asyncronous)	
+	SM2 = 0 ; // has to do with receiving
+	REN = 1 ; // to enable receiving
+    PCON |= 0x80; // SET SMOD0, baud rate doubler
+    TI = 1; // we send initial byte
+
+}
+
+char getchar() {
+  char c;
+  while (!RI)
+    ;  
+  c=SBUF0;
+  RI=0;
+  return c;
+}
+
+void _transchar(char c) {
+ while ( !TI ); // wait for TI=1 
+ TI=0;
+ SBUF0=c;
+}
+
+void putchar (char c) {
+  if (c=='\n') _transchar('\r'); // transmit \r\n
+  _transchar(c);  
+  if (c == '\r' ) _transchar('\n'); // transmit \r\n
+}
+
diff --git a/fx2lib/lib/setupdat.c b/fx2lib/lib/setupdat.c
new file mode 100644
index 0000000..f4c217a
--- /dev/null
+++ b/fx2lib/lib/setupdat.c
@@ -0,0 +1,367 @@
+/**
+ * Copyright (C) 2009 Ubixum, Inc. 
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ **/
+
+//#define DEBUG_SETUPDAT
+
+#ifdef DEBUG_SETUPDAT
+#include <stdio.h> // NOTE this needs deleted
+#else
+#define printf(...)
+#define NULL (void*)0;
+#endif
+
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <eputils.h>
+#include <setupdat.h>
+
+
+extern BOOL handle_vendorcommand(BYTE cmd);
+extern BOOL handle_set_configuration(BYTE cfg);
+extern BOOL handle_get_interface(BYTE ifc, BYTE* alt_ifc);
+extern BOOL handle_set_interface(BYTE ifc,BYTE alt_ifc);
+extern BYTE handle_get_configuration();
+extern BOOL handle_set_configuration(BYTE cfg);
+extern void handle_reset_ep(BYTE ep);
+
+/**
+ * Predefs for handlers
+ **/
+
+
+//  GET_STATUS,
+BOOL handle_get_status();
+//  CLEAR_FEATURE,
+BOOL handle_clear_feature();
+  // 0x02 is reserved
+//  SET_FEATURE=0x03,
+BOOL handle_set_feature();
+  // 0x04 is reserved
+//  SET_ADDRESS=0x05, // this is handled by EZ-USB core unless RENUM=0
+//  GET_DESCRIPTOR,
+void handle_get_descriptor();
+//  SET_DESCRIPTOR,
+//  GET_CONFIGURATION, // handled by callback
+//  SET_CONFIGURATION, // handled by callback
+//  GET_INTERFACE, // handled by callback
+//  SET_INTERFACE, // handled by callback
+//  SYNC_FRAME // not yet implemented
+
+/*
+ TRM 2.2
+ Setup Token ->
+ data transfer ->
+ handshake
+*/
+
+void handle_setupdata() {
+    //printf ( "Handle setupdat: %02x\n", SETUPDAT[1] );
+
+    switch ( SETUPDAT[1] ) {
+
+        case GET_STATUS:
+            if (!handle_get_status())
+                STALLEP0();
+            break;
+        case CLEAR_FEATURE:
+            if (!handle_clear_feature()) {
+                STALLEP0();
+            }
+            break;
+        case SET_FEATURE:
+            if (!handle_set_feature()) {
+                STALLEP0();
+            }
+            break;
+        case GET_DESCRIPTOR:
+            handle_get_descriptor();
+            break;
+        case GET_CONFIGURATION:            
+            EP0BUF[0] = handle_get_configuration();
+            EP0BCH=0;
+            EP0BCL=1;
+            break;
+        case SET_CONFIGURATION:
+            // user callback
+            if( !handle_set_configuration(SETUPDAT[2])) {
+                STALLEP0();
+            }
+            break;
+        case GET_INTERFACE:
+            {
+                BYTE alt_ifc;
+                if (!handle_get_interface(SETUPDAT[4],&alt_ifc)) {
+                    STALLEP0();
+                } else {
+                 EP0BUF[0] = alt_ifc;
+                 EP0BCH=0;
+                 EP0BCL=1;
+                }
+            }
+            break;
+        case SET_INTERFACE:
+            // user callback
+            if ( !handle_set_interface(SETUPDAT[4],SETUPDAT[2])) {
+                STALLEP0();
+            }
+            break;
+        default:
+         if (!handle_vendorcommand(SETUPDAT[1])) {
+            printf ( "Unhandled Vendor Command: %02x\n" , SETUPDAT[1] );
+            STALLEP0();
+         }
+        
+        
+    }
+    
+    // do the handshake
+    EP0CS |= bmHSNAK;
+    
+}
+
+__xdata BYTE* ep_addr(BYTE ep) { // bit 8 of ep_num is the direction
+ BYTE ep_num = ep&~0x80; // mask the direction
+ switch (ep_num) {
+  case 0: return &EP0CS;
+  case 1: return ep&0x80? &EP1INCS : &EP1OUTCS;
+  case 2: return &EP2CS;
+  case 4: return &EP4CS;
+  case 6: return &EP6CS;
+  case 8: return &EP8CS;
+  default: return NULL;
+ }
+}
+
+
+// Get status has three request types
+#define GS_DEVICE 0x80
+#define GS_INTERFACE 0x81
+#define GS_ENDPOINT 0x82
+
+
+volatile BOOL self_powered=FALSE;
+volatile BOOL remote_wakeup_allowed=FALSE;
+
+BOOL handle_get_status() {
+    
+    switch ( SETUPDAT[0] ) {
+
+//        case 0: // sometimes we get a 0 status too
+        case GS_INTERFACE: 
+            EP0BUF[0] = 0;
+            EP0BUF[1] = 0;
+            EP0BCH=0;
+            EP0BCL=2;
+            break;
+        case GS_DEVICE:
+
+            // two byte response
+            // byte 0 bit 0 = self powered bit 1 = remote wakeup
+            EP0BUF[0] = (remote_wakeup_allowed << 1) | self_powered;
+            // byte 1 = 0
+            EP0BUF[1] = 0;
+            EP0BCH = 0;
+            EP0BCL = 2;
+            break;
+        case GS_ENDPOINT:
+            {
+                __xdata BYTE* pep=ep_addr(SETUPDAT[4]);
+                if ( !pep ) return FALSE;
+                // byte 0 bit 0 = stall bit
+                EP0BUF[0] = *pep & bmEPSTALL ? 1 : 0;
+                EP0BUF[1] = 0;
+                EP0BCH=0;
+                EP0BCL=2;
+            }
+            break;
+        default:
+            printf ( "Unexpected Get Status: %02x\n", SETUPDAT[0] );
+            return FALSE;
+            
+                        
+    }
+    return TRUE;
+}
+
+
+#define GF_DEVICE 0
+#define GF_ENDPOINT 2
+
+BOOL handle_clear_feature() {
+ //printf ( "Clear Feature\n" );
+ switch ( SETUPDAT[0] ) {
+   case GF_DEVICE:
+    if (SETUPDAT[2] == 1) {
+        remote_wakeup_allowed=FALSE;
+        break;
+    }
+    return FALSE;
+   case GF_ENDPOINT:
+    if (SETUPDAT[2] == 0) { // ep stall feature
+        __xdata BYTE* pep=ep_addr(SETUPDAT[4]);
+        printf ( "unstall endpoint %02X\n" , SETUPDAT[4] );
+        *pep &= ~bmEPSTALL;        
+    } else {
+        printf ( "unsupported ep feature %02x", SETUPDAT[2] );
+        return FALSE;
+    }
+
+    break;
+   default:
+    return handle_vendorcommand(SETUPDAT[1]);
+ }
+ return TRUE;
+}
+
+BOOL handle_set_feature() {
+ printf ( "Set Feature %02x\n", SETUPDAT[0] );
+ switch ( SETUPDAT[0] ) {
+  case GF_DEVICE:
+    if (SETUPDAT[2] == 2) break; // this is TEST_MODE and we simply need to return the handshake
+    if (SETUPDAT[2] == 1) {
+       remote_wakeup_allowed=TRUE; 
+       break;
+    }
+    return FALSE;
+  case GF_ENDPOINT:
+    if ( SETUPDAT[2] == 0 ) { // ep stall feature
+        // set TRM 2.3.2
+        // stall and endpoint
+        __xdata BYTE* pep = ep_addr(SETUPDAT[4]);
+        printf ( "Stall ep %d\n", SETUPDAT[4] );
+        if (!pep) {            
+            return FALSE;
+        }
+        
+        *pep |= bmEPSTALL;
+        // should now reset data toggles
+        // write ep+dir to TOGCTL
+        RESETTOGGLE(SETUPDAT[4]);
+        // restore stalled ep to default condition
+        // NOTE
+        //handle_reset_ep(SETUPDAT[4]);
+        
+    } else {
+        printf ( "unsupported ep feature %02x\n", SETUPDAT[2] );
+        return FALSE;
+    }  
+   break;
+   default:
+    return handle_vendorcommand(SETUPDAT[1]);
+ }
+ return TRUE;
+}
+
+/* these are devined in dscr.asm
+   and need to be customized then
+   linked in by the firmware manually */
+extern __code WORD dev_dscr;
+extern __code WORD dev_qual_dscr;
+extern __code WORD highspd_dscr;
+extern __code WORD fullspd_dscr;
+extern __code WORD dev_strings;
+
+WORD pDevConfig = (WORD)&fullspd_dscr;
+WORD pOtherConfig = (WORD)&highspd_dscr;
+
+void handle_hispeed(BOOL highspeed) {
+ __critical { 
+     printf ( "Hi Speed or reset Interrupt\n" );
+     if (highspeed) {
+         pDevConfig=(WORD)&highspd_dscr;
+         pOtherConfig=(WORD)&fullspd_dscr;
+     } else {
+        pDevConfig=(WORD)&fullspd_dscr;
+        pOtherConfig=(WORD)&highspd_dscr;
+     }
+ }
+}
+
+/**
+ * Handle:
+ *  Device Descriptor
+ *  Device Qualifier
+ *  Configuration
+ *  String
+ *  Other-Speed
+ **/
+void handle_get_descriptor() {
+    //printf ( "Get Descriptor\n" );
+    
+    switch ( SETUPDAT[3] ) {
+        case DSCR_DEVICE_TYPE:
+            printf ( "Get Device Config\n" );
+            SUDPTRH = MSB((WORD)&dev_dscr);
+            SUDPTRL = LSB((WORD)&dev_dscr);
+            break;
+        case DSCR_CONFIG_TYPE:
+            // get the config descriptor
+            printf ( "Get Config Descriptor\n");
+            SUDPTRH = MSB(pDevConfig);
+            SUDPTRL = LSB(pDevConfig);
+            break;        
+        case DSCR_STRING_TYPE:
+            //printf ( "Get String Descriptor idx: %d\n", SETUPDAT[2] );
+            {
+                STRING_DSCR* pStr = (STRING_DSCR*)&dev_strings;
+                // pStr points to string 0
+                BYTE idx = SETUPDAT[2];
+                BYTE cur=0; // current check
+                do {
+                    if (idx==cur++) break;
+                    //printf ( "Length of pStr: %d\n", pStr->dsc_len );
+                    //printf ( "pstr: %04x to ", pStr );
+                    pStr = (STRING_DSCR*)((BYTE*)pStr + pStr->dsc_len);
+                    //printf ( "%04x\n" , pStr );
+                    if (pStr->dsc_type != DSCR_STRING_TYPE) pStr=NULL;
+                } while ( pStr && cur<=idx);
+                
+                if (pStr) {
+                    /* BYTE i;
+                    //printf ( "found str: '");
+                    for (i=0;i<pStr->dsc_len-2;++i) {
+                       printf ( i%2==0?"%c":"%02x", *((BYTE*)(&pStr->pstr)+i));
+                    } printf ( "\n"); */
+                    
+                    SUDPTRH = MSB((WORD)pStr);
+                    SUDPTRL = LSB((WORD)pStr);
+                    //SUDPTRH = MSB((WORD)&dev_strings);
+                    //SUDPTRL = LSB((WORD)&dev_strings);
+                } else {STALLEP0();}
+                
+            }
+            
+            break;
+        case DSCR_DEVQUAL_TYPE:
+            printf ( "Get Device Qualifier Descriptor\n");
+            // assumes this is a high speed capable device
+            SUDPTRH = MSB((WORD)&dev_qual_dscr);
+            SUDPTRL = LSB((WORD)&dev_qual_dscr);
+            break;
+        case DSCR_OTHERSPD_TYPE:
+            printf ( "Other Speed Descriptor\n");
+            SUDPTRH = MSB(pOtherConfig);
+            SUDPTRL = LSB(pOtherConfig);
+            break;
+        default:
+            printf ( "Unhandled Get Descriptor: %02x\n", SETUPDAT[3]);
+            STALLEP0();
+    }
+    
+}
+
diff --git a/fx2lib/lib/usbav.a51 b/fx2lib/lib/usbav.a51
new file mode 100644
index 0000000..ce956d9
--- /dev/null
+++ b/fx2lib/lib/usbav.a51
@@ -0,0 +1,125 @@
+; Copyright (C) 2010 Ubixum, Inc. 
+;
+; This library is free software; you can redistribute it and/or
+; modify it under the terms of the GNU Lesser General Public
+; License as published by the Free Software Foundation; either
+; version 2.1 of the License, or (at your option) any later version.
+; 
+; This library is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+; Lesser General Public License for more details.
+; 
+; You should have received a copy of the GNU Lesser General Public
+; License along with this library; if not, write to the Free Software
+; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+.module INT2AV ; jump table for usb auto vector
+
+.globl _INT2JT ; defined as global so this assembly gets included in project 
+
+.area INT2AV (ABS,OVR)
+.org    0x43 ; this is where USBINT ( interrupt 8 ) jumps to
+_INT2AV = #. + 2 ; two bytes for ljmp (auto set by INT2IVEC)
+    ljmp _INT2JT
+
+; INT2 Jump Table
+
+.area INT2JT ( CODE )
+;.org    0x1A00 ; needs to be on a page boundary
+
+_INT2JT:
+    ljmp _sudav_isr
+    .db 0
+    ljmp _sof_isr
+    .db 0
+    ljmp _sutok_isr
+    .db 0
+    ljmp _suspend_isr
+    .db 0
+    ljmp _usbreset_isr
+    .db 0
+    ljmp _hispeed_isr
+    .db 0
+    ljmp _ep0ack_isr
+    .db 0
+    ljmp _spare_isr
+    .db 0
+    ljmp _ep0in_isr
+    .db 0
+    ljmp _ep0out_isr
+    .db 0
+    ljmp _ep1in_isr
+    .db 0
+    ljmp _ep1out_isr
+    .db 0
+    ljmp _ep2_isr
+    .db 0
+    ljmp _ep4_isr
+    .db 0
+    ljmp _ep6_isr
+    .db 0
+    ljmp _ep8_isr
+    .db 0
+    ljmp _ibn_isr
+    .db 0
+    ljmp _spare_isr
+    .db 0
+    ljmp _ep0ping_isr
+    .db 0
+    ljmp _ep1ping_isr
+    .db 0
+    ljmp _ep2ping_isr
+    .db 0
+    ljmp _ep4ping_isr
+    .db 0
+    ljmp _ep6ping_isr
+    .db 0
+    ljmp _ep8ping_isr
+    .db 0
+    ljmp _errlimit_isr
+    .db 0
+    ljmp _spare_isr
+    .db 0
+    ljmp _spare_isr
+    .db 0
+    ljmp _spare_isr
+    .db 0
+    ljmp _ep2isoerr_isr
+    .db 0
+    ljmp _ep4isoerr_isr
+    .db 0
+    ljmp _ep6isoerr_isr
+    .db 0
+    ljmp _ep8isoerr_isr
+    .db 0
+; INT4JT
+    ljmp _ep2pf_isr
+    .db 0
+    ljmp _ep4pf_isr
+    .db 0
+    ljmp _ep6pf_isr
+    .db 0
+    ljmp _ep8pf_isr
+    .db 0
+    ljmp _ep2ef_isr
+    .db 0
+    ljmp _ep4ef_isr
+    .db 0
+    ljmp _ep6ef_isr
+    .db 0
+    ljmp _ep8ef_isr
+    .db 0
+    ljmp _ep2ff_isr
+    .db 0
+    ljmp _ep4ff_isr
+    .db 0
+    ljmp _ep6ff_isr
+    .db 0
+    ljmp _ep8ff_isr
+    .db 0
+    ljmp _gpifdone_isr
+    .db 0
+    ljmp _gpifwf_isr
+    .db 0
+    
diff --git a/gpif-acquisition.c b/gpif-acquisition.c
new file mode 100644
index 0000000..8734abe
--- /dev/null
+++ b/gpif-acquisition.c
@@ -0,0 +1,268 @@
+/*
+ * This file is part of the sigrok-firmware-fx2lafw project.
+ *
+ * Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <eputils.h>
+#include <fx2regs.h>
+#include <fx2macros.h>
+#include <delay.h>
+#include <gpif.h>
+#include <fx2lafw.h>
+#include <gpif-acquisition.h>
+
+__bit gpif_acquiring;
+
+static void gpif_reset_waveforms(void)
+{
+	int i;
+
+	/* Reset WAVEDATA. */
+	AUTOPTRSETUP = 0x03;
+	AUTOPTRH1 = 0xe4;
+	AUTOPTRL1 = 0x00;
+	for (i = 0; i < 128; i++)
+		EXTAUTODAT1 = 0;
+}
+
+static void gpif_setup_registers(void)
+{
+	/* TODO. Value probably irrelevant, as we don't use RDY* signals? */
+	GPIFREADYCFG = 0;
+
+	/*
+	 * Set TRICTL = 0, thus CTL0-CTL5 are CMOS outputs.
+	 * TODO: Probably irrelevant, as we don't use CTL0-CTL5?
+	 */
+	GPIFCTLCFG = 0;
+
+	/* When GPIF is idle, tri-state the data bus. */
+	/* Bit 7: DONE, bit 0: IDLEDRV. TODO: Set/clear DONE bit? */
+	GPIFIDLECS = (0 << 0);
+
+	/* When GPIF is idle, set CTL0-CTL5 to 0. */
+	GPIFIDLECTL = 0;
+
+	/*
+	 * Map index 0 in WAVEDATA to FIFORD. The rest is assigned too,
+	 * but not used by us.
+	 *
+	 * GPIFWFSELECT: [7:6] = SINGLEWR index, [5:4] = SINGLERD index,
+	 *               [3:2] = FIFOWR index, [1:0] = FIFORD index
+	 */
+	GPIFWFSELECT = (0x3 << 6) | (0x2 << 4) | (0x1 << 2) | (0x0 << 0);
+
+	/* Contains RDY* pin values. Read-only according to TRM. */
+	GPIFREADYSTAT = 0;
+
+	/* Make GPIF stop on transaction count not flag. */
+	EP2GPIFPFSTOP = (0 << 0);
+}
+
+static void gpif_init_addr_pins(void)
+{
+	/*
+	 * Configure the 9 GPIF address pins (GPIFADR[8:0], which consist of
+	 * PORTC[7:0] and PORTE[7]), and output an initial address (zero).
+	 * TODO: Probably irrelevant, the 56pin FX2 has no ports C and E.
+	 */
+	PORTCCFG = 0xff;    /* Set PORTC[7:0] as alt. func. (GPIFADR[7:0]). */
+	OEC = 0xff;         /* Configure PORTC[7:0] as outputs. */
+	PORTECFG |= 0x80;   /* Set PORTE[7] as alt. func. (GPIFADR[8]). */
+	OEE |= 0x80;        /* Configure PORTE[7] as output. */
+	SYNCDELAY();
+	GPIFADRL = 0x00;    /* Clear GPIFADR[7:0]. */
+	SYNCDELAY();
+	GPIFADRH = 0x00;    /* Clear GPIFADR[8]. */
+}
+
+static void gpif_init_flowstates(void)
+{
+	/* Clear all flowstate registers, we don't use this functionality. */
+	FLOWSTATE = 0;
+	FLOWLOGIC = 0;
+	FLOWEQ0CTL = 0;
+	FLOWEQ1CTL = 0;
+	FLOWHOLDOFF = 0;
+	FLOWSTB = 0;
+	FLOWSTBEDGE = 0;
+	FLOWSTBHPERIOD = 0;
+}
+
+void gpif_init_la(void)
+{
+	/*
+	 * Setup the FX2 in GPIF master mode, using the internal clock
+	 * (non-inverted) at 48MHz, and using async sampling.
+	 */
+	IFCONFIG = 0xee;
+
+	/* Abort currently executing GPIF waveform (if any). */
+	GPIFABORT = 0xff;
+
+	/* Setup the GPIF registers. */
+	gpif_setup_registers();
+
+	/* Reset WAVEDATA. */
+	gpif_reset_waveforms();
+
+	/* Initialize GPIF address pins, output initial values. */
+	gpif_init_addr_pins();
+
+	/* Initialize flowstate registers (not used by us). */
+	gpif_init_flowstates();
+
+	/* Reset the status. */
+	gpif_acquiring = FALSE;
+}
+
+static void gpif_make_delay_state(volatile BYTE *pSTATE, uint8_t delay)
+{
+	/*
+	 * DELAY
+	 * Delay cmd->sample_delay clocks.
+	 */
+	pSTATE[0] = delay;
+
+	/*
+	 * OPCODE
+	 * SGL=0, GIN=0, INCAD=0, NEXT=0, DATA=0, DP=0
+	 * Collect data in this state.
+	 */
+	pSTATE[8] = 0x00;
+
+	/*
+	 * OUTPUT
+	 * OE[0:3]=0, CTL[0:3]=0
+	 */
+	pSTATE[16] = 0x00;
+
+	/*
+	 * LOGIC FUNCTION
+	 * Not used.
+	 */
+	pSTATE[24] = 0x00;
+}
+
+static void gpid_make_data_dp_state(volatile BYTE *pSTATE)
+{
+	/*
+	 * BRANCH
+	 * Branch to IDLE if condition is true, back to S0 otherwise.
+	 */
+	pSTATE[0] = (7 << 3) | (0 << 0);
+
+	/*
+	 * OPCODE
+	 * SGL=0, GIN=0, INCAD=0, NEXT=0, DATA=1, DP=1
+	 */
+	pSTATE[8] = (1 << 1) | (1 << 0);
+
+	/*
+	 * OUTPUT
+	 * OE[0:3]=0, CTL[0:3]=0
+	 */
+	pSTATE[16] = 0x00;
+
+	/*
+	 * LOGIC FUNCTION
+	 * Evaluate if the FIFO full flag is set.
+	 * LFUNC=0 (AND), TERMA=6 (FIFO Flag), TERMB=6 (FIFO Flag)
+	 */
+	pSTATE[24] = (6 << 3) | (6 << 0);
+}
+
+bool gpif_acquisition_start(const struct cmd_start_acquisition *cmd)
+{
+	int i;
+	volatile BYTE *pSTATE = &GPIF_WAVE_DATA;
+
+	/* Ensure GPIF is idle before reconfiguration. */
+	while (!(GPIFTRIG & 0x80));
+
+	/* Configure the EP2 FIFO. */
+	if (cmd->flags & CMD_START_FLAGS_SAMPLE_16BIT) {
+		EP2FIFOCFG = bmAUTOIN | bmWORDWIDE;
+	} else {
+		EP2FIFOCFG = bmAUTOIN;
+	}
+	SYNCDELAY();
+
+	/* Set IFCONFIG to the correct clock source. */
+	if (cmd->flags & CMD_START_FLAGS_CLK_48MHZ) {
+		IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmASYNC |
+			   bmGSTATE | bmIFGPIF;
+	} else {
+		IFCONFIG = bmIFCLKSRC | bmIFCLKOE | bmASYNC |
+			   bmGSTATE | bmIFGPIF;
+	}
+
+	/* Populate delay states. */
+	if ((cmd->sample_delay_h == 0 && cmd->sample_delay_l == 0) ||
+	    cmd->sample_delay_h >= 6)
+		return false;
+
+	for (i = 0; i < cmd->sample_delay_h; i++)
+		gpif_make_delay_state(pSTATE++, 0);
+
+	if (cmd->sample_delay_l != 0)
+		gpif_make_delay_state(pSTATE++, cmd->sample_delay_l);
+
+	/* Populate S1 - the decision point. */
+	gpid_make_data_dp_state(pSTATE++);
+
+	/* Execute the whole GPIF waveform once. */
+	gpif_set_tc16(1);
+
+	/* Perform the initial GPIF read. */
+	gpif_fifo_read(GPIF_EP2);
+
+	/* Update the status. */
+	gpif_acquiring = TRUE;
+
+	return true;
+}
+
+void gpif_poll(void)
+{
+	/* Detect if acquisition has completed. */
+	if (gpif_acquiring && (GPIFTRIG & 0x80)) {
+		/* Activate NAK-ALL to avoid race conditions. */
+		FIFORESET = 0x80;
+		SYNCDELAY();
+
+		/* Switch to manual mode. */
+		EP2FIFOCFG = 0;
+		SYNCDELAY();
+
+		/* Reset EP2. */
+		FIFORESET = 0x02;
+		SYNCDELAY();
+
+		/* Return to auto mode. */
+		EP2FIFOCFG = bmAUTOIN;
+		SYNCDELAY();
+
+		/* Release NAK-ALL. */
+		FIFORESET = 0x00;
+		SYNCDELAY();
+
+		gpif_acquiring = FALSE;
+	}
+}
diff --git a/hw/braintechnology-usb-lps/dscr.a51 b/hw/braintechnology-usb-lps/dscr.a51
new file mode 100644
index 0000000..c82804b
--- /dev/null
+++ b/hw/braintechnology-usb-lps/dscr.a51
@@ -0,0 +1,24 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0xd016	; Manufacturer ID (0x16d0)
+PID = 0x9804	; Product ID (0x0498)
+
+.include "dscr.inc"
diff --git a/hw/cwav-usbeeax/dscr.a51 b/hw/cwav-usbeeax/dscr.a51
new file mode 100644
index 0000000..335493f
--- /dev/null
+++ b/hw/cwav-usbeeax/dscr.a51
@@ -0,0 +1,25 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+;; Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0xa908	; Manufacturer ID (0x08a9)
+PID = 0x1400	; Product ID (0x0014)
+
+.include "dscr.inc"
diff --git a/hw/cwav-usbeedx/dscr.a51 b/hw/cwav-usbeedx/dscr.a51
new file mode 100644
index 0000000..8586b1f
--- /dev/null
+++ b/hw/cwav-usbeedx/dscr.a51
@@ -0,0 +1,24 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2012 Ivan Fedorov <oxyum at oxyum.ru>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0xa908	; Manufacturer ID (0x08a9)
+PID = 0x1500	; Product ID (0x0015)
+
+.include "dscr.inc"
diff --git a/hw/cwav-usbeesx/dscr.a51 b/hw/cwav-usbeesx/dscr.a51
new file mode 100644
index 0000000..35f93f7
--- /dev/null
+++ b/hw/cwav-usbeesx/dscr.a51
@@ -0,0 +1,25 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+;; Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0xa908	; Manufacturer ID (0x08a9)
+PID = 0x0900	; Product ID (0x0009)
+
+.include "dscr.inc"
diff --git a/hw/cypress-fx2/dscr.a51 b/hw/cypress-fx2/dscr.a51
new file mode 100644
index 0000000..310e077
--- /dev/null
+++ b/hw/cypress-fx2/dscr.a51
@@ -0,0 +1,25 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+;; Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0xb404	; Manufacturer ID (0x04b4)
+PID = 0x1386	; Product ID (0x8613)
+
+.include "dscr.inc"
diff --git a/hw/saleae-logic/dscr.a51 b/hw/saleae-logic/dscr.a51
new file mode 100644
index 0000000..81f3742
--- /dev/null
+++ b/hw/saleae-logic/dscr.a51
@@ -0,0 +1,25 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+;; Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0x2509	; Manufacturer ID (0x0925)
+PID = 0x8138	; Product ID (0x3881)
+
+.include "dscr.inc"
diff --git a/hw/sigrok-fx2-16ch/dscr.a51 b/hw/sigrok-fx2-16ch/dscr.a51
new file mode 100644
index 0000000..d63d08c
--- /dev/null
+++ b/hw/sigrok-fx2-16ch/dscr.a51
@@ -0,0 +1,24 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2015 Uwe Hermann <uwe at hermann-uwe.de>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0x501D	; Manufacturer ID (0x1D50)
+PID = 0x8D60	; Product ID (0x608D)
+
+.include "dscr.inc"
diff --git a/hw/sigrok-fx2-8ch/dscr.a51 b/hw/sigrok-fx2-8ch/dscr.a51
new file mode 100644
index 0000000..4eecd9f
--- /dev/null
+++ b/hw/sigrok-fx2-8ch/dscr.a51
@@ -0,0 +1,24 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2015 Uwe Hermann <uwe at hermann-uwe.de>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+VID = 0x501D    ; Manufacturer ID (0x1D50)
+PID = 0x8C60    ; Product ID (0x608C)
+
+.include "dscr.inc"
diff --git a/include/command.h b/include/command.h
new file mode 100644
index 0000000..59a9f90
--- /dev/null
+++ b/include/command.h
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the sigrok-firmware-fx2lafw project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#ifndef FX2LAFW_INCLUDE_COMMAND_H
+#define FX2LAFW_INCLUDE_COMMAND_H
+
+#include <stdint.h>
+
+/* Protocol commands */
+#define CMD_GET_FW_VERSION		0xb0
+#define CMD_START			0xb1
+#define CMD_GET_REVID_VERSION		0xb2
+
+#define CMD_START_FLAGS_WIDE_POS	5
+#define CMD_START_FLAGS_CLK_SRC_POS	6
+
+#define CMD_START_FLAGS_SAMPLE_8BIT	(0 << CMD_START_FLAGS_WIDE_POS)
+#define CMD_START_FLAGS_SAMPLE_16BIT	(1 << CMD_START_FLAGS_WIDE_POS)
+
+#define CMD_START_FLAGS_CLK_30MHZ	(0 << CMD_START_FLAGS_CLK_SRC_POS)
+#define CMD_START_FLAGS_CLK_48MHZ	(1 << CMD_START_FLAGS_CLK_SRC_POS)
+
+struct version_info {
+	uint8_t major;
+	uint8_t minor;
+};
+
+struct cmd_start_acquisition {
+	uint8_t flags;
+	uint8_t sample_delay_h;
+	uint8_t sample_delay_l;
+};
+
+#endif
diff --git a/include/dscr.inc b/include/dscr.inc
new file mode 100644
index 0000000..5d0f059
--- /dev/null
+++ b/include/dscr.inc
@@ -0,0 +1,211 @@
+;;
+;; This file is part of the sigrok-firmware-fx2lafw project.
+;;
+;; Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+;; Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+;;
+
+.module DEV_DSCR
+
+; Descriptor types
+DSCR_DEVICE_TYPE	= 1
+DSCR_CONFIG_TYPE	= 2
+DSCR_STRING_TYPE	= 3
+DSCR_INTERFACE_TYPE	= 4
+DSCR_ENDPOINT_TYPE	= 5
+DSCR_DEVQUAL_TYPE	= 6
+
+; Descriptor lengths
+DSCR_INTERFACE_LEN	= 9
+DSCR_ENDPOINT_LEN	= 7
+
+; Endpoint types
+ENDPOINT_TYPE_CONTROL	= 0
+ENDPOINT_TYPE_ISO	= 1
+ENDPOINT_TYPE_BULK	= 2
+ENDPOINT_TYPE_INT	= 3
+
+.globl _dev_dscr, _dev_qual_dscr, _highspd_dscr, _fullspd_dscr, _dev_strings, _dev_strings_end
+.area DSCR_AREA (CODE)
+
+; -----------------------------------------------------------------------------
+; Device descriptor
+; -----------------------------------------------------------------------------
+_dev_dscr:
+	.db	dev_dscr_end - _dev_dscr
+	.db	DSCR_DEVICE_TYPE
+	.dw	0x0002			; USB 2.0
+	.db	0xff			; Class (vendor specific)
+	.db	0xff			; Subclass (vendor specific)
+	.db	0xff			; Protocol (vendor specific)
+	.db	64			; Max. EP0 packet size
+	.dw	VID			; Manufacturer ID
+	.dw	PID			; Product ID
+	.dw	0x0100			; Product version (0.01)
+	.db	1			; Manufacturer string index
+	.db	2			; Product string index
+	.db	0			; Serial number string index (none)
+	.db	1			; Number of configurations
+dev_dscr_end:
+
+; -----------------------------------------------------------------------------
+; Device qualifier (for "other device speed")
+; -----------------------------------------------------------------------------
+_dev_qual_dscr:
+	.db	dev_qualdscr_end - _dev_qual_dscr
+	.db	DSCR_DEVQUAL_TYPE
+	.dw	0x0002			; USB 2.0
+	.db	0xff			; Class (vendor specific)
+	.db	0xff			; Subclass (vendor specific)
+	.db	0xff			; Protocol (vendor specific)
+	.db	64			; Max. EP0 packet size
+	.db	1			; Number of configurations
+	.db	0			; Extra reserved byte
+dev_qualdscr_end:
+
+; -----------------------------------------------------------------------------
+; High-Speed configuration descriptor
+; -----------------------------------------------------------------------------
+_highspd_dscr:
+	.db	highspd_dscr_end - _highspd_dscr
+	.db	DSCR_CONFIG_TYPE
+	; Total length of the configuration (1st line LSB, 2nd line MSB)
+	.db	(highspd_dscr_realend - _highspd_dscr) % 256
+	.db	(highspd_dscr_realend - _highspd_dscr) / 256
+	.db	1			; Number of interfaces
+	.db	1			; Configuration number
+	.db	0			; Configuration string (none)
+	.db	0x80			; Attributes (bus powered, no wakeup)
+	.db	0x32			; Max. power (100mA)
+highspd_dscr_end:
+
+	; Interfaces (only one in our case)
+	.db	DSCR_INTERFACE_LEN
+	.db	DSCR_INTERFACE_TYPE
+	.db	0			; Interface index
+	.db	0			; Alternate setting index
+	.db	1			; Number of endpoints
+	.db	0xff			; Class (vendor specific)
+	.db	0xff			; Subclass (vendor specific)
+	.db	0xff			; Protocol (vendor specific)
+	.db	0			; String index (none)
+
+	; Endpoint 2 (IN)
+	.db	DSCR_ENDPOINT_LEN
+	.db	DSCR_ENDPOINT_TYPE
+	.db	0x82			; EP number (2), direction (IN)
+	.db	ENDPOINT_TYPE_BULK	; Endpoint type (bulk)
+	.db	0x00			; Max. packet size, LSB (512 bytes)
+	.db	0x02			; Max. packet size, MSB (512 bytes)
+	.db	0x00			; Polling interval
+
+highspd_dscr_realend:
+
+	.even
+
+; -----------------------------------------------------------------------------
+; Full-Speed configuration descriptor
+; -----------------------------------------------------------------------------
+_fullspd_dscr:
+	.db	fullspd_dscr_end - _fullspd_dscr
+	.db	DSCR_CONFIG_TYPE
+	; Total length of the configuration (1st line LSB, 2nd line MSB)
+	.db	(fullspd_dscr_realend - _fullspd_dscr) % 256
+	.db	(fullspd_dscr_realend - _fullspd_dscr) / 256
+	.db	1			; Number of interfaces
+	.db	1			; Configuration number
+	.db	0			; Configuration string (none)
+	.db	0x80			; Attributes (bus powered, no wakeup)
+	.db	0x32			; Max. power (100mA)
+fullspd_dscr_end:
+
+	; Interfaces (only one in our case)
+	.db	DSCR_INTERFACE_LEN
+	.db	DSCR_INTERFACE_TYPE
+	.db	0			; Interface index
+	.db	0			; Alternate setting index
+	.db	1			; Number of endpoints
+	.db	0xff			; Class (vendor specific)
+	.db	0xff			; Subclass (vendor specific)
+	.db	0xff			; Protocol (vendor specific)
+	.db	0			; String index (none)
+
+	; Endpoint 2 (IN)
+	.db	DSCR_ENDPOINT_LEN
+	.db	DSCR_ENDPOINT_TYPE
+	.db	0x82			; EP number (2), direction (IN)
+	.db	ENDPOINT_TYPE_BULK	; Endpoint type (bulk)
+	.db	0x40			; Max. packet size, LSB (64 bytes)
+	.db	0x00			; Max. packet size, MSB (64 bytes)
+	.db	0x00			; Polling interval
+
+fullspd_dscr_realend:
+
+	.even
+
+; -----------------------------------------------------------------------------
+; Strings
+; -----------------------------------------------------------------------------
+
+_dev_strings:
+
+; See http://www.usb.org/developers/docs/USB_LANGIDs.pdf for the full list.
+_string0:
+	.db	string0end - _string0
+	.db	DSCR_STRING_TYPE
+	.db	0x09, 0x04		; Language code 0x0409 (English, US)
+string0end:
+
+_string1:
+	.db	string1end - _string1
+	.db	DSCR_STRING_TYPE
+	.ascii	's'
+	.db	0
+	.ascii	'i'
+	.db	0
+	.ascii	'g'
+	.db	0
+	.ascii	'r'
+	.db	0
+	.ascii	'o'
+	.db	0
+	.ascii	'k'
+	.db	0
+string1end:
+
+_string2:
+	.db	string2end - _string2
+	.db	DSCR_STRING_TYPE
+	.ascii	'f'
+	.db	0
+	.ascii	'x'
+	.db	0
+	.ascii	'2'
+	.db	0
+	.ascii	'l'
+	.db	0
+	.ascii	'a'
+	.db	0
+	.ascii	'f'
+	.db	0
+	.ascii	'w'
+	.db	0
+string2end:
+
+_dev_strings_end:
+	.dw 0x0000
+
diff --git a/include/fx2lafw.h b/include/fx2lafw.h
new file mode 100644
index 0000000..bbc155b
--- /dev/null
+++ b/include/fx2lafw.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the sigrok-firmware-fx2lafw project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#ifndef FX2LAFW_INCLUDE_FX2LAFW_H
+#define FX2LAFW_INCLUDE_FX2LAFW_H
+
+#include <autovector.h>
+
+#define SYNCDELAY() SYNCDELAY4
+
+/*
+ * Major and minor fx2lafw firmware version numbers.
+ * These can be queried by the host via CMD_GET_FW_VERSION.
+ *
+ * The minor version number must be increased every time there are
+ * backwards-compatible changes (which do not change the API).
+ *
+ * The major version number must be increased every time there are API
+ * changes or functional changes which require adaptations in the host
+ * (libsigrok) drivers, i.e. changes where old libsigrok versions would no
+ * longer (properly) work with the new fx2lafw firmware.
+ */
+#define FX2LAFW_VERSION_MAJOR	1
+#define FX2LAFW_VERSION_MINOR	1
+
+#endif
diff --git a/include/gpif-acquisition.h b/include/gpif-acquisition.h
new file mode 100644
index 0000000..0b1f964
--- /dev/null
+++ b/include/gpif-acquisition.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the sigrok-firmware-fx2lafw project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#ifndef FX2LAFW_INCLUDE_GPIF_ACQUISITION_H
+#define FX2LAFW_INCLUDE_GPIF_ACQUISITION_H
+
+#include <stdbool.h>
+#include <command.h>
+
+void gpif_init_la(void);
+bool gpif_acquisition_start(const struct cmd_start_acquisition *cmd);
+void gpif_poll(void);
+
+#endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sigrok-firmware-fx2lafw.git



More information about the debian-science-commits mailing list