aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-05 12:32:09 -0700
committerJosh Blum <josh@joshknows.com>2010-11-05 12:32:09 -0700
commitc473cc56fafcb47d6ba1f16e8c9fb89ff6c57bca (patch)
tree4760fc8fd3f409831dda97b81b65b379abfd61fc /firmware
parent7a7e704fa3d79036da1f33013e761eb747b725f0 (diff)
downloaduhd-c473cc56fafcb47d6ba1f16e8c9fb89ff6c57bca.tar.gz
uhd-c473cc56fafcb47d6ba1f16e8c9fb89ff6c57bca.tar.bz2
uhd-c473cc56fafcb47d6ba1f16e8c9fb89ff6c57bca.zip
usrp1: pulled in cmake build system for usrp1 firmware
Diffstat (limited to 'firmware')
-rw-r--r--firmware/fx2/.gitignore32
-rw-r--r--firmware/fx2/AUTHORS4
-rw-r--r--firmware/fx2/CMakeLists.txt47
-rw-r--r--firmware/fx2/COPYING674
-rw-r--r--firmware/fx2/ChangeLog0
-rw-r--r--firmware/fx2/Makefile.am22
-rw-r--r--firmware/fx2/Makefile.common122
-rw-r--r--firmware/fx2/NEWS0
-rw-r--r--firmware/fx2/README0
-rwxr-xr-xfirmware/fx2/bootstrap30
-rw-r--r--firmware/fx2/common/.gitignore (renamed from firmware/fx2/lib/.gitignore)0
-rw-r--r--firmware/fx2/common/_startup.a51 (renamed from firmware/fx2/src/common/_startup.a51)0
-rw-r--r--firmware/fx2/common/_startup.a51.brittle (renamed from firmware/fx2/src/common/_startup.a51.brittle)0
-rw-r--r--firmware/fx2/common/delay.c (renamed from firmware/fx2/lib/delay.c)0
-rw-r--r--firmware/fx2/common/delay.h (renamed from firmware/fx2/include/delay.h)0
-rw-r--r--firmware/fx2/common/eeprom_boot.a51 (renamed from firmware/fx2/src/usrp1/eeprom_boot.a51)0
-rw-r--r--firmware/fx2/common/eeprom_init.c (renamed from firmware/fx2/src/usrp1/eeprom_init.c)45
-rw-r--r--firmware/fx2/common/fpga.h (renamed from firmware/fx2/src/common/fpga.h)0
-rw-r--r--firmware/fx2/common/fpga_load.h (renamed from firmware/fx2/src/common/fpga_load.h)0
-rw-r--r--firmware/fx2/common/fpga_regs0.h (renamed from firmware/fx2/include/fpga_regs0.h)0
-rw-r--r--firmware/fx2/common/fpga_regs_common.h (renamed from firmware/fx2/include/fpga_regs_common.h)0
-rw-r--r--firmware/fx2/common/fpga_regs_common.v (renamed from firmware/fx2/include/fpga_regs_common.v)0
-rw-r--r--firmware/fx2/common/fpga_regs_standard.h (renamed from firmware/fx2/include/fpga_regs_standard.h)0
-rw-r--r--firmware/fx2/common/fpga_regs_standard.v (renamed from firmware/fx2/include/fpga_regs_standard.v)0
-rw-r--r--firmware/fx2/common/fx2regs.h (renamed from firmware/fx2/include/fx2regs.h)0
-rw-r--r--firmware/fx2/common/fx2utils.c (renamed from firmware/fx2/lib/fx2utils.c)0
-rw-r--r--firmware/fx2/common/fx2utils.h (renamed from firmware/fx2/include/fx2utils.h)0
-rw-r--r--firmware/fx2/common/i2c.c (renamed from firmware/fx2/lib/i2c.c)0
-rw-r--r--firmware/fx2/common/i2c.h (renamed from firmware/fx2/include/i2c.h)0
-rw-r--r--firmware/fx2/common/init_gpif.c (renamed from firmware/fx2/src/common/init_gpif.c)0
-rw-r--r--firmware/fx2/common/isr.c (renamed from firmware/fx2/lib/isr.c)0
-rw-r--r--firmware/fx2/common/isr.h (renamed from firmware/fx2/include/isr.h)0
-rw-r--r--firmware/fx2/common/spi.c (renamed from firmware/fx2/src/usrp1/spi.c)2
-rw-r--r--firmware/fx2/common/spi.h (renamed from firmware/fx2/src/usrp1/spi.h)0
-rw-r--r--firmware/fx2/common/syncdelay.h (renamed from firmware/fx2/include/syncdelay.h)0
-rw-r--r--firmware/fx2/common/timer.c (renamed from firmware/fx2/lib/timer.c)0
-rw-r--r--firmware/fx2/common/timer.h (renamed from firmware/fx2/include/timer.h)0
-rw-r--r--firmware/fx2/common/usb_common.c (renamed from firmware/fx2/lib/usb_common.c)0
-rw-r--r--firmware/fx2/common/usb_common.h (renamed from firmware/fx2/include/usb_common.h)0
-rw-r--r--firmware/fx2/common/usb_descriptors.h (renamed from firmware/fx2/include/usb_descriptors.h)0
-rw-r--r--firmware/fx2/common/usb_requests.h (renamed from firmware/fx2/include/usb_requests.h)0
-rw-r--r--firmware/fx2/common/usrp_commands.h (renamed from firmware/fx2/include/usrp_commands.h)0
-rw-r--r--firmware/fx2/common/usrp_common.h (renamed from firmware/fx2/src/usrp1/usrp_common.h)6
-rw-r--r--firmware/fx2/common/usrp_config.h (renamed from firmware/fx2/include/usrp_config.h)0
-rw-r--r--firmware/fx2/common/usrp_globals.h (renamed from firmware/fx2/src/common/usrp_globals.h)0
-rw-r--r--firmware/fx2/common/usrp_i2c_addr.h (renamed from firmware/fx2/include/usrp_i2c_addr.h)0
-rw-r--r--firmware/fx2/common/usrp_ids.h (renamed from firmware/fx2/include/usrp_ids.h)2
-rw-r--r--firmware/fx2/common/usrp_interfaces.h (renamed from firmware/fx2/include/usrp_interfaces.h)0
-rw-r--r--firmware/fx2/common/usrp_spi_defs.h (renamed from firmware/fx2/include/usrp_spi_defs.h)0
-rw-r--r--firmware/fx2/common/vectors.a51 (renamed from firmware/fx2/src/common/vectors.a51)1
-rw-r--r--firmware/fx2/config/.gitignore15
-rw-r--r--firmware/fx2/config/CMakeASM_SDCCInformation.cmake28
-rw-r--r--firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake22
-rw-r--r--firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake23
-rw-r--r--firmware/fx2/config/Makefile.am49
-rw-r--r--firmware/fx2/config/Rename.cmake37
-rw-r--r--firmware/fx2/config/Toolchain-sdcc.cmake32
-rw-r--r--firmware/fx2/config/gr_git.m458
-rw-r--r--firmware/fx2/config/gr_lib64.m485
-rw-r--r--firmware/fx2/config/gr_no_undefined.m444
-rw-r--r--firmware/fx2/config/gr_pwin32.m4149
-rw-r--r--firmware/fx2/config/gr_python.m4172
-rw-r--r--firmware/fx2/config/gr_scripting.m426
-rw-r--r--firmware/fx2/config/gr_standalone.m4116
-rw-r--r--firmware/fx2/config/grc_build.m4287
-rw-r--r--firmware/fx2/config/grc_fx2.m458
-rw-r--r--firmware/fx2/config/lf_cc.m441
-rw-r--r--firmware/fx2/config/lf_cxx.m467
-rw-r--r--firmware/fx2/config/lf_warnings.m4121
-rw-r--r--firmware/fx2/config/mkstemp.m489
-rw-r--r--firmware/fx2/config/onceonly.m463
-rw-r--r--firmware/fx2/config/pkg.m4201
-rw-r--r--firmware/fx2/config/usrp_sdcc.m475
-rw-r--r--firmware/fx2/configure.ac335
l---------firmware/fx2/include1
-rw-r--r--firmware/fx2/include/.gitignore25
-rw-r--r--firmware/fx2/include/Makefile.am61
-rw-r--r--firmware/fx2/lib/Makefile.am79
-rw-r--r--firmware/fx2/lib/i2c-compiler-bug.c129
-rw-r--r--firmware/fx2/src/.gitignore17
-rw-r--r--firmware/fx2/src/Makefile.am22
-rw-r--r--firmware/fx2/src/common/.gitignore17
-rw-r--r--firmware/fx2/src/common/Makefile.am50
-rw-r--r--firmware/fx2/src/common/blink_leds.c36
-rw-r--r--firmware/fx2/src/common/check_mdelay.c37
-rw-r--r--firmware/fx2/src/common/check_udelay.c37
-rwxr-xr-xfirmware/fx2/src/common/gpif.c292
-rwxr-xr-xfirmware/fx2/src/common/gpif.gpfbin5281 -> 0 bytes
-rw-r--r--firmware/fx2/src/usrp1/.gitignore20
-rw-r--r--firmware/fx2/src/usrp1/Makefile.am141
-rw-r--r--firmware/fx2/src/usrp1/_startup.a511
-rw-r--r--firmware/fx2/src/usrp1/blink_leds.c1
-rw-r--r--firmware/fx2/src/usrp1/check_mdelay.c1
-rw-r--r--firmware/fx2/src/usrp1/check_udelay.c1
-rwxr-xr-xfirmware/fx2/src/usrp1/edit-gpif114
-rw-r--r--firmware/fx2/src/usrp1/fpga_load.c1
-rw-r--r--firmware/fx2/src/usrp1/init_gpif.c1
-rw-r--r--firmware/fx2/src/usrp1/usrp_common.c1
-rw-r--r--firmware/fx2/src/usrp1/vectors.a511
-rw-r--r--firmware/fx2/usrp1/CMakeLists.txt84
-rw-r--r--firmware/fx2/usrp1/board_specific.c (renamed from firmware/fx2/src/usrp1/board_specific.c)0
-rw-r--r--firmware/fx2/usrp1/eeprom_io.c (renamed from firmware/fx2/src/usrp1/eeprom_io.c)0
-rw-r--r--firmware/fx2/usrp1/eeprom_io.h (renamed from firmware/fx2/src/usrp1/eeprom_io.h)0
-rw-r--r--firmware/fx2/usrp1/fpga_load.c (renamed from firmware/fx2/src/common/fpga_load.c)0
-rw-r--r--firmware/fx2/usrp1/fpga_rev2.c (renamed from firmware/fx2/src/usrp1/fpga_rev2.c)0
-rw-r--r--firmware/fx2/usrp1/fpga_rev2.h (renamed from firmware/fx2/src/usrp1/fpga_rev2.h)0
-rw-r--r--firmware/fx2/usrp1/gpif.c (renamed from firmware/fx2/src/usrp1/gpif.c)0
-rwxr-xr-xfirmware/fx2/usrp1/gpif.gpf (renamed from firmware/fx2/src/usrp1/gpif.gpf)bin5341 -> 5341 bytes
-rw-r--r--firmware/fx2/usrp1/usb_descriptors.a51 (renamed from firmware/fx2/src/usrp1/usb_descriptors.a51)0
-rw-r--r--firmware/fx2/usrp1/usrp_common.c (renamed from firmware/fx2/src/common/usrp_common.c)0
-rw-r--r--firmware/fx2/usrp1/usrp_gpif.c206
-rw-r--r--firmware/fx2/usrp1/usrp_gpif_inline.h27
-rw-r--r--firmware/fx2/usrp1/usrp_main.c (renamed from firmware/fx2/src/usrp1/usrp_main.c)1
-rw-r--r--firmware/fx2/usrp1/usrp_regs.h (renamed from firmware/fx2/src/usrp1/usrp_rev2_regs.h)0
-rwxr-xr-xfirmware/fx2/utils/build_eeprom.py (renamed from firmware/fx2/src/common/build_eeprom.py)11
-rwxr-xr-xfirmware/fx2/utils/edit-gpif.py (renamed from firmware/fx2/src/common/edit-gpif)0
-rwxr-xr-xfirmware/fx2/utils/generate_regs.py (renamed from firmware/fx2/include/generate_regs.py)0
117 files changed, 529 insertions, 4066 deletions
diff --git a/firmware/fx2/.gitignore b/firmware/fx2/.gitignore
index affc0b779..e9fd37231 100644
--- a/firmware/fx2/.gitignore
+++ b/firmware/fx2/.gitignore
@@ -1,30 +1,2 @@
-/Makefile
-/Makefile.in
-/aclocal.m4
-/configure
-/config.h.in
-/stamp-h.in
-/libtool
-/config.log
-/config.h
-/config.cache
-/config.status
-/missing
-/stamp-h
-/stamp-h1
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/autom4te.cache
-/*.cache
-/missing
-/make.log
-/usrp.pc
-/INSTALL
-/config.guess
-/config.sub
-/install-sh
-/ltmain.sh
+/build
+*.sym
diff --git a/firmware/fx2/AUTHORS b/firmware/fx2/AUTHORS
index e69de29bb..c9cd35778 100644
--- a/firmware/fx2/AUTHORS
+++ b/firmware/fx2/AUTHORS
@@ -0,0 +1,4 @@
+Eric Blossom <eb@comsec.org>
+Josh Blum <josh@joshknows.com>
+Thomas Tsou <ttsou@vt.edu>
+Nick Foster <nick@nerdnetworks.org>
diff --git a/firmware/fx2/CMakeLists.txt b/firmware/fx2/CMakeLists.txt
new file mode 100644
index 000000000..80f16363f
--- /dev/null
+++ b/firmware/fx2/CMakeLists.txt
@@ -0,0 +1,47 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/config/Toolchain-sdcc.cmake)
+PROJECT(USRP1 C)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
+INCLUDE(FindPythonInterp)
+
+########################################################################
+# Set toolchain to use SDCC
+########################################################################
+# we're doing mixed ASM and C
+ENABLE_LANGUAGE(ASM_SDCC)
+
+########################################################################
+# C flags and linking flags
+########################################################################
+ADD_DEFINITIONS(-DHAVE_USRP2)
+set(CMAKE_C_LINK_FLAGS "--code-loc 0x0000 --code-size 0x1800 --xram-loc 0x1800 --xram-size 0x0800 -Wl '-b USBDESCSEG = 0xE000'")
+set(CMAKE_C_FLAGS "--no-xinit-opt")
+
+########################################################################
+# Setup precompile tools
+########################################################################
+set(REG_GENERATOR ${CMAKE_SOURCE_DIR}/utils/generate_regs.py)
+set(EDIT_GPIF_USRP1 ${CMAKE_SOURCE_DIR}/utils/edit-gpif.py)
+set(BUILD_EEPROM ${CMAKE_SOURCE_DIR}/utils/build_eeprom.py)
+
+########################################################################
+# Add the subdirectories
+########################################################################
+ADD_SUBDIRECTORY(usrp1)
diff --git a/firmware/fx2/COPYING b/firmware/fx2/COPYING
deleted file mode 100644
index 94a9ed024..000000000
--- a/firmware/fx2/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. 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
-them 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 prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. 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.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey 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;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If 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 convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU 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 that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- 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.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-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.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- 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
-state 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 3 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, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program 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, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU 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. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/firmware/fx2/ChangeLog b/firmware/fx2/ChangeLog
deleted file mode 100644
index e69de29bb..000000000
--- a/firmware/fx2/ChangeLog
+++ /dev/null
diff --git a/firmware/fx2/Makefile.am b/firmware/fx2/Makefile.am
deleted file mode 100644
index 9c0da3573..000000000
--- a/firmware/fx2/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright 2003 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-SUBDIRS = include lib src
diff --git a/firmware/fx2/Makefile.common b/firmware/fx2/Makefile.common
deleted file mode 100644
index fb83b9470..000000000
--- a/firmware/fx2/Makefile.common
+++ /dev/null
@@ -1,122 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-AM_CFLAGS = @autoconf_default_CFLAGS@ @lf_CFLAGS@
-AM_CXXFLAGS = @autoconf_default_CXXFLAGS@ @lf_CXXFLAGS@
-
-# Sets ABI version in SONAME and appends -LIBVER to filename
-LTVERSIONFLAGS = -version-info 0:0:0 -release $(LIBVER)
-
-# includes
-grincludedir = $(includedir)/gnuradio
-
-if PYTHON
-# swig includes
-swigincludedir = $(grincludedir)/swig
-
-# Install the gnuradio stuff in the appropriate subdirectory
-# This usually ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-
-grpythondir = $(pythondir)/gnuradio
-grpyexecdir = $(pyexecdir)/gnuradio
-
-# Install the non-gnuradio usrp stuff in the appropriate subdirectory
-# This usually ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/usrpm
-
-usrppythondir = $(pythondir)/usrpm
-usrppyexecdir = $(pyexecdir)/usrpm
-endif
-
-# gcell includes
-gcellincludedir = $(includedir)/gcell
-gcellspuincludedir = $(includedir)/gcell/spu
-
-# Cell spu libs
-libspudir = $(libdir)spu
-
-# This used to be set in configure.ac but is now defined here for all
-# Makefiles when this fragment is included.
-STD_DEFINES_AND_INCLUDES = $(DEFINES) $(BOOST_CPPFLAGS) \
- $(GNURADIO_INCLUDES) $(GRUEL_INCLUDES)
-
-# when including for compilation from pre-installed libraries and such,
-# need to make sure those are put last on the compile command
-WITH_INCLUDES = @with_INCLUDES@
-WITH_SWIG_INCLUDES = @with_SWIG_INCLUDES@
-
-# Where to find gnuradio include files in the current build tree
-# top_srcdir for original stuff, top_builddir for generated files
-GNURADIO_INCLUDES = @gnuradio_core_INCLUDES@
-
-# How to link in GNU Radio core library from inside the tree
-GNURADIO_CORE_LA = @gnuradio_core_LA@
-
-# How to link in the USRP library from inside the tree
-GRUEL_INCLUDES = @gruel_INCLUDES@
-GRUEL_LA = @gruel_LA@
-
-# How to link in the USRP library from inside the tree
-USRP_INCLUDES = @usrp_INCLUDES@
-USRP_LA = @usrp_LA@
-
-# How to link the gcell library from inside the tree (the PPU part)
-GCELL_INCLUDES = @gcell_INCLUDES@
-GCELL_LA = @gcell_LA@
-
-# How to link the gcell library from inside the tree (the SPU part)
-GCELL_SPU_INCLUDES = @gcell_spu_INCLUDES@
-GCELL_SPU_LA = @gcell_spu_LA@
-
-# libtool aware wrapper for ppu-embedspu
-GCELL_EMBEDSPU_LIBTOOL = @abs_top_srcdir@/gcell/lib/runtime/gcell-embedspu-libtool
-
-# Fix for BSD make not defining $(RM). We define it now in configure.ac
-# using AM_PATH_PROG, but now here have to add a -f to be like GNU make
-RM=$(RM_PROG) -f
-
-RUN_GUILE = GUILE_LOAD_PATH="@abs_top_srcdir@/gruel/src/scheme" @GUILE@ -e main -s
-
-# Base directory for example applications
-exampledir = $(datadir)/gnuradio/examples
-
-# Base directory for documentation (docdir undefined in autoconf < 1.60)
-docdir ?= $(datadir)/doc/$(PACKAGE)
-gr_docdir = $(docdir)-$(DOCVER)
-
-# System configuration files
-gr_prefsdir = $(GR_PREFSDIR)
-
-# Data directory for grc block wrappers
-grc_blocksdir = $(pkgdatadir)/grc/blocks
-
-# Other common defines; use "+=" to add to these
-STAMPS =
-MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT
-
-# Don't distribute the files defined in the variable 'no_dist_files'
-dist-hook:
- @for file in $(no_dist_files); do \
- echo $(RM) $(distdir)/$$file; \
- $(RM) $(distdir)/$$file; \
- done;
diff --git a/firmware/fx2/NEWS b/firmware/fx2/NEWS
deleted file mode 100644
index e69de29bb..000000000
--- a/firmware/fx2/NEWS
+++ /dev/null
diff --git a/firmware/fx2/README b/firmware/fx2/README
deleted file mode 100644
index e69de29bb..000000000
--- a/firmware/fx2/README
+++ /dev/null
diff --git a/firmware/fx2/bootstrap b/firmware/fx2/bootstrap
deleted file mode 100755
index 7daff90d1..000000000
--- a/firmware/fx2/bootstrap
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# Copyright 2001,2005,2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-
-rm -fr config.cache autom4te*.cache
-
-aclocal -I config
-autoconf
-autoheader
-libtoolize --automake
-automake --add-missing -Wno-portability -Wno-override -Wnone
-#automake --add-missing -Wno-portability
diff --git a/firmware/fx2/lib/.gitignore b/firmware/fx2/common/.gitignore
index 04f253234..04f253234 100644
--- a/firmware/fx2/lib/.gitignore
+++ b/firmware/fx2/common/.gitignore
diff --git a/firmware/fx2/src/common/_startup.a51 b/firmware/fx2/common/_startup.a51
index 30a907857..30a907857 100644
--- a/firmware/fx2/src/common/_startup.a51
+++ b/firmware/fx2/common/_startup.a51
diff --git a/firmware/fx2/src/common/_startup.a51.brittle b/firmware/fx2/common/_startup.a51.brittle
index 2996275cf..2996275cf 100644
--- a/firmware/fx2/src/common/_startup.a51.brittle
+++ b/firmware/fx2/common/_startup.a51.brittle
diff --git a/firmware/fx2/lib/delay.c b/firmware/fx2/common/delay.c
index 13cf0eec8..13cf0eec8 100644
--- a/firmware/fx2/lib/delay.c
+++ b/firmware/fx2/common/delay.c
diff --git a/firmware/fx2/include/delay.h b/firmware/fx2/common/delay.h
index f5df779e1..f5df779e1 100644
--- a/firmware/fx2/include/delay.h
+++ b/firmware/fx2/common/delay.h
diff --git a/firmware/fx2/src/usrp1/eeprom_boot.a51 b/firmware/fx2/common/eeprom_boot.a51
index 65e452668..65e452668 100644
--- a/firmware/fx2/src/usrp1/eeprom_boot.a51
+++ b/firmware/fx2/common/eeprom_boot.a51
diff --git a/firmware/fx2/src/usrp1/eeprom_init.c b/firmware/fx2/common/eeprom_init.c
index a6f6cbe2d..07902dcca 100644
--- a/firmware/fx2/src/usrp1/eeprom_init.c
+++ b/firmware/fx2/common/eeprom_init.c
@@ -22,7 +22,6 @@
#include "usrp_common.h"
#include "usrp_commands.h"
-#include "spi.h"
/*
* the host side fpga loader code pushes an MD5 hash of the bitstream
@@ -32,39 +31,6 @@
xdata at USRP_HASH_SLOT_0_ADDR unsigned char hash0[USRP_HASH_SIZE];
-#define enable_codecs() USRP_PA &= ~(bmPA_SEN_CODEC_A | bmPA_SEN_CODEC_B)
-#define disable_all() USRP_PA |= (bmPA_SEN_CODEC_A | bmPA_SEN_CODEC_B)
-
-static void
-write_byte_msb (unsigned char v);
-
-void
-write_both_9862s (unsigned char header_lo, unsigned char v)
-{
- enable_codecs ();
-
- write_byte_msb (header_lo);
- write_byte_msb (v);
-
- disable_all ();
-}
-
-// ----------------------------------------------------------------
-
-static void
-write_byte_msb (unsigned char v)
-{
- unsigned char n = 8;
- do {
- v = (v << 1) | (v >> 7); // rotate left (MSB into bottom bit)
- bitS_OUT = v & 0x1;
- bitS_CLK = 1;
- bitS_CLK = 0;
- } while (--n != 0);
-}
-
-// ----------------------------------------------------------------
-
#define REG_RX_PWR_DN 1
#define REG_TX_PWR_DN 8
#define REG_TX_MODULATOR 20
@@ -90,15 +56,8 @@ void eeprom_init (void)
// USBCS &= ~bmRENUM; // chip firmware handles commands
USBCS = 0; // chip firmware handles commands
- USRP_PC &= ~bmPC_nRESET; // active low reset
- USRP_PC |= bmPC_nRESET;
-
- // init_spi ();
- bitS_OUT = 0; /* idle state has CLK = 0 */
-
- write_both_9862s (REG_RX_PWR_DN, 0x01);
- write_both_9862s (REG_TX_PWR_DN, 0x0f); // pwr dn digital and analog_both
- write_both_9862s (REG_TX_MODULATOR, 0x00); // coarse & fine modulators disabled
+ //USRP_PC &= ~bmPC_nRESET; // active low reset
+ //USRP_PC |= bmPC_nRESET;
// zero firmware hash slot
i = 0;
diff --git a/firmware/fx2/src/common/fpga.h b/firmware/fx2/common/fpga.h
index 6cd5de8e2..6cd5de8e2 100644
--- a/firmware/fx2/src/common/fpga.h
+++ b/firmware/fx2/common/fpga.h
diff --git a/firmware/fx2/src/common/fpga_load.h b/firmware/fx2/common/fpga_load.h
index 7c36a04c8..7c36a04c8 100644
--- a/firmware/fx2/src/common/fpga_load.h
+++ b/firmware/fx2/common/fpga_load.h
diff --git a/firmware/fx2/include/fpga_regs0.h b/firmware/fx2/common/fpga_regs0.h
index 883798301..883798301 100644
--- a/firmware/fx2/include/fpga_regs0.h
+++ b/firmware/fx2/common/fpga_regs0.h
diff --git a/firmware/fx2/include/fpga_regs_common.h b/firmware/fx2/common/fpga_regs_common.h
index b4a496af7..b4a496af7 100644
--- a/firmware/fx2/include/fpga_regs_common.h
+++ b/firmware/fx2/common/fpga_regs_common.h
diff --git a/firmware/fx2/include/fpga_regs_common.v b/firmware/fx2/common/fpga_regs_common.v
index 8035d8565..8035d8565 100644
--- a/firmware/fx2/include/fpga_regs_common.v
+++ b/firmware/fx2/common/fpga_regs_common.v
diff --git a/firmware/fx2/include/fpga_regs_standard.h b/firmware/fx2/common/fpga_regs_standard.h
index 7485e2bab..7485e2bab 100644
--- a/firmware/fx2/include/fpga_regs_standard.h
+++ b/firmware/fx2/common/fpga_regs_standard.h
diff --git a/firmware/fx2/include/fpga_regs_standard.v b/firmware/fx2/common/fpga_regs_standard.v
index d09aa6116..d09aa6116 100644
--- a/firmware/fx2/include/fpga_regs_standard.v
+++ b/firmware/fx2/common/fpga_regs_standard.v
diff --git a/firmware/fx2/include/fx2regs.h b/firmware/fx2/common/fx2regs.h
index 2f210f567..2f210f567 100644
--- a/firmware/fx2/include/fx2regs.h
+++ b/firmware/fx2/common/fx2regs.h
diff --git a/firmware/fx2/lib/fx2utils.c b/firmware/fx2/common/fx2utils.c
index 64ffcc896..64ffcc896 100644
--- a/firmware/fx2/lib/fx2utils.c
+++ b/firmware/fx2/common/fx2utils.c
diff --git a/firmware/fx2/include/fx2utils.h b/firmware/fx2/common/fx2utils.h
index b184dec27..b184dec27 100644
--- a/firmware/fx2/include/fx2utils.h
+++ b/firmware/fx2/common/fx2utils.h
diff --git a/firmware/fx2/lib/i2c.c b/firmware/fx2/common/i2c.c
index 0f238b5cf..0f238b5cf 100644
--- a/firmware/fx2/lib/i2c.c
+++ b/firmware/fx2/common/i2c.c
diff --git a/firmware/fx2/include/i2c.h b/firmware/fx2/common/i2c.h
index 273526dad..273526dad 100644
--- a/firmware/fx2/include/i2c.h
+++ b/firmware/fx2/common/i2c.h
diff --git a/firmware/fx2/src/common/init_gpif.c b/firmware/fx2/common/init_gpif.c
index edde919be..edde919be 100644
--- a/firmware/fx2/src/common/init_gpif.c
+++ b/firmware/fx2/common/init_gpif.c
diff --git a/firmware/fx2/lib/isr.c b/firmware/fx2/common/isr.c
index 05412daf5..05412daf5 100644
--- a/firmware/fx2/lib/isr.c
+++ b/firmware/fx2/common/isr.c
diff --git a/firmware/fx2/include/isr.h b/firmware/fx2/common/isr.h
index 856532890..856532890 100644
--- a/firmware/fx2/include/isr.h
+++ b/firmware/fx2/common/isr.h
diff --git a/firmware/fx2/src/usrp1/spi.c b/firmware/fx2/common/spi.c
index 0aaffea5d..0c4f63d5a 100644
--- a/firmware/fx2/src/usrp1/spi.c
+++ b/firmware/fx2/common/spi.c
@@ -21,7 +21,7 @@
*/
#include "spi.h"
-#include "usrp_rev2_regs.h"
+#include "usrp_regs.h"
static void
setup_enables (unsigned char enables)
diff --git a/firmware/fx2/src/usrp1/spi.h b/firmware/fx2/common/spi.h
index 5342b82b8..5342b82b8 100644
--- a/firmware/fx2/src/usrp1/spi.h
+++ b/firmware/fx2/common/spi.h
diff --git a/firmware/fx2/include/syncdelay.h b/firmware/fx2/common/syncdelay.h
index 0af7d099f..0af7d099f 100644
--- a/firmware/fx2/include/syncdelay.h
+++ b/firmware/fx2/common/syncdelay.h
diff --git a/firmware/fx2/lib/timer.c b/firmware/fx2/common/timer.c
index 97e2f7cf9..97e2f7cf9 100644
--- a/firmware/fx2/lib/timer.c
+++ b/firmware/fx2/common/timer.c
diff --git a/firmware/fx2/include/timer.h b/firmware/fx2/common/timer.h
index 3181874d5..3181874d5 100644
--- a/firmware/fx2/include/timer.h
+++ b/firmware/fx2/common/timer.h
diff --git a/firmware/fx2/lib/usb_common.c b/firmware/fx2/common/usb_common.c
index 3b0547b2f..3b0547b2f 100644
--- a/firmware/fx2/lib/usb_common.c
+++ b/firmware/fx2/common/usb_common.c
diff --git a/firmware/fx2/include/usb_common.h b/firmware/fx2/common/usb_common.h
index ae07b236c..ae07b236c 100644
--- a/firmware/fx2/include/usb_common.h
+++ b/firmware/fx2/common/usb_common.h
diff --git a/firmware/fx2/include/usb_descriptors.h b/firmware/fx2/common/usb_descriptors.h
index 0b8c6212f..0b8c6212f 100644
--- a/firmware/fx2/include/usb_descriptors.h
+++ b/firmware/fx2/common/usb_descriptors.h
diff --git a/firmware/fx2/include/usb_requests.h b/firmware/fx2/common/usb_requests.h
index 7a543abb0..7a543abb0 100644
--- a/firmware/fx2/include/usb_requests.h
+++ b/firmware/fx2/common/usb_requests.h
diff --git a/firmware/fx2/include/usrp_commands.h b/firmware/fx2/common/usrp_commands.h
index 02778c7e3..02778c7e3 100644
--- a/firmware/fx2/include/usrp_commands.h
+++ b/firmware/fx2/common/usrp_commands.h
diff --git a/firmware/fx2/src/usrp1/usrp_common.h b/firmware/fx2/common/usrp_common.h
index 738ba6b37..fd203927f 100644
--- a/firmware/fx2/src/usrp1/usrp_common.h
+++ b/firmware/fx2/common/usrp_common.h
@@ -27,9 +27,9 @@
#ifndef _USRPCOMMON_H_
#define _USRPCOMMON_H_
-#include <usrp_config.h>
-#include <usrp_rev2_regs.h>
-#include <syncdelay.h>
+#include "usrp_config.h"
+#include "usrp_regs.h"
+#include "syncdelay.h"
/*
* From TRM page 15-105:
diff --git a/firmware/fx2/include/usrp_config.h b/firmware/fx2/common/usrp_config.h
index e77f8e4c5..e77f8e4c5 100644
--- a/firmware/fx2/include/usrp_config.h
+++ b/firmware/fx2/common/usrp_config.h
diff --git a/firmware/fx2/src/common/usrp_globals.h b/firmware/fx2/common/usrp_globals.h
index 445e9e6b4..445e9e6b4 100644
--- a/firmware/fx2/src/common/usrp_globals.h
+++ b/firmware/fx2/common/usrp_globals.h
diff --git a/firmware/fx2/include/usrp_i2c_addr.h b/firmware/fx2/common/usrp_i2c_addr.h
index 0a4f3ea59..0a4f3ea59 100644
--- a/firmware/fx2/include/usrp_i2c_addr.h
+++ b/firmware/fx2/common/usrp_i2c_addr.h
diff --git a/firmware/fx2/include/usrp_ids.h b/firmware/fx2/common/usrp_ids.h
index 46a069434..ffeb47f3c 100644
--- a/firmware/fx2/include/usrp_ids.h
+++ b/firmware/fx2/common/usrp_ids.h
@@ -37,7 +37,7 @@
#define USB_PID_FSF_EXP_0 0x0000 // Experimental 0
#define USB_PID_FSF_EXP_1 0x0001 // Experimental 1
#define USB_PID_FSF_USRP 0x0002 // Universal Software Radio Peripheral
-#define USB_PID_FSF_USRP_reserved 0x0003 // Universal Software Radio Peripheral
+#define USB_PID_FSF_USRP1P 0x0003 // USRP1P
#define USB_PID_FSF_SSRP 0x0004 // Simple Software Radio Peripheral
#define USB_PID_FSF_SSRP_reserved 0x0005 // Simple Software Radio Peripheral
#define USB_PID_FSF_HPSDR 0x0006 // High Performance Software Defined Radio (Internal Boot)
diff --git a/firmware/fx2/include/usrp_interfaces.h b/firmware/fx2/common/usrp_interfaces.h
index 8666e0490..8666e0490 100644
--- a/firmware/fx2/include/usrp_interfaces.h
+++ b/firmware/fx2/common/usrp_interfaces.h
diff --git a/firmware/fx2/include/usrp_spi_defs.h b/firmware/fx2/common/usrp_spi_defs.h
index 963463ef2..963463ef2 100644
--- a/firmware/fx2/include/usrp_spi_defs.h
+++ b/firmware/fx2/common/usrp_spi_defs.h
diff --git a/firmware/fx2/src/common/vectors.a51 b/firmware/fx2/common/vectors.a51
index e9382ab84..4eec9fdbf 100644
--- a/firmware/fx2/src/common/vectors.a51
+++ b/firmware/fx2/common/vectors.a51
@@ -29,7 +29,6 @@
;;; ----------------------------------------------------------------
;;; standard FX2 interrupt vectors
;;; ----------------------------------------------------------------
-
.area CSEG (CODE)
.area GSINIT (CODE)
.area CSEG (CODE)
diff --git a/firmware/fx2/config/.gitignore b/firmware/fx2/config/.gitignore
deleted file mode 100644
index 16f775e32..000000000
--- a/firmware/fx2/config/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/libtool.m4
-/lt~obsolete.m4
-/ltsugar.m4
-/ltversion.m4
-/ltoptions.m4
diff --git a/firmware/fx2/config/CMakeASM_SDCCInformation.cmake b/firmware/fx2/config/CMakeASM_SDCCInformation.cmake
new file mode 100644
index 000000000..d9f28b8d3
--- /dev/null
+++ b/firmware/fx2/config/CMakeASM_SDCCInformation.cmake
@@ -0,0 +1,28 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+# support for the SDCC assembler, asx8051
+SET( ASM_DIALECT "_SDCC" )
+SET( CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS a51 )
+
+#i don't want to talk about it. i had such high hopes for CMake.
+SET( CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -plosgff <SOURCE>" "${CMAKE_COMMAND} -DFILE=<OBJECT> -DSOURCE=<SOURCE> -P ${CMAKE_SOURCE_DIR}/config/Rename.cmake")
+
+INCLUDE( CMakeASMInformation )
+SET( CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION ".rel" ) #must go here because the include appears to overwrite it, although it shouldn't
+# for future use
+SET( ASM_DIALECT )
diff --git a/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake b/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake
new file mode 100644
index 000000000..ab301b9f3
--- /dev/null
+++ b/firmware/fx2/config/CMakeDetermineASM_SDCCCompiler.cmake
@@ -0,0 +1,22 @@
+
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Find the MS assembler (masm or masm64)
+
+SET(ASM_DIALECT "_SDCC")
+
+SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT asx8051)
+
+INCLUDE(CMakeDetermineASMCompiler)
+SET(ASM_DIALECT)
diff --git a/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake b/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake
new file mode 100644
index 000000000..1cb71cd9d
--- /dev/null
+++ b/firmware/fx2/config/CMakeTestASM_SDCCCompiler.cmake
@@ -0,0 +1,23 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This file is used by EnableLanguage in cmGlobalGenerator to
+# determine that that selected ASM-ATT compiler can actually compile
+# and link the most basic of programs. If not, a fatal error
+# is set and cmake stops processing commands and will not generate
+# any makefiles or projects.
+
+SET(ASM_DIALECT "_SDCC")
+INCLUDE(CMakeTestASMCompiler)
+SET(ASM_DIALECT)
diff --git a/firmware/fx2/config/Makefile.am b/firmware/fx2/config/Makefile.am
deleted file mode 100644
index 487ceed1b..000000000
--- a/firmware/fx2/config/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright 2001,2006,2008,2009,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-# Install m4 macros in this directory
-m4datadir = $(datadir)/aclocal
-
-# List your m4 macros here
-m4macros = \
- grc_build.m4 \
- grc_fx2.m4 \
- gr_git.m4 \
- gr_lib64.m4 \
- gr_no_undefined.m4 \
- gr_pwin32.m4 \
- gr_python.m4 \
- gr_require_mc4020.m4 \
- gr_scripting.m4 \
- gr_set_md_cpu.m4 \
- gr_standalone.m4 \
- lf_cc.m4 \
- lf_cxx.m4 \
- lf_warnings.m4 \
- lf_x11.m4 \
- mkstemp.m4 \
- onceonly.m4 \
- pkg.m4 \
- usrp_sdcc.m4
-
-EXTRA_DIST = $(m4macros)
diff --git a/firmware/fx2/config/Rename.cmake b/firmware/fx2/config/Rename.cmake
new file mode 100644
index 000000000..36cd33527
--- /dev/null
+++ b/firmware/fx2/config/Rename.cmake
@@ -0,0 +1,37 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+#go and fetch the real compiler outputs because the compiler does things wrong and CMake is too damn brittle to cope
+#just incidentally, why the heck does aslink look for a .lst input? why should it care?
+
+#first the .rel
+get_filename_component(source_noext ${SOURCE} NAME_WE)
+get_filename_component(source_path ${SOURCE} PATH)
+set(compiled_ext .rel)
+list(APPEND compiled_filepath ${source_path}/${source_noext}${compiled_ext})
+#EXECUTE_PROCESS(COMMAND echo Moving ${compiled_filepath} to ${FILE})
+EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E rename ${compiled_filepath} ${FILE})
+
+#now do the same for the .lst
+set(compiled_lst .lst)
+get_filename_component(src_ext ${SOURCE} EXT)
+get_filename_component(lst_noext ${FILE} NAME_WE)
+get_filename_component(lst_path ${FILE} PATH)
+list(APPEND compiled_lstpath ${source_path}/${source_noext}${compiled_lst})
+list(APPEND compiled_outputlstpath ${lst_path}/${lst_noext}${src_ext}${compiled_lst})
+#EXECUTE_PROCESS(COMMAND echo Moving ${compiled_lstpath} to ${compiled_outputlstpath})
+EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E rename ${compiled_lstpath} ${compiled_outputlstpath})
diff --git a/firmware/fx2/config/Toolchain-sdcc.cmake b/firmware/fx2/config/Toolchain-sdcc.cmake
new file mode 100644
index 000000000..733d8f563
--- /dev/null
+++ b/firmware/fx2/config/Toolchain-sdcc.cmake
@@ -0,0 +1,32 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Generic)
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER sdcc)
+
+# here is where the target environment is located
+SET(CMAKE_FIND_ROOT_PATH /usr/bin /usr/share/sdcc)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
diff --git a/firmware/fx2/config/gr_git.m4 b/firmware/fx2/config/gr_git.m4
deleted file mode 100644
index 5e8aa663b..000000000
--- a/firmware/fx2/config/gr_git.m4
+++ /dev/null
@@ -1,58 +0,0 @@
-dnl Copyright 2009,2010 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-
-AC_DEFUN([GR_GIT],[
- dnl Identify git binary
- AC_PATH_PROG([GIT],[git])
-
- dnl If it exists, get either 'git describe' or fallback to current commit
- if test x$GIT != x ; then
- AC_MSG_CHECKING([existence of git version control directory])
- if test -d $srcdir/.git ; then
- AC_MSG_RESULT([ok])
- AC_MSG_CHECKING([git description of current commit])
- if (cd $srcdir && $GIT describe >/dev/null 2>&1); then
- GIT_DESCRIBE=`cd $srcdir && $GIT describe --abbrev=8 --long`
- GIT_TAG=`echo $GIT_DESCRIBE | cut -f 1 -d '-'`
- GIT_SEQNO=`echo $GIT_DESCRIBE | cut -f 2 -d '-'`
- GIT_COMMIT=`echo $GIT_DESCRIBE | cut -f 3 -d '-' | cut -f 2- -d 'g'`
- # Release candidate tags create an extra -rcX field
- if test x`echo $GIT_DESCRIBE | cut -f 1- -d '-' --output-delimiter=' ' | wc -w` = x4; then
- GIT_TAG=`echo $GIT_DESCRIBE | cut -f -2 -d '-'`
- GIT_SEQNO=`echo $GIT_DESCRIBE | cut -f 3 -d '-'`
- GIT_COMMIT=`echo $GIT_DESCRIBE | cut -f 4 -d '-' | cut -f 2- -d 'g'`
- fi
- AC_MSG_RESULT([$GIT_DESCRIBE])
- else
- AC_MSG_RESULT([unable to find, using current commit])
- GIT_TAG=''
- GIT_SEQNO=''
- GIT_COMMIT=`cd $srcdir && $GIT describe --always --abbrev=8`
- fi
- else
- AC_MSG_RESULT([not found])
- fi
-
- AC_SUBST([GIT_DESCRIBE])
- AC_SUBST([GIT_TAG])
- AC_SUBST([GIT_SEQNO])
- AC_SUBST([GIT_COMMIT])
- fi
-])
diff --git a/firmware/fx2/config/gr_lib64.m4 b/firmware/fx2/config/gr_lib64.m4
deleted file mode 100644
index 751f774b4..000000000
--- a/firmware/fx2/config/gr_lib64.m4
+++ /dev/null
@@ -1,85 +0,0 @@
-dnl
-dnl Copyright 2005,2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-dnl
-
-dnl GR_LIB64()
-dnl
-dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine
-dnl if libdir should end in "64" or not.
-dnl
-dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix)
-dnl May append "64" to libdir.
-dnl
-dnl The current heuristic is:
-dnl if the host_cpu isn't x86_64 or powerpc64, then ""
-dnl if the host_os isn't linux, then ""
-dnl if we're cross-compiling, ask the linker, by way of the selected compiler
-dnl if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else ""
-dnl else ask the compiler
-dnl
-AC_DEFUN([GR_LIB64],[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_PROG_CXX])
-
- AC_MSG_CHECKING([gr_libdir_suffix])
- gr_libdir_suffix=""
- AC_SUBST(gr_libdir_suffix)
-
- case "$host_os" in
- linux*) is_linux=yes ;;
- *) is_linux=no ;;
- esac
-
- if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then
- gr_libdir_suffix=""
- elif test "$cross_compiling" = yes; then
- _GR_LIB64_ASK_COMPILER
- elif test "$host_cpu" = "x86_64"; then
- if test -d /lib64 && test ! -L /lib64; then
- gr_libdir_suffix=64
- fi
- else
- _GR_LIB64_ASK_COMPILER
- fi
- AC_MSG_RESULT([$gr_libdir_suffix])
-
-
- AC_MSG_CHECKING([whether to append 64 to libdir])
- t=${libdir##*/lib}
- if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then
- libdir=${libdir}64
- AC_MSG_RESULT([yes. Setting libdir to $libdir])
- else
- AC_MSG_RESULT([no])
- fi
-])
-
-dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script
-dnl and see if it contains a suffix after the final .../lib part of the path.
-dnl (This works because the linker script varies depending on whether we're generating
-dnl 32-bit or 64-bit executables)
-dnl
-AC_DEFUN([_GR_LIB64_ASK_COMPILER],[
- if test "$ac_cv_cxx_compiler_gnu" = "yes";
- then
- gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'`
- fi
-])
-
diff --git a/firmware/fx2/config/gr_no_undefined.m4 b/firmware/fx2/config/gr_no_undefined.m4
deleted file mode 100644
index c8d745d5f..000000000
--- a/firmware/fx2/config/gr_no_undefined.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-dnl
-dnl Copyright 2005 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-dnl
-
-# GR_NO_UNDEFINED()
-#
-# Detemine whether we need to use the -no-undefined linker flag
-# when building shared libraries.
-# Sets NO_UNDEFINED to "" or "-no-undefined"
-#
-# As far as I can tell, we need -no-undefined only when building
-# windows DLLs. This occurs when using MinGW and Cygwin.
-#
-# For now, we stub this out.
-
-AC_DEFUN([GR_NO_UNDEFINED],[
- AC_REQUIRE([AC_CANONICAL_HOST])
- no_undefined=""
- case "${host_os}" in
- *mingw* | *cygwin*)
-
- # on MinGW/Cygwin extra LDFLAGS are required
- no_undefined="-no-undefined"
- ;;
- esac
- AC_SUBST(NO_UNDEFINED,[$no_undefined])
-])
diff --git a/firmware/fx2/config/gr_pwin32.m4 b/firmware/fx2/config/gr_pwin32.m4
deleted file mode 100644
index 495e9dd4d..000000000
--- a/firmware/fx2/config/gr_pwin32.m4
+++ /dev/null
@@ -1,149 +0,0 @@
-# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*-
-
-# Copyright 2003,2004,2005 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-
-AC_DEFUN([GR_PWIN32],
-[
-AC_REQUIRE([AC_HEADER_TIME])
-AC_CHECK_HEADERS([sys/types.h fcntl.h io.h])
-AC_CHECK_HEADERS([windows.h])
-AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [
- #if HAVE_WINDOWS_H
- #include <windows.h>
- #endif
-])
-
-AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction])
-AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[
- #if HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #if TIME_WITH_SYS_TIME
- # include <sys/time.h>
- # include <time.h>
- #else
- # if HAVE_SYS_TIME_H
- # include <sys/time.h>
- # else
- # include <time.h>
- # endif
- #endif
-])
-
-dnl Checks for replacements
-AC_REPLACE_FUNCS([getopt usleep gettimeofday])
-
-
-AC_MSG_CHECKING(for Sleep)
-AC_TRY_LINK([ #include <windows.h>
- #include <winbase.h>
- ], [ Sleep(0); ],
- [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep])
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no)
- )
-
-dnl Under Win32, mkdir prototype in io.h has only one arg
-AC_MSG_CHECKING(whether mkdir accepts only one arg)
-AC_TRY_COMPILE([#include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>], [
- mkdir("")
- ], [ AC_MSG_RESULT(yes)
- AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ],
- [ AC_MSG_RESULT(no)
- ])
-
-AH_BOTTOM(
-[
-/* Define missing prototypes, implemented in replacement lib */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef HAVE_GETOPT
-int getopt (int argc, char * const argv[], const char * optstring);
-extern char * optarg;
-extern int optind, opterr, optopt;
-#endif
-
-#ifndef HAVE_USLEEP
-int usleep(unsigned long usec); /* SUSv2 */
-#endif
-
-#ifndef HAVE_NANOSLEEP
-#ifndef HAVE_STRUCT_TIMESPEC
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h> /* need time_t */
-#endif
-struct timespec {
- time_t tv_sec;
- long tv_nsec;
-};
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); }
-#endif
-
-#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP)
-#ifdef HAVE_WINBASE_H
-#include <windows.h>
-#include <winbase.h>
-#endif
-/* TODO: what about SleepEx? */
-static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; }
-#endif
-
-#ifndef HAVE_GETTIMEOFDAY
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifndef HAVE_STRUCT_TIMEZONE
-struct timezone {
- int tz_minuteswest;
- int tz_dsttime;
-};
-#endif
-int gettimeofday(struct timeval *tv, struct timezone *tz);
-#endif
-
-#if !defined(HAVE_RANDOM) && defined(HAVE_RAND)
-#include <stdlib.h>
-static inline long int random (void) { return rand(); }
-#endif
-
-#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND)
-static inline void srandom (unsigned int seed) { srand(seed); }
-#endif
-
-#ifndef HAVE_SSIZE_T
-typedef size_t ssize_t;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-])
-
-
-])
diff --git a/firmware/fx2/config/gr_python.m4 b/firmware/fx2/config/gr_python.m4
deleted file mode 100644
index 43ccfc015..000000000
--- a/firmware/fx2/config/gr_python.m4
+++ /dev/null
@@ -1,172 +0,0 @@
-dnl
-dnl Copyright 2003,2004,2005 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-dnl
-
-# PYTHON_DEVEL()
-#
-# Checks for Python and tries to get the include path to 'Python.h'.
-# It sets the $(PYTHON_CPPFLAGS), $(PYTHON_LDFLAGS) and $(pythondir) output variables,
-#
-AC_DEFUN([PYTHON_DEVEL],[
- AC_REQUIRE([AM_PATH_PYTHON])
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- AC_ARG_WITH(pythondir,
- AC_HELP_STRING([--with-pythondir=DIR],
- [python installation directory (cross-compiling) [[default=$prefix/lib/python2.5/site-packages]]]),
- [with_pythondir=${withval}],[with_pythondir=${prefix}/lib/python2.5/site-packages])
-
- # if we're cross-compiling, asking the host python about any of
- # this is completely useless...
-
- if test x$cross_compiling != xno
- then
- pythondir=$with_pythondir
- pyexecdir=$with_pythondir
- AC_SUBST(PYTHON_CPPFLAGS)
- AC_SUBST(PYTHON_LDFLAGS)
- else
-
- # For Fedora Core 5 and 6, see ticket:39 in Trac
- if test -f '/etc/redhat-release'; then
- if (echo $pyexecdir | grep -q lib64); then
- pythondir="$pyexecdir"
- fi
- fi
-
- # Check for Python include path
- AC_MSG_CHECKING([for Python include path])
- if test -z "$PYTHON" ; then
- AC_MSG_ERROR([cannot find Python path])
- fi
-
- # ask distutils which include path we should use
- python_cmd='
-import distutils.sysconfig
-import os
-path = distutils.sysconfig.get_python_inc(plat_specific=False)
-if os.sep == "\\":
- path = path.replace("\\", "/")
-print path
-'
- python_path=`$PYTHON -c "$python_cmd"`
- AC_MSG_RESULT([$python_path])
- if test -z "$python_path" ; then
- AC_MSG_ERROR([cannot find Python include path])
- fi
-
- AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path])
-
- # Check for Python headers usability
- python_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
- AC_CHECK_HEADERS([Python.h], [],
- [AC_MSG_ERROR([cannot find usable Python headers])])
- CPPFLAGS="$python_save_CPPFLAGS"
-
- # Only set this on mingw and cygwin hosts, (only implemented
- # for mingw host, for crosscompiling you need to trick this)
-
- PYTHON_LDFLAGS=""
- case $host_os in
- *mingw* | *cygwin* )
- AC_MSG_CHECKING([for Python LDFLAGS])
-
- python_cmd='
-import distutils.sysconfig
-import os
-path = distutils.sysconfig.get_config_var("LIBPL")
-if path == None:
- path = distutils.sysconfig.PREFIX + "/libs"
-if os.sep == "\\":
- path = path.replace("\\", "/")
-print path
-'
- python_stdlib_path=`$PYTHON -c "$python_cmd"`
-
- python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"`
- libpython_name="python$PYTHON_VERSION"
-
- # Standard install of python for win32 has libpython24.a
- # instead of libpython2.4.a so we check for the library
- # without the dot in the version number.
-
- python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"`
- if test -n "$python_stdlib_filename" ; then
- libpython_name="python$python_version_nodot"
- fi
-
- PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name"
- AC_MSG_RESULT($PYTHON_LDFLAGS)
- # Replace all backslashes in PYTHON Paths with forward slashes
- pythondir=`echo $pythondir |sed 's,\\\\,/,g'`
- pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'`
- pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'`
- pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'`
- ;;
- esac
-
- case $host_os in
- *mingw* )
- # Python 2.5 requires ".pyd" instead of ".dll" for extensions
- PYTHON_LDFLAGS="-shrext .pyd ${PYTHON_LDFLAGS}"
- esac
-
- AC_SUBST(PYTHON_LDFLAGS)
- fi
-])
-
-# PYTHON_CHECK_MODULE
-#
-# Determines if a particular Python module can be imported
-#
-# $1 - module name
-# $2 - module description
-# $3 - action if found
-# $4 - action if not found
-# $5 - test command
-
-AC_DEFUN([PYTHON_CHECK_MODULE],[
- AC_MSG_CHECKING([for $2])
- dnl ########################################
- dnl # import and test checking
- dnl ########################################
- if test "$5"; then
- python_cmd='
-try:
- import $1
- assert $5
-except: exit(1)'
- dnl ########################################
- dnl # import checking only
- dnl ########################################
- else
- python_cmd='
-try: import $1
-except: exit(1)'
- fi
- if ! $PYTHON -c "$python_cmd" 2> /dev/null; then
- AC_MSG_RESULT([no])
- $4
- else
- AC_MSG_RESULT([yes])
- $3
- fi
-])
diff --git a/firmware/fx2/config/gr_scripting.m4 b/firmware/fx2/config/gr_scripting.m4
deleted file mode 100644
index 2803e975f..000000000
--- a/firmware/fx2/config/gr_scripting.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-dnl
-dnl Copyright 2003 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-dnl
-
-AC_DEFUN([GR_SCRIPTING],[
- AC_REQUIRE([AC_PROG_LN_S])
- AC_REQUIRE([AC_PROG_CXX])
- AC_REQUIRE([AC_PROG_LIBTOOL])
-])
diff --git a/firmware/fx2/config/gr_standalone.m4 b/firmware/fx2/config/gr_standalone.m4
deleted file mode 100644
index 370f7fb03..000000000
--- a/firmware/fx2/config/gr_standalone.m4
+++ /dev/null
@@ -1,116 +0,0 @@
-dnl
-dnl Copyright 2008 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License along
-dnl with this program; if not, write to the Free Software Foundation, Inc.,
-dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-dnl
-
-dnl
-dnl GR_STANDALONE([package],[version])
-dnl
-dnl Handles the bulk of the configure.ac work for an out-of-tree build
-dnl
-dnl N.B., this is an m4_define because if it were an AC_DEFUN it would
-dnl get called too late to be useful.
-
-m4_define([GR_STANDALONE],
-[
- AC_INIT([$1],[$2])
- AC_PREREQ(2.57)
- AC_CONFIG_SRCDIR([config/gr_standalone.m4])
- AC_CONFIG_AUX_DIR([.])
- AM_CONFIG_HEADER(config.h)
-
- AC_CANONICAL_BUILD
- AC_CANONICAL_HOST
- AC_CANONICAL_TARGET
-
- AM_INIT_AUTOMAKE
-
- LF_CONFIGURE_CC
- LF_CONFIGURE_CXX
- GR_LIB64 dnl check for lib64 suffix after choosing compilers
-
- dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
- if test x${PKG_CONFIG_PATH} = x; then
- PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
- else
- PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
- fi
- export PKG_CONFIG_PATH
-
- LF_SET_WARNINGS
- GR_SET_GPROF
- GR_SET_PROF
- AM_PROG_AS
- AC_PROG_LN_S
- AC_PROG_MAKE_SET
- AC_PROG_INSTALL
- AC_PATH_PROG([RM_PROG], [rm])
-
- AC_LIBTOOL_WIN32_DLL
- AC_ENABLE_SHARED dnl do build shared libraries
- AC_DISABLE_STATIC dnl don't build static libraries
- m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
- dnl GR_FORTRAN
-
- GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
- GR_SCRIPTING dnl Locate python, SWIG, etc
-
- AC_ARG_WITH([python],
- AC_HELP_STRING([--with-python], [Should we use python? [[default=yes]]]),
- [case "$with_python" in
- (no | yes) ;;
- (*) AC_MSG_ERROR([Invalid argument ($with_python) to --with-python]) ;;
- esac],
- [with_python=yes])
-
- AM_CONDITIONAL([USE_PYTHON], [test "$with_python" = yes])
-
-
- dnl Set the c++ compiler that we use for the build system when cross compiling
- if test "x$CXX_FOR_BUILD" = x
- then
- CXX_FOR_BUILD=${CXX}
- fi
- AC_SUBST(CXX_FOR_BUILD)
-
- dnl Checks for header files.
- AC_HEADER_STDC
-
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_C_INLINE
- AC_TYPE_SIZE_T
- AC_HEADER_TIME
- AC_C_BIGENDIAN
-
- dnl Check for Mingw support
- GR_PWIN32
-
- AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
- AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
-
- dnl Define where to look for cppunit includes and libs
- dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS
- dnl Try using pkg-config first, then fall back to cppunit-config.
- PKG_CHECK_EXISTS(cppunit,
- [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)],
- [AM_PATH_CPPUNIT([1.9.14],[],
- [AC_MSG_ERROR([GNU Radio requires cppunit. Stop])])])
-
- PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
-])
diff --git a/firmware/fx2/config/grc_build.m4 b/firmware/fx2/config/grc_build.m4
deleted file mode 100644
index 77b59db6b..000000000
--- a/firmware/fx2/config/grc_build.m4
+++ /dev/null
@@ -1,287 +0,0 @@
-dnl Copyright 2006,2008,2009 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-dnl Create --enable-foo argument for named component, create variables as needed
-dnl $1 is component name
-AC_DEFUN([GRC_ENABLE], [
- _GRC_ENABLE($1,m4_bpatsubst($1,-,_))
-])
-dnl $2 is the '_'d component name
-dnl on exit variable enable_$2 will be set to [yes|no];
-dnl passed will be [yes|no] (same as enable_$2)
-
-AC_DEFUN([_GRC_ENABLE],[
- passed=yes
- AC_ARG_ENABLE([$1],
- AC_HELP_STRING([--enable-$1],
- [Stop if $1 fails configuration]),
- [],[
- [enable_]$2=$enable_all_components
- if test x$enable_all_components = xno; then
- passed=no
- fi
- ])
-])
-dnl Component specific configuration
-dnl The order of the GR_ macros determines the order of compilation
-dnl For -any- checks on $enable_all_components
-dnl use the following guildlines:
-dnl yes : --enable-all-components was specified, so error out if any
-dnl components do not pass configuration checks.
-dnl no : --disable-all-components was specified, so try to build the
-dnl --enable'd components, and error out if any do not pass
-dnl configuration checks.
-dnl "" : this option was not specified on the command line; try to
-dnl build all components that are not --with'd, but don't
-dnl error out if any component does not pass configuration checks.
-dnl
-dnl For each --enable-foo component, if that flag is not specified on
-dnl the command line, the related variable $enable_foo will be set to
-dnl $enable_all_components .
-
-dnl Create --with-foo argument for named compoment, create variables as needed
-dnl $1 is component name
-dnl $2 is what to do on success
-dnl $3 is the PKG_CONFIG name; if not given, then $1
-AC_DEFUN([GRC_WITH], [
- if test [x]$3 = x; then
- pc_comp_name="$1"
- else
- pc_comp_name="$3"
- fi
- _GRC_WITH($1,[$2],${pc_comp_name},m4_bpatsubst($1,-,_))
-])
-dnl $3 is the pkg-config component name
-dnl $4 is the '_'d component name
-dnl on exit variable passed will be [yes|no|with]:
-dnl yes: if --enable-$1 and/or --enable-all-components was specified,
-dnl but --with was not;
-dnl with: if --with-$1 was specified, and passed checks;
-dnl no: all other conditions
-AC_DEFUN([_GRC_WITH],[
- AC_ARG_WITH([$1],
- AC_HELP_STRING([--with-$1@<:@=PATH@:>@],
- [Use package $1 if installed in PATH (if specified) or PKG_CONFIG_PATH (if PATH not specified); stop if $1 not found]),
- [if test "x$withval" != "xyes"; then
- [with_]$4[_val]=$withval
- [with_]$4=yes
- fi],
- [])
- if test x$[with_]$4 = xyes; then
- if test x$[enable_]$4 = xyes; then
- AC_MSG_ERROR([Component $1: Cannot use both --enable and --with])
- else
- _GRC_WITH_PKG_CONFIG_CHECK($1,$3,$4)
- ifelse([$2], , :, [$2])
- fi
- fi
-])
-
-dnl Use 'pkgconfig' to check for a package
-dnl $1 is the --with component name
-dnl $2 is the pkg-config component name, if provided; otherwise use $1 for this
-dnl on success, resulting INCLUDES, INCLUDEDIR, LA, and LIBDIRPATH variables
-dnl will be set; on failure, will exit with an error.
-AC_DEFUN([GRC_WITH_PKG_CONFIG_CHECK], [
- if test [x]$2 = x; then
- pc_comp_name="$1"
- else
- pc_comp_name="$2"
- fi
- _GRC_WITH_PKG_CONFIG_CHECK($1,${pc_comp_name},m4_bpatsubst($1,-,_))
-])
-dnl $2 is the pkg-config component name
-dnl $3 is the '_'d component name
-AC_DEFUN([_GRC_WITH_PKG_CONFIG_CHECK],[
- dnl save PKG_CONFIG_PATH, restore at the end
- s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
-
- dnl create the PKG_CONFIG_PATH, via this component arg, if provided;
- dnl else use the environment PKG_CONFIG_PATH
- l_PKG_CONFIG_PATH=$[with_]$3[_val]
- if test "x$l_PKG_CONFIG_PATH" != "x"; then
- export PKG_CONFIG_PATH=$l_PKG_CONFIG_PATH
-
- dnl verify that the file exists; if not, no point in continuing
- if ! test -r ${l_PKG_CONFIG_PATH}/$2[.pc]; then
- AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info for $2, with provided PKG_CONFIG_PATH = @<:@ $l_PKG_CONFIG_PATH @:>@ .])
- fi
- fi
-
- dnl do the check; error out if not found
- PKG_CHECK_EXISTS($2, [passed=with; check1=yes], [
- check1=no
- dnl pkg-config returned an error; this might be that the .pc
- dnl file was not valid, or the Requires: were not met.
- dnl If the arg was provided and the input PKG_CONFIG_PATH , then try
- dnl again appending the whole PKG_CONFIG_PATH.
- if test "x$l_PKG_CONFIG_PATH" != "x"; then
- if test "x$s_PKG_CONFIG_PATH" != "x"; then
- export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH}
- PKG_CHECK_EXISTS($2, passed=with, passed=no)
- fi
- fi
- if test $passed != with; then
- AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info for $2, with PKG_CONFIG_PATH = @<:@ $PKG_CONFIG_PATH @:>@ .])
- fi
- dnl pkg-config Requires are now met; save the new PKG_CONFIG_PATH
- s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
- ])
-
- dnl if PKG_CHECK_EXISTS returned, then this component's .pc file was
- dnl found in the provided 'arg' PKG_CONFIG_PATH;
- dnl retrieve various parameters
- $3[_INCLUDES]=`$PKG_CONFIG --cflags-only-I $2`
- $3[_LA]=`$PKG_CONFIG --libs $2`
- $3[_INCLUDEDIR]=`$PKG_CONFIG --variable=includedir $2`
-
- if test x$check1 = xyes; then
- dnl prepend the args PKG_CONFIG_PATH to the saved one, if the
- dnl saved version was not empty
- if test "x$s_PKG_CONFIG_PATH" != "x"; then
- export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH}
- fi
- fi
-])
-
-dnl Check the $prefix versus the --with libdirpath for this component
-dnl $1 is the prefix
-dnl $2 is the --with component name
-dnl $3 is the --with component library path
-AC_DEFUN([GRC_PREFIX_LDFLAGS],[
- $2[_LIBDIRPATH]=$3
- dnl create LDFLAGS for this --with, if different from the provided $prefix
- if test [x]$1[/lib] != [x]$3; then
- $2[_LDFLAG]=[-L]$3
- else
- $2[_LDFLAG]=
- fi
-])
-
-dnl Check to make sure this dependency is fulfilled for this component
-dnl $1 is the component's name
-dnl $2 is the component dependency name
-dnl On input and exit, $passed will be:
-dnl with : if --with passed muster
-dnl yes : if --enable passed muster
-dnl no : otherwise
-dnl If trying --with, will error-out if any dependency was not --with'd
-AC_DEFUN([GRC_CHECK_DEPENDENCY],[
-dnl f0=[enable_]m4_bpatsubst($1,-,_)
-dnl f1=[$enable_]m4_bpatsubst($1,-,_)
-dnl echo
-dnl echo "$1 : Checking Dependency $2"
-dnl echo "$1 : enable_all_components is '$enable_all_components'"
-dnl echo "$1 : $f0 is '$f1'"
-dnl echo "$1 : passed is '$passed'"
-dnl echo
- if test $passed != no; then
- if test $passed = yes; then
- dnl make sure this dependency was not skipped
- if test [x$]m4_bpatsubst($2,-,_)[_skipped] = xyes; then
- AC_MSG_RESULT([Component $1 requires $2, which is not being built or specified via pre-installed files.])
- passed=no
- fi
- else
- dnl make sure this dependency was --with'd only; not --enable'd
- if test [x$]m4_bpatsubst($2,-,_)[_with] = xno; then
- AC_MSG_ERROR([Component $1 requires $2 to be included as --with-$2@<:@=arg@:>@])
- fi
- fi
- fi
-])
-
-dnl Check to make sure GUILE is available
-dnl $1 is the component name
-AC_DEFUN([GRC_CHECK_GUILE],[
- if test x"$GUILE" = x; then
- AC_MSG_RESULT([Component $1 requires guile, which was not found.])
- passed=no
- fi
-])
-
-dnl Add the specified "with" list; clear the provided variable
-dnl $1 is the component name
-dnl $2 is the path list name suffix
-dnl $3 is the separator (for paths, ":"; for includes " ")
-AC_DEFUN([GRC_ADD_TO_LIST],[
- if test "x${$1[_]$2}" != "x"; then
- if test "x$[with_]$2" = "x"; then
- [with_]$2="${$1[_]$2}"
- else
- [with_]$2="${$1[_]$2}"$3"$[with_]$2"
- fi
- $1[_]$2=
- fi
-])
-
-dnl Conditionally build named component.
-dnl $1 is component name
-dnl $2 is executed if configuration passes and build is desired
-AC_DEFUN([GRC_BUILD_CONDITIONAL],[
- _GRC_BUILD_CONDITIONAL($1, $2, m4_bpatsubst($1,-,_))
-])
-dnl $3=m4_bpatsubst($1,-,_)
-dnl Use $passed=no to indicate configuration failure;
-dnl Use $passed=with to indicate the use of pre-installed libraries and headers;
-dnl Any other value of $passed, including blank, assumes success;
-dnl Defines $3_with=[yes|no] depending on if $passed=with or not (respectively)
-dnl Defines $3_skipped=[yes|no] depending on if $passed=no or not (respectively)
-AC_DEFUN([_GRC_BUILD_CONDITIONAL],[
- $3[_with]=no
- if test $passed = no; then
- if test x$[enable_]$3 = xyes; then
- AC_MSG_ERROR([Component $1 has errors; stopping.])
- else
- AC_MSG_RESULT([Not building component $1.])
- fi
- else
- if test $passed = with; then
- with_dirs="$with_dirs $1"
- GRC_ADD_TO_LIST($3, INCLUDES, " ")
- GRC_ADD_TO_LIST($3, SWIG_INCLUDES, " ")
- GRC_ADD_TO_LIST($3, PYDIRPATH, ":")
- GRC_ADD_TO_LIST($3, SWIGDIRPATH, ":")
- GRC_ADD_TO_LIST($3, LIBDIRPATH, ":")
- AC_MSG_RESULT([Component $1 will be included from a pre-installed library and includes.])
- $3[_with]=yes
- else
- $3[_LDFLAG]=
- if test x$[enable_]$3 != xno; then
- ifelse([$2], , :, [$2])
- build_dirs="$build_dirs $1"
- AC_MSG_RESULT([Component $1 passed configuration checks; building.])
- else
- passed=no
- AC_MSG_RESULT([Component $1 passed configuration checks; but not building.])
- fi
- fi
- fi
- if test $passed = no; then
- skipped_dirs="$skipped_dirs $1"
- $3[_skipped]=yes
- else
- $3[_skipped]=no
- fi
- AC_SUBST($3[_INCLUDES])
- AC_SUBST($3[_LA])
- AC_SUBST($3[_INCLUDEDIR])
- AC_SUBST($3[_LIBDIRPATH])
- AC_SUBST($3[_LDFLAG])
-])
diff --git a/firmware/fx2/config/grc_fx2.m4 b/firmware/fx2/config/grc_fx2.m4
deleted file mode 100644
index 00a41c973..000000000
--- a/firmware/fx2/config/grc_fx2.m4
+++ /dev/null
@@ -1,58 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_FX2],[
- GRC_ENABLE(usrp)
-
- GRC_WITH(usrp)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- dnl gnulib.
- dnl FIXME: this needs to fail gracefully and continue, not implemented yet
- UTILS_FUNC_MKSTEMP
-
- dnl These checks don't fail
- AC_C_BIGENDIAN
- AC_CHECK_HEADERS([byteswap.h linux/compiler.h])
- AC_CHECK_FUNCS([getrusage sched_setscheduler pthread_setschedparam])
- AC_CHECK_FUNCS([sigaction snprintf])
-
- dnl Make sure SDCC >= 2.4.0 is available.
- USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware compiler SDCC.])])
- fi
- if test $passed != with; then
- dnl how and where to find INCLUDES and LA
- usrp_INCLUDES=" \
- -I\${abs_top_srcdir}/include"
- fi
-
- AC_CONFIG_FILES([ \
- include/Makefile \
- lib/Makefile \
- src/Makefile \
- src/common/Makefile \
- src/usrp1/Makefile \
- ])
-
- GRC_BUILD_CONDITIONAL(usrp)
-])
diff --git a/firmware/fx2/config/lf_cc.m4 b/firmware/fx2/config/lf_cc.m4
deleted file mode 100644
index b75e1a4c5..000000000
--- a/firmware/fx2/config/lf_cc.m4
+++ /dev/null
@@ -1,41 +0,0 @@
-dnl Autoconf support for C++
-dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-
-# -------------------------------------------------------------------------
-# Use this macro to configure your C compiler
-# When called the macro does the following things:
-# 1. It finds an appropriate C compiler.
-# If you passed the flag --with-cc=foo then it uses that
-# particular compiler
-# 2. Check whether the compiler works.
-# 3. Checks whether the compiler accepts the -g
-# -------------------------------------------------------------------------
-
-AC_DEFUN([LF_CONFIGURE_CC],[
- dnl Sing the song
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_CPP])dnl
- AC_REQUIRE([AC_AIX])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
-])
-
diff --git a/firmware/fx2/config/lf_cxx.m4 b/firmware/fx2/config/lf_cxx.m4
deleted file mode 100644
index dfc6bfbfe..000000000
--- a/firmware/fx2/config/lf_cxx.m4
+++ /dev/null
@@ -1,67 +0,0 @@
-dnl Autoconf support for C++
-dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-
-# -----------------------------------------------------------------
-# This macro should be called to configure your C++ compiler.
-# When called, the macro does the following things:
-# 1. It finds an appropriate C++ compiler
-# If you passed the flag --with-cxx=foo, then it uses that
-# particular compiler
-# 2. Checks whether the compiler accepts the -g
-# ------------------------------------------------------------------
-
-AC_DEFUN([LF_CONFIGURE_CXX],[
- AC_REQUIRE([AC_PROG_CXX])dnl
- AC_REQUIRE([AC_PROG_CXXCPP])dnl
- LF_CXX_PORTABILITY
-])
-
-# -----------------------------------------------------------------------
-# This macro tests the C++ compiler for various portability problem.
-# -----------------------------------------------------------------------
-
-
-AC_DEFUN([LF_CXX_PORTABILITY],[
-
- dnl
- dnl Check for common C++ portability problems
- dnl
-
- dnl AC_LANG_PUSH
- dnl AC_LANG_CPLUSPLUS
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
-
-
- dnl Test whether C++ has std::isnan
- AC_MSG_CHECKING(whether C++ has std::isnan)
- AC_TRY_COMPILE([#include <cmath>], [
- std::isnan(0);
-], [ AC_MSG_RESULT(yes)
- AC_DEFINE(CXX_HAS_STD_ISNAN,[],[Define if has std::isnan]) ],
- [ AC_MSG_RESULT(no) ])
-
- dnl Done with the portability checks
- dnl AC_LANG_POP([C++])
- AC_LANG_RESTORE
-])
-
diff --git a/firmware/fx2/config/lf_warnings.m4 b/firmware/fx2/config/lf_warnings.m4
deleted file mode 100644
index d40c77f14..000000000
--- a/firmware/fx2/config/lf_warnings.m4
+++ /dev/null
@@ -1,121 +0,0 @@
-dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-
-# --------------------------------------------------------------------------
-# Check whether the C++ compiler accepts a certain flag
-# If it does it adds the flag to lf_CXXFLAGS
-# If it does not then it returns an error to lf_ok
-# Usage:
-# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...)
-# -------------------------------------------------------------------------
-
-AC_DEFUN([LF_CHECK_CXX_FLAG],[
- echo 'void f(){}' > conftest.cc
- for i in $1
- do
- AC_MSG_CHECKING([whether $CXX accepts $i])
- if test -z "`${CXX} $i -c conftest.cc 2>&1`"
- then
- lf_CXXFLAGS="${lf_CXXFLAGS} $i"
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- done
- rm -f conftest.cc conftest.o
- AC_SUBST(lf_CXXFLAGS)
-])
-
-# --------------------------------------------------------------------------
-# Check whether the C compiler accepts a certain flag
-# If it does it adds the flag to lf_CFLAGS
-# If it does not then it returns an error to lf_ok
-# Usage:
-# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...)
-# -------------------------------------------------------------------------
-
-AC_DEFUN([LF_CHECK_CC_FLAG],[
- echo 'void f(){}' > conftest.c
- for i in $1
- do
- AC_MSG_CHECKING([whether $CC accepts $i])
- if test -z "`${CC} $i -c conftest.c 2>&1`"
- then
- lf_CFLAGS="${lf_CFLAGS} $i"
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- done
- rm -f conftest.c conftest.o
- AC_SUBST(lf_CFLAGS)
-])
-
-# --------------------------------------------------------------------------
-# Check whether the Fortran compiler accepts a certain flag
-# If it does it adds the flag to lf_FFLAGS
-# If it does not then it returns an error to lf_ok
-# Usage:
-# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...)
-# -------------------------------------------------------------------------
-
-AC_DEFUN([LF_CHECK_F77_FLAG],[
- cat << EOF > conftest.f
-c....:++++++++++++++++++++++++
- PROGRAM MAIN
- PRINT*,'Hello World!'
- END
-EOF
- for i in $1
- do
- AC_MSG_CHECKING([whether $F77 accepts $i])
- if test -z "`${F77} $i -c conftest.f 2>&1`"
- then
- lf_FFLAGS="${lf_FFLAGS} $i"
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- done
- rm -f conftest.f conftest.o
- AC_SUBST(lf_FFLAGS)
-])
-
-# ----------------------------------------------------------------------
-# Enable compiler warnings.
-# Call this command AFTER you have configured ALL your compilers.
-# ----------------------------------------------------------------------
-
-AC_DEFUN([LF_SET_WARNINGS],[
- dnl Warnings for the two main compilers
- dnl add -Wextra when you're got time to fix a bunch of them ;-)
- cc_warning_flags="-Wall -Werror-implicit-function-declaration"
- cxx_warning_flags="-Wall -Woverloaded-virtual"
- if test -n "${CC}"
- then
- LF_CHECK_CC_FLAG($cc_warning_flags)
- fi
- if test -n "${CXX}"
- then
- LF_CHECK_CXX_FLAG($cxx_warning_flags)
- fi
-])
diff --git a/firmware/fx2/config/mkstemp.m4 b/firmware/fx2/config/mkstemp.m4
deleted file mode 100644
index 4af0f0a9b..000000000
--- a/firmware/fx2/config/mkstemp.m4
+++ /dev/null
@@ -1,89 +0,0 @@
-#serial 4
-
-# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
-# silly limit that it can create no more than 26 files from a given template.
-# Other systems lack mkstemp altogether.
-# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create
-# only 32 files per process.
-# On systems like the above, arrange to use the replacement function.
-AC_DEFUN([UTILS_FUNC_MKSTEMP],
-[dnl
- AC_REPLACE_FUNCS(mkstemp)
- if test $ac_cv_func_mkstemp = no; then
- utils_cv_func_mkstemp_limitations=yes
- else
- AC_CACHE_CHECK([for mkstemp limitations],
- utils_cv_func_mkstemp_limitations,
- [
- AC_TRY_RUN([
-# include <stdlib.h>
- int main ()
- {
- int i;
- for (i = 0; i < 70; i++)
- {
- char template[] = "conftestXXXXXX";
- int fd = mkstemp (template);
- if (fd == -1)
- exit (1);
- close (fd);
- }
- exit (0);
- }
- ],
- utils_cv_func_mkstemp_limitations=no,
- utils_cv_func_mkstemp_limitations=yes,
- utils_cv_func_mkstemp_limitations=yes
- )
- ]
- )
- fi
-
- if test $utils_cv_func_mkstemp_limitations = yes; then
- AC_LIBOBJ(mkstemp)
- AC_LIBOBJ(tempname)
- AC_DEFINE(mkstemp, rpl_mkstemp,
- [Define to rpl_mkstemp if the replacement function should be used.])
- gl_PREREQ_MKSTEMP
- jm_PREREQ_TEMPNAME
- fi
-])
-
-# Prerequisites of lib/mkstemp.c.
-AC_DEFUN([gl_PREREQ_MKSTEMP],
-[
- AH_BOTTOM(
- [
- #ifndef HAVE_MKSTEMP
- #ifdef __cplusplus
- extern "C" {
- #endif
- int rpl_mkstemp (char *templ);
- #ifdef __cplusplus
- }
- #endif
- #endif
- ])
-])
-
-# Prerequisites of lib/tempname.c.
-AC_DEFUN([jm_PREREQ_TEMPNAME],
-[
- AC_REQUIRE([AC_HEADER_STAT])
- AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h)
- AC_CHECK_HEADERS(stdint.h)
- AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat)
- AC_CHECK_DECLS_ONCE(getenv)
- # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
-
- dnl Under Win32, mkdir prototype in io.h has only one arg
- AC_MSG_CHECKING(whether mkdir accepts only one arg)
- AC_TRY_COMPILE([#include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>], [
- mkdir("")
- ], [ AC_MSG_RESULT(yes)
- AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ],
- [ AC_MSG_RESULT(no)
- ])
-])
diff --git a/firmware/fx2/config/onceonly.m4 b/firmware/fx2/config/onceonly.m4
deleted file mode 100644
index f6fec37cb..000000000
--- a/firmware/fx2/config/onceonly.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-# onceonly.m4 serial 3
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl This file defines some "once only" variants of standard autoconf macros.
-dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
-dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
-dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
-dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
-dnl The advantage is that the check for each of the headers/functions/decls
-dnl will be put only once into the 'configure' file. It keeps the size of
-dnl the 'configure' file down, and avoids redundant output when 'configure'
-dnl is run.
-dnl The drawback is that the checks cannot be conditionalized. If you write
-dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
-dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
-dnl empty, and the check will be inserted before the body of the AC_DEFUNed
-dnl function.
-
-dnl Autoconf version 2.57 or newer is recommended.
-AC_PREREQ(2.54)
-
-# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
-# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
-AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
- :
- AC_FOREACH([gl_HEADER_NAME], [$1], [
- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]),
- [-./], [___])), [
- AC_CHECK_HEADERS(gl_HEADER_NAME)
- ])
- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
- [-./], [___])))
- ])
-])
-
-# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
-# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
-AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
- :
- AC_FOREACH([gl_FUNC_NAME], [$1], [
- AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [
- AC_CHECK_FUNCS(defn([gl_FUNC_NAME]))
- ])
- AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]))
- ])
-])
-
-# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
-# AC_CHECK_DECLS(DECL1, DECL2, ...).
-AC_DEFUN([AC_CHECK_DECLS_ONCE], [
- :
- AC_FOREACH([gl_DECL_NAME], [$1], [
- AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [
- AC_CHECK_DECLS(defn([gl_DECL_NAME]))
- ])
- AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME]))
- ])
-])
diff --git a/firmware/fx2/config/pkg.m4 b/firmware/fx2/config/pkg.m4
deleted file mode 100644
index 2d4d96109..000000000
--- a/firmware/fx2/config/pkg.m4
+++ /dev/null
@@ -1,201 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-# Copyright © 2008 Free Software Foundation, Inc.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# 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.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.18])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
- m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
- $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
- if test -n "$$1"; then
- pkg_cv_[]$1="$$1"
- else
- PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
- [pkg_failed=yes])
- fi
-else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-# E.g.,
-# PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-# defines:
-#
-# GSTUFF_LIBS
-# GSTUFF_CFLAGS
-# GSTUFF_INCLUDEDIR
-# GSTUFF_CPPFLAGS # the -I, -D and -U's out of CFLAGS
-#
-# see pkg-config man page also defines GSTUFF_PKG_ERRORS on error
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],[
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_INCLUDEDIR], [includedir for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-
-if test x$cross_compiling = xyes
-then
- dnl _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2])
- _PKG_CONFIG([$1][_LIBS], [libs --static], [$2])
- dnl prune out any -L/lib or -L/usr/lib since they're pointing to the wrong filesystem root
- _pkg_tmp=
- for flag in [$]pkg_cv_[$1][_LIBS]; do
- case $flag in
- (-L/lib* | -L/usr/lib* ) ;; # ignore
- (*) _pkg_tmp="$_pkg_tmp $flag" ;;
- esac
- done
- pkg_cv_[$1][_LIBS]="$_pkg_tmp"
-else
- _PKG_CONFIG([$1][_LIBS], [libs --static], [$2])
-fi
-
-_PKG_CONFIG([$1][_INCLUDEDIR], [variable=includedir], [$2])
-
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
- ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
- [AC_MSG_RESULT([no])
- $4])
-elif test $pkg_failed = untried; then
- ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
- [$4])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- $1[]_INCLUDEDIR=$pkg_cv_[]$1[]_INCLUDEDIR
-
- $1[]_CPPFLAGS=""
- for flag in $$1[]_CFLAGS; do
- case $flag in
- -I* | -D* | -U*) $1[]_CPPFLAGS="$$1[]_CPPFLAGS $flag" ;;
- esac
- done
- pkg_cv_[]$1[]_CPPFLAGS=$$1[]_CPPFLAGS
- AC_SUBST($1[]_CPPFLAGS)
-
- AC_MSG_RESULT([yes])
- ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
diff --git a/firmware/fx2/config/usrp_sdcc.m4 b/firmware/fx2/config/usrp_sdcc.m4
deleted file mode 100644
index 86f6429e5..000000000
--- a/firmware/fx2/config/usrp_sdcc.m4
+++ /dev/null
@@ -1,75 +0,0 @@
-# Check for sdcc support. -*- Autoconf -*-
-
-# Copyright 2004 Free Software Foundation, Inc.
-
-# 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 3, 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, Boston, MA
-# 02110-1301, USA.
-
-AC_DEFUN([USRP_SDCC],
-[
- sdccok=yes
- AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no)
- AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no)
-
- if test "$XCC" = "no" -o "$XAS" = "no" ; then
- AC_MSG_RESULT([USRP requires sdcc. sdcc not found. See http://sdcc.sf.net])
- sdccok=no
- else
- sdcc_version_min=$1
-
- sdcc_version=`sdcc --version 2>&1 | \
- sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'`
-
- AC_MSG_CHECKING([sdcc_version "$sdcc_version"])
-
- sdcc_major_version=`echo $sdcc_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- sdcc_minor_version=`echo $sdcc_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- sdcc_micro_version=`echo $sdcc_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- sdcc_major_min=`echo $sdcc_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- sdcc_minor_min=`echo $sdcc_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- sdcc_micro_min=`echo $sdcc_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- sdcc_version_proper=`expr \
- "$sdcc_major_version" \> "$sdcc_major_min" \| \
- "$sdcc_major_version" \= "$sdcc_major_min" \& \
- "$sdcc_minor_version" \> "$sdcc_minor_min" \| \
- "$sdcc_major_version" \= "$sdcc_major_min" \& \
- "$sdcc_minor_version" \= "$sdcc_minor_min" \& \
- "$sdcc_micro_version" \>= "$sdcc_micro_min" `
-
- if test "$sdcc_version_proper" = "1" ; then
- AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version])
- else
- sdccok=no
- AC_MSG_RESULT([USRP requires sdcc >= $sdcc_version_min. sdcc not found. See http://sdcc.sf.net])
- fi
-
- AC_SUBST(XCC)
- AC_SUBST(XAS)
- fi
-
- if test $sdccok = yes; then
- ifelse([$2], , :, [$2])
- else
- ifelse([$3], , :, [$3])
- fi
-])
diff --git a/firmware/fx2/configure.ac b/firmware/fx2/configure.ac
deleted file mode 100644
index a4fa59c2e..000000000
--- a/firmware/fx2/configure.ac
+++ /dev/null
@@ -1,335 +0,0 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_INIT
-AC_PREREQ(2.57)
-AM_CONFIG_HEADER(config.h)
-
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
-
-dnl ustar required to have pathnames > 99 chars
-_AM_SET_OPTION([tar-ustar])
-AM_INIT_AUTOMAKE(gnuradio,$RELEASE)
-
-DEFINES=""
-AC_SUBST(DEFINES)
-
-dnl Remember if the user explicity set CFLAGS
-if test -n "${CFLAGS}"; then
- user_set_cflags=yes
-fi
-dnl Remember if the user explicity set CXXFLAGS
-if test -n "${CXXFLAGS}"; then
- user_set_cxxflags=yes
-fi
-
-
-LF_CONFIGURE_CC
-LF_CONFIGURE_CXX
-GR_LIB64 dnl check for lib64 suffix after choosing compilers
-
-
-dnl The three macros above are known to override CFLAGS if the user
-dnl didn't specify them. Though I'm sure somebody thought this was
-dnl a good idea, it makes it hard to use other than -g -O2 when compiling
-dnl selected files. Thus we "undo" the damage here...
-dnl
-dnl If the user specified CFLAGS, we use them.
-dnl See Makefile.common for the rest of the magic.
-if test "$user_set_cflags" != yes; then
- autoconf_default_CFLAGS="$CFLAGS"
- CFLAGS=""
-fi
-AC_SUBST(autoconf_default_CFLAGS)
-
-
-dnl The three macros above are known to override CXXFLAGS if the user
-dnl didn't specify them. Though I'm sure somebody thought this was
-dnl a good idea, it makes it hard to use other than -g -O2 when compiling
-dnl selected files. Thus we "undo" the damage here...
-dnl
-dnl If the user specified CXXFLAGS, we use them. Otherwise when compiling
-dnl the output of swig use use -O1 if we're using g++.
-dnl See Makefile.common for the rest of the magic.
-if test "$user_set_cxxflags" != yes; then
- autoconf_default_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS=""
- if test "$GXX" = yes; then
- case "$host_cpu" in
- powerpc*)
- dnl "-O1" is broken on the PPC for some reason
- dnl (at least as of g++ 4.1.1)
- swig_CXXFLAGS="-g1 -O2 -Wno-strict-aliasing -Wno-parentheses"
- ;;
- *)
- swig_CXXFLAGS="-g -O1 -Wno-strict-aliasing -Wno-parentheses"
- ;;
- esac
- fi
-fi
-AC_SUBST(autoconf_default_CXXFLAGS)
-AC_SUBST(swig_CXXFLAGS)
-
-dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
-if test x${PKG_CONFIG_PATH} = x; then
- PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
-else
- PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
-fi
-export PKG_CONFIG_PATH
-
-LF_SET_WARNINGS
-AM_PROG_AS
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
-
-# AC_PROG_MKDIR_P
-# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
-# Remove this macro when we can assume autoconf >= 2.60.
-m4_ifdef([AC_PROG_MKDIR_P], [], [
- AC_DEFUN([AC_PROG_MKDIR_P],
- [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
- MKDIR_P='$(mkdir_p)'
- AC_SUBST([MKDIR_P])])
-])
-AC_PROG_MKDIR_P
-
-AC_PATH_PROG([RM_PROG], [rm])
-
-AC_LIBTOOL_WIN32_DLL
-dnl AC_DISABLE_SHARED dnl don't build shared libraries
-AC_ENABLE_SHARED dnl do build shared libraries
-AC_DISABLE_STATIC dnl don't build static libraries
-m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
-dnl GR_FORTRAN
-
-GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
-GR_SCRIPTING
-
-
-AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes])
-
-dnl Checks for libraries.
-AC_CHECK_LIB(socket,socket)
-
-dnl Set the c++ compiler that we use for the build system when cross compiling
-if test x$CXX_FOR_BUILD = x
-then
- if test x$cross_compiling = xno; then
- CXX_FOR_BUILD=${CXX}
- else
- CXX_FOR_BUILD=g++
- fi
-fi
-AC_SUBST(CXX_FOR_BUILD)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h limits.h strings.h time.h sys/ioctl.h sys/time.h unistd.h)
-AC_CHECK_HEADERS(linux/ppdev.h dev/ppbus/ppi.h sys/mman.h sys/select.h sys/types.h)
-AC_CHECK_HEADERS(sys/resource.h stdint.h sched.h signal.h sys/syscall.h malloc.h)
-AC_CHECK_HEADERS(windows.h)
-AC_CHECK_HEADERS(vec_types.h)
-AC_CHECK_HEADERS(netdb.h netinet/in.h arpa/inet.h sys/types.h sys/socket.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_C_BIGENDIAN([GR_ARCH_BIGENDIAN=1],[GR_ARCH_BIGENDIAN=0])
-AC_SUBST(GR_ARCH_BIGENDIAN)
-AC_STRUCT_TM
-
-dnl Checks for library functions.
-AC_FUNC_ALLOCA
-AC_FUNC_SETVBUF_REVERSED
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([mmap select socket strcspn strerror strspn getpagesize sysconf])
-AC_CHECK_FUNCS([snprintf gettimeofday nanosleep sched_setscheduler])
-AC_CHECK_FUNCS([modf sqrt sigaction sigprocmask pthread_sigmask])
-AC_CHECK_FUNCS([sched_setaffinity])
-
-AC_CHECK_LIB(m, sincos, [AC_DEFINE([HAVE_SINCOS],[1],[Define to 1 if your system has `sincos'.])])
-AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your system has `sincosf'.])])
-AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system has `sinf'.])])
-AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system has `cosf'.])])
-AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your system has `trunc'.])])
-AC_CHECK_LIB(m, exp10, [AC_DEFINE([HAVE_EXP10],[1],[Define to 1 if your system has 'exp10'.])])
-AC_CHECK_LIB(m, log2, [AC_DEFINE([HAVE_LOG2],[1],[Define to 1 if your system has 'log2'.])])
-#AC_FUNC_MKTIME
-
-AH_BOTTOM([
-#ifndef HAVE_TRUNC
-#include <math.h>
-inline static double trunc(double x)
-{
- return x >= 0 ? floor(x) : ceil(x);
-}
-#endif
-
-#ifndef HAVE_EXP10
-#include <math.h>
-inline static double exp10(double x)
-{
- return pow(10.0, x);
-}
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#define NOMINMAX
-#endif
-])
-
-dnl Do we have "dot", part of the graphviz package from AT&T?
-dnl Doxgen will use it to draw pretty diagrams ;-)
-AC_CHECK_PROG(HAVE_DOT, [dot],[YES],[NO])
-
-PKG_CHECK_MODULES(FFTW3F, fftw3f >= 3.0)
-AC_SUBST(FFTW3F_LIBS)
-
-dnl Define where to look for cppunit includes and libs
-dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS
-dnl Try using pkg-config first, then fall back to cppunit-config.
-PKG_CHECK_EXISTS(cppunit,
- [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)],
- [AM_PATH_CPPUNIT([1.9.14],[],
- [AC_MSG_ERROR([GNU Radio requires cppunit. Stop])])])
-
-CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS
-AC_SUBST(CPPUNIT_INCLUDES)
-
-dnl see if GUILE is installed
-AC_PATH_PROG(GUILE,guile)
-
-
-BUILD_DATE=`date -R -u`
-AC_SUBST(BUILD_DATE)
-
-dnl SYSCONFDIR substitution
-if test "${sysconfdir}" == "\${prefix}/etc" ; then
- if test "${prefix}" == "NONE" ; then
- SYSCONFDIR=["$ac_default_prefix/etc"]
- else
- SYSCONFDIR=["${prefix}/etc"]
- fi
-else
- SYSCONFDIR=[${sysconfdir}]
-fi
-AC_SUBST(SYSCONFDIR)
-
-dnl System configuration files
-GR_PREFSDIR=[$SYSCONFDIR/${PACKAGE}/conf.d]
-AC_SUBST(GR_PREFSDIR)
-
-dnl Component specific configuration
-dnl The order of the GR_ macros determines the order of compilation
-dnl For -any- checks on $enable_all_components
-dnl use the following guidelines:
-dnl yes : --enable-all-components was specified, so error out if any
-dnl components do not pass configuration checks.
-dnl no : --disable-all-components was specified, so try to build the
-dnl --enable'd components, and error out if any do not pass
-dnl configuration checks.
-dnl "" : this option was not specified on the command line; try to
-dnl build all components that are not --with'd, but don't
-dnl error out if any component does not pass configuration checks.
-dnl
-dnl For each --enable-foo component, if that flag is not specified on
-dnl the command line, the related variable $enable_foo will be set to
-dnl $enable_all_components .
-
-AC_ARG_ENABLE(
- [all-components],
- [ --enable-all-components Build all configurable components (default), or stop on failed dependencies]
-)
-
-build_dirs="config"
-GRC_FX2
-
-# Each component is now either to be built, was skipped, will be
-# included from pre-installed libraries and includes, or failed
-# dependencies.
-AC_SUBST([build_dirs], [$build_dirs])
-AC_SUBST([skipped_dirs], [$skipped_dirs])
-AC_SUBST([with_dirs], [$with_dirs])
-
-# fix for older autotools that don't define these by default
-AC_SUBST(abs_top_srcdir)
-AC_SUBST(abs_top_builddir)
-AC_SUBST(MKDIR_P)
-
-# 'with' variables - the pre-installed libraries, includes, and paths
-# - must always come last in the lists, so they require special
-# treatment.
-AC_SUBST(with_INCLUDES)
-AC_SUBST(with_PYDIRPATH)
-AC_SUBST(with_LIBDIRPATH)
-
-# Local files tweaked by AC
-AC_CONFIG_FILES([\
- Makefile \
- config/Makefile \
-])
-
-AC_OUTPUT
-
-echo
-echo "*********************************************************************"
-echo The following GNU Radio components have been successfully configured:
-echo
-for dir in $build_dirs
-do
- echo $dir
-done
-echo
-echo You my now run the 'make' command to build these components.
-echo
-if test "$skipped_dirs" != ""; then
- echo "*********************************************************************"
- echo The following components were skipped either because you asked not
- echo to build them or they didn\'t pass configuration checks:
- echo
- for dir in $skipped_dirs
- do
- echo $dir
- done
- echo
- echo These components will not be built.
- echo
-fi
-if test "$with_dirs" != ""; then
- echo "*********************************************************************"
- echo The following components will be included from pre-installed
- echo libraries and includes:
- echo
- for dir in $with_dirs
- do
- echo $dir
- done
- echo
- echo These components will not be built.
- echo
-fi
-
-echo Configured GNU Radio release $RELEASE for build.
diff --git a/firmware/fx2/include b/firmware/fx2/include
new file mode 120000
index 000000000..d66298e12
--- /dev/null
+++ b/firmware/fx2/include
@@ -0,0 +1 @@
+common \ No newline at end of file
diff --git a/firmware/fx2/include/.gitignore b/firmware/fx2/include/.gitignore
deleted file mode 100644
index 75bb241c8..000000000
--- a/firmware/fx2/include/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-/Makefile
-/Makefile.in
-/aclocal.m4
-/configure
-/config.h.in
-/stamp-h.in
-/libtool
-/config.log
-/config.h
-/config.cache
-/config.status
-/missing
-/stamp-h
-/stamp-h1
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/autom4te.cache
-/*.cache
-/missing
-/make.log
-/usrp.pc
diff --git a/firmware/fx2/include/Makefile.am b/firmware/fx2/include/Makefile.am
deleted file mode 100644
index e17726c07..000000000
--- a/firmware/fx2/include/Makefile.am
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright 2003 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-usrpincludedir = $(includedir)/usrp
-
-usrpinclude_HEADERS = \
- usrp_i2c_addr.h \
- usrp_spi_defs.h \
- fpga_regs_common.h \
- fpga_regs_standard.h
-
-
-noinst_HEADERS = \
- delay.h \
- fpga_regs_common.v \
- fpga_regs_standard.v \
- fpga_regs0.h \
- fx2regs.h \
- fx2utils.h \
- i2c.h \
- isr.h \
- syncdelay.h \
- timer.h \
- usb_common.h \
- usb_descriptors.h \
- usb_requests.h \
- usrp_commands.h \
- usrp_config.h \
- usrp_ids.h \
- usrp_interfaces.h
-
-
-CODE_GENERATOR = \
- generate_regs.py
-
-EXTRA_DIST = \
- $(CODE_GENERATOR)
-
-fpga_regs_common.v: fpga_regs_common.h generate_regs.py
- PYTHONPATH=$(top_srcdir)/usrp/firmware/include $(PYTHON) $(srcdir)/generate_regs.py $(srcdir)/fpga_regs_common.h $@
-
-fpga_regs_standard.v: fpga_regs_standard.h generate_regs.py
- PYTHONPATH=$(top_srcdir)/usrp/firmware/include $(PYTHON) $(srcdir)/generate_regs.py $(srcdir)/fpga_regs_standard.h $@
diff --git a/firmware/fx2/lib/Makefile.am b/firmware/fx2/lib/Makefile.am
deleted file mode 100644
index f9e1b2317..000000000
--- a/firmware/fx2/lib/Makefile.am
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright 2003 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-EXTRA_DIST = \
- delay.c \
- fx2utils.c \
- i2c.c \
- isr.c \
- timer.c \
- usb_common.c
-
-
-
-DEFINES=
-FW_INCLUDES=-I$(top_srcdir)/include
-
-# with EA = 0, the FX2 implements a portion of the 8051 "external memory"
-# on chip. This memory is mapped like this:
-#
-# The bottom 8K of memory (0x0000 - 0x1fff) is used for both data and
-# code accesses. There's also 512 bytes for data only from 0xe000 - 0xe1ff.
-#
-# We tell the linker to start the xdata segment at 0x1800, 6K up from
-# the bottom.
-
-LINKOPTS = --code-loc 0x0000 --code-size 0x1800 --xram-loc 0x1800 --xram-size 0x0800
-
-LIBRARY = libfx2.lib
-
-LIBOBJS = \
- delay.rel \
- fx2utils.rel \
- i2c.rel \
- isr.rel \
- timer.rel \
- usb_common.rel
-
-
-
-all: libfx2.lib
-
-.c.rel:
- $(XCC) $(FW_INCLUDES) $(DEFINES) -c $< -o $@
-
-$(LIBRARY): $(LIBOBJS)
- -rm -f $(LIBRARY)
- touch $(LIBRARY)
- for obj in $(LIBOBJS); do basename $$obj .rel >> $(LIBRARY) ; done
-
-
-CLEANFILES = \
- *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib
-
-DISTCLEANFILES = \
- *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib
-
-install: all
-
-
-# dependencies
-
diff --git a/firmware/fx2/lib/i2c-compiler-bug.c b/firmware/fx2/lib/i2c-compiler-bug.c
deleted file mode 100644
index 360b779bc..000000000
--- a/firmware/fx2/lib/i2c-compiler-bug.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio 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 3, or (at your option)
- * any later version.
- *
- * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "i2c.h"
-#include "fx2regs.h"
-#include <string.h>
-
-
-// issue a stop bus cycle and wait for completion
-
-
-// returns non-zero if successful, else 0
-unsigned char
-i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len)
-{
- volatile unsigned char junk;
-
- if (len == 0) // reading zero bytes always works
- return 1;
-
- // memset (buf, 0, len); // FIXME, remove
-
- while (I2CS & bmSTOP) // wait for stop to clear
- ;
-
-
- I2CS = bmSTART;
- I2DAT = (addr << 1) | 1; // write address and direction (1's the read bit)
-
- while ((I2CS & bmDONE) == 0)
- ;
-
- if ((I2CS & bmBERR) || (I2CS & bmACK) == 0) // no device answered...
- goto fail;
-
- if (len == 1)
- I2CS |= bmLASTRD;
-
- junk = I2DAT; // trigger the first read cycle
-
-#if 1
- while (len != 1){
- while ((I2CS & bmDONE) == 0)
- ;
-
- if (I2CS & bmBERR)
- goto fail;
-
- len--;
- if (len == 1)
- I2CS |= bmLASTRD;
-
- *buf++ = I2DAT; // get data, trigger another read
- }
-#endif
-
- // wait for final byte
-
- while ((I2CS & bmDONE) == 0)
- ;
-
- if (I2CS & bmBERR)
- goto fail;
-
- I2CS |= bmSTOP;
- *buf = I2DAT;
-
- return 1;
-
- fail:
- I2CS |= bmSTOP;
- return 0;
-}
-
-
-
-// returns non-zero if successful, else 0
-unsigned char
-i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len)
-{
- while (I2CS & bmSTOP) // wait for stop to clear
- ;
-
- I2CS = bmSTART;
- I2DAT = (addr << 1) | 0; // write address and direction (0's the write bit)
-
- while ((I2CS & bmDONE) == 0)
- ;
-
- if ((I2CS & bmBERR) || (I2CS & bmACK) == 0) // no device answered...
- goto fail;
-
- while (len > 0){
- I2DAT = *buf++;
- len--;
-
- while ((I2CS & bmDONE) == 0)
- ;
-
- if ((I2CS & bmBERR) || (I2CS & bmACK) == 0) // no device answered...
- goto fail;
- }
-
- I2CS |= bmSTOP;
- return 1;
-
- fail:
- I2CS |= bmSTOP;
- return 0;
-}
diff --git a/firmware/fx2/src/.gitignore b/firmware/fx2/src/.gitignore
deleted file mode 100644
index d46c52c00..000000000
--- a/firmware/fx2/src/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-/*.ihx
-/*.lnk
-/*.lst
-/*.map
-/*.mem
-/*.rel
-/*.rst
-/*.sym
-/blink_leds.asm
-/usrp_common.asm
-/command_loop.asm
-/fpga.asm
-/*.asm
-/usrp_gpif.c
-/usrp_gpif_inline.h
-/Makefile
-/Makefile.in
diff --git a/firmware/fx2/src/Makefile.am b/firmware/fx2/src/Makefile.am
deleted file mode 100644
index 5dcff2c85..000000000
--- a/firmware/fx2/src/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright 2004 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-SUBDIRS = common usrp1
diff --git a/firmware/fx2/src/common/.gitignore b/firmware/fx2/src/common/.gitignore
deleted file mode 100644
index d46c52c00..000000000
--- a/firmware/fx2/src/common/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-/*.ihx
-/*.lnk
-/*.lst
-/*.map
-/*.mem
-/*.rel
-/*.rst
-/*.sym
-/blink_leds.asm
-/usrp_common.asm
-/command_loop.asm
-/fpga.asm
-/*.asm
-/usrp_gpif.c
-/usrp_gpif_inline.h
-/Makefile
-/Makefile.in
diff --git a/firmware/fx2/src/common/Makefile.am b/firmware/fx2/src/common/Makefile.am
deleted file mode 100644
index 95232324d..000000000
--- a/firmware/fx2/src/common/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright 2004 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-EXTRA_DIST = \
- _startup.a51 \
- blink_leds.c \
- check_mdelay.c \
- check_udelay.c \
- edit-gpif \
- fpga.h \
- fpga_load.h \
- fpga_load.c \
- gpif.c \
- gpif.gpf \
- init_gpif.c \
- usrp_common.c \
- usrp_globals.h \
- vectors.a51 \
- build_eeprom.py
-
-all: usrp_gpif.c
-
-usrp_gpif.c usrp_gpif_inline.h : gpif.c
- srcdir=$(srcdir) $(PYTHON) $(srcdir)/edit-gpif $(srcdir)/gpif.c usrp_gpif.c usrp_gpif_inline.h
-
-CLEANFILES = \
- *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib \
- usrp_gpif.c usrp_gpif_inline.h
-
-DISTCLEANFILES = \
- *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib \
- usrp_gpif.c usrp_gpif_inline.h
diff --git a/firmware/fx2/src/common/blink_leds.c b/firmware/fx2/src/common/blink_leds.c
deleted file mode 100644
index 255c69733..000000000
--- a/firmware/fx2/src/common/blink_leds.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * USRP - Universal Software Radio Peripheral
- *
- * Copyright (C) 2003 Free Software Foundation, Inc.
- *
- * 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 3 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, Boston, MA 02110-1301 USA
- */
-
-#include "usrp_common.h"
-
-void
-main (void)
-{
- unsigned short counter = 0;
-
- init_usrp ();
-
- while (1){
- unsigned char counter_high = counter >> 8;
- set_led_0 (counter_high & 0x40);
- set_led_1 (counter_high & 0x80);
- counter++;
- }
-}
diff --git a/firmware/fx2/src/common/check_mdelay.c b/firmware/fx2/src/common/check_mdelay.c
deleted file mode 100644
index de1af47f6..000000000
--- a/firmware/fx2/src/common/check_mdelay.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * USRP - Universal Software Radio Peripheral
- *
- * Copyright (C) 2003 Free Software Foundation, Inc.
- *
- * 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 3 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, Boston, MA 02110-1301 USA
- */
-
-#include "usrp_common.h"
-#include "delay.h"
-
-void
-main (void)
-{
- init_usrp ();
-
- // CPUCS = 0; // 12 MHz
- // CPUCS = bmCLKSPD0; // 24 MHz
- CPUCS = bmCLKSPD1; // 48 MHz
-
- while (1){
- USRP_LED_REG ^= bmLED0;
- mdelay (10);
- }
-}
diff --git a/firmware/fx2/src/common/check_udelay.c b/firmware/fx2/src/common/check_udelay.c
deleted file mode 100644
index 46885a067..000000000
--- a/firmware/fx2/src/common/check_udelay.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * USRP - Universal Software Radio Peripheral
- *
- * Copyright (C) 2003 Free Software Foundation, Inc.
- *
- * 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 3 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, Boston, MA 02110-1301 USA
- */
-
-#include "usrp_common.h"
-#include "delay.h"
-
-void
-main (void)
-{
- init_usrp ();
-
- // CPUCS = 0; // 12 MHz
- // CPUCS = bmCLKSPD0; // 24 MHz
- CPUCS = bmCLKSPD1; // 48 MHz
-
- while (1){
- USRP_LED_REG ^= bmLED0;
- udelay (250);
- }
-}
diff --git a/firmware/fx2/src/common/gpif.c b/firmware/fx2/src/common/gpif.c
deleted file mode 100755
index 489e6e81a..000000000
--- a/firmware/fx2/src/common/gpif.c
+++ /dev/null
@@ -1,292 +0,0 @@
-// This program configures the General Programmable Interface (GPIF) for FX2.
-// Please do not modify sections of text which are marked as "DO NOT EDIT ...".
-//
-// DO NOT EDIT ...
-// GPIF Initialization
-// Interface Timing Async
-// Internal Ready Init IntRdy=1
-// CTL Out Tristate-able Binary
-// SingleWrite WF Select 1
-// SingleRead WF Select 0
-// FifoWrite WF Select 3
-// FifoRead WF Select 2
-// Data Bus Idle Drive Tristate
-// END DO NOT EDIT
-
-// DO NOT EDIT ...
-// GPIF Wave Names
-// Wave 0 = singlerd
-// Wave 1 = singlewr
-// Wave 2 = FIFORd
-// Wave 3 = FIFOWr
-
-// GPIF Ctrl Outputs Level
-// CTL 0 = WEN# CMOS
-// CTL 1 = REN# CMOS
-// CTL 2 = OE# CMOS
-// CTL 3 = CLRST CMOS
-// CTL 4 = unused CMOS
-// CTL 5 = BOGUS CMOS
-
-// GPIF Rdy Inputs
-// RDY0 = EF#
-// RDY1 = FF#
-// RDY2 = unused
-// RDY3 = unused
-// RDY4 = unused
-// RDY5 = TCXpire
-// FIFOFlag = FIFOFlag
-// IntReady = IntReady
-// END DO NOT EDIT
-// DO NOT EDIT ...
-//
-// GPIF Waveform 0: singlerd
-//
-// Interval 0 1 2 3 4 5 6 Idle (7)
-// _________ _________ _________ _________ _________ _________ _________ _________
-//
-// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
-// DataMode NO Data NO Data NO Data NO Data NO Data NO Data NO Data
-// NextData SameData SameData SameData SameData SameData SameData SameData
-// Int Trig No Int No Int No Int No Int No Int No Int No Int
-// IF/Wait Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
-// Term A
-// LFunc
-// Term B
-// Branch1
-// Branch0
-// Re-Exec
-// Sngl/CRC Default Default Default Default Default Default Default
-// WEN# 0 0 0 0 0 0 0 0
-// REN# 0 0 0 0 0 0 0 0
-// OE# 0 0 0 0 0 0 0 0
-// CLRST 0 0 0 0 0 0 0 0
-// unused 0 0 0 0 0 0 0 0
-// BOGUS 0 0 0 0 0 0 0 0
-//
-// END DO NOT EDIT
-// DO NOT EDIT ...
-//
-// GPIF Waveform 1: singlewr
-//
-// Interval 0 1 2 3 4 5 6 Idle (7)
-// _________ _________ _________ _________ _________ _________ _________ _________
-//
-// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
-// DataMode Activate Activate Activate Activate Activate Activate Activate
-// NextData SameData SameData SameData SameData SameData SameData SameData
-// Int Trig No Int No Int No Int No Int No Int No Int No Int
-// IF/Wait Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
-// Term A EF#
-// LFunc AND
-// Term B EF#
-// Branch1 ThenIdle
-// Branch0 ElseIdle
-// Re-Exec No
-// Sngl/CRC Default Default Default Default Default Default Default
-// WEN# 0 1 1 1 1 1 1 0
-// REN# 0 0 0 0 0 0 0 0
-// OE# 0 0 0 0 0 0 0 0
-// CLRST 0 0 0 0 0 0 0 0
-// unused 0 0 0 0 0 0 0 0
-// BOGUS 0 0 0 0 0 0 0 0
-//
-// END DO NOT EDIT
-// DO NOT EDIT ...
-//
-// GPIF Waveform 2: FIFORd
-//
-// Interval 0 1 2 3 4 5 6 Idle (7)
-// _________ _________ _________ _________ _________ _________ _________ _________
-//
-// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
-// DataMode NO Data Activate NO Data NO Data NO Data NO Data NO Data
-// NextData SameData SameData SameData SameData SameData SameData SameData
-// Int Trig No Int No Int No Int No Int No Int No Int No Int
-// IF/Wait Wait 1 IF Wait 1 IF Wait 1 Wait 1 Wait 1
-// Term A TCXpire TCXpire
-// LFunc AND AND
-// Term B TCXpire TCXpire
-// Branch1 Then 2 ThenIdle
-// Branch0 Else 1 ElseIdle
-// Re-Exec No No
-// Sngl/CRC Default Default Default Default Default Default Default
-// WEN# 0 0 0 0 0 0 0 0
-// REN# 0 0 0 0 0 0 0 0
-// OE# 1 1 1 0 0 0 0 0
-// CLRST 0 0 0 0 0 0 0 0
-// unused 0 0 0 0 0 0 0 0
-// BOGUS 0 0 0 0 0 0 0 0
-//
-// END DO NOT EDIT
-// DO NOT EDIT ...
-//
-// GPIF Waveform 3: FIFOWr
-//
-// Interval 0 1 2 3 4 5 6 Idle (7)
-// _________ _________ _________ _________ _________ _________ _________ _________
-//
-// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
-// DataMode NO Data Activate Activate Activate Activate Activate Activate
-// NextData SameData SameData SameData SameData SameData SameData SameData
-// Int Trig No Int No Int No Int No Int No Int No Int No Int
-// IF/Wait Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
-// Term A TCXpire
-// LFunc AND
-// Term B TCXpire
-// Branch1 ThenIdle
-// Branch0 Else 1
-// Re-Exec No
-// Sngl/CRC Default Default Default Default Default Default Default
-// WEN# 0 0 0 0 0 0 0 0
-// REN# 0 0 0 0 0 0 0 0
-// OE# 0 0 0 0 0 0 0 0
-// CLRST 0 0 0 0 0 0 0 0
-// unused 0 0 0 0 0 0 0 0
-// BOGUS 0 0 0 0 0 0 0 0
-//
-// END DO NOT EDIT
-
-// GPIF Program Code
-
-// DO NOT EDIT ...
-#include "fx2.h"
-#include "fx2regs.h"
-#include "fx2sdly.h" // SYNCDELAY macro
-// END DO NOT EDIT
-
-// DO NOT EDIT ...
-const char xdata WaveData[128] =
-{
-// Wave 0
-/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
-/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-/* Output*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
-// Wave 1
-/* LenBr */ 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
-/* Opcode*/ 0x22, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
-/* Output*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
-/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
-// Wave 2
-/* LenBr */ 0x01, 0x11, 0x01, 0x3F, 0x01, 0x01, 0x01, 0x07,
-/* Opcode*/ 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-/* Output*/ 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-/* LFun */ 0x00, 0x2D, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x3F,
-// Wave 3
-/* LenBr */ 0x01, 0x39, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
-/* Opcode*/ 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
-/* Output*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-/* LFun */ 0x00, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
-};
-// END DO NOT EDIT
-
-// DO NOT EDIT ...
-const char xdata FlowStates[36] =
-{
-/* Wave 0 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/* Wave 1 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-/* Wave 2 FlowStates */ 0x81,0x2D,0x26,0x00,0x04,0x04,0x03,0x02,0x00,
-/* Wave 3 FlowStates */ 0x81,0x2D,0x21,0x00,0x04,0x04,0x03,0x02,0x00,
-};
-// END DO NOT EDIT
-
-// DO NOT EDIT ...
-const char xdata InitData[7] =
-{
-/* Regs */ 0xA0,0x00,0x00,0x00,0xEE,0x4E,0x00
-};
-// END DO NOT EDIT
-
-// TO DO: You may add additional code below.
-
-void GpifInit( void )
-{
- 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.
-
- IFCONFIG = 0xEE;
- // 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
-
- 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( &WaveData );
- AUTOPTRL1 = LSB( &WaveData );
-
- // destination
- AUTOPTRH2 = 0xE4;
- AUTOPTRL2 = 0x00;
-
- // transfer
- for ( i = 0x00; i < 128; i++ )
- {
- EXTAUTODAT2 = EXTAUTODAT1;
- }
-
-// Configure GPIF Address pins, output initial value,
- 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
-
-// Configure GPIF FlowStates registers for Wave 0 of WaveData
- FLOWSTATE = FlowStates[ 0 ];
- FLOWLOGIC = FlowStates[ 1 ];
- FLOWEQ0CTL = FlowStates[ 2 ];
- FLOWEQ1CTL = FlowStates[ 3 ];
- FLOWHOLDOFF = FlowStates[ 4 ];
- FLOWSTB = FlowStates[ 5 ];
- FLOWSTBEDGE = FlowStates[ 6 ];
- FLOWSTBHPERIOD = FlowStates[ 7 ];
-}
-
diff --git a/firmware/fx2/src/common/gpif.gpf b/firmware/fx2/src/common/gpif.gpf
deleted file mode 100755
index a954ac193..000000000
--- a/firmware/fx2/src/common/gpif.gpf
+++ /dev/null
Binary files differ
diff --git a/firmware/fx2/src/usrp1/.gitignore b/firmware/fx2/src/usrp1/.gitignore
deleted file mode 100644
index 54a9e9415..000000000
--- a/firmware/fx2/src/usrp1/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-/*.ihx
-/*.lnk
-/*.lst
-/*.map
-/*.mem
-/*.rel
-/*.rst
-/*.sym
-/blink_leds.asm
-/usrp_common.asm
-/command_loop.asm
-/fpga.asm
-/*.asm
-/Makefile
-/Makefile.in
-/usrp_gpif.c
-/usrp_gpif_inline.h
-/Makefile.in
-/burn-usrp2-eeprom
-/burn-usrp4-eeprom
diff --git a/firmware/fx2/src/usrp1/Makefile.am b/firmware/fx2/src/usrp1/Makefile.am
deleted file mode 100644
index a964f9198..000000000
--- a/firmware/fx2/src/usrp1/Makefile.am
+++ /dev/null
@@ -1,141 +0,0 @@
-#
-# Copyright 2003,2006 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-#firmwaredir = $(prefix)/share/uhd/images
-#firmware_DATA = usrp1_fw.ihx
-
-#eepromdir = $(firmwaredir)
-#eepromfile = eeprom_boot.ihx
-#eeprom_DATA = usrp1_eeprom.bin
-
-EXTRA_DIST = \
- edit-gpif \
- _startup.a51 \
- blink_leds.c \
- board_specific.c \
- check_mdelay.c \
- check_udelay.c \
- eeprom_boot.a51 \
- eeprom_init.c \
- eeprom_io.c \
- eeprom_io.h \
- fpga_load.c \
- fpga_rev2.c \
- fpga_rev2.h \
- gpif.c \
- init_gpif.c \
- spi.c \
- spi.h \
- usb_descriptors.a51 \
- usrp_common.c \
- usrp_common.h \
- usrp_gpif.c \
- usrp_main.c \
- usrp_rev2_regs.h \
- vectors.a51
-
-
-DEFINES=-DHAVE_USRP2
-FW_INCLUDES=-I$(top_srcdir)/include \
- -I$(top_srcdir)/src/usrp1 \
- -I$(top_srcdir)/src/common \
- -I$(top_builddir)/src/common
-
-# with EA = 0, the FX2 implements a portion of the 8051 "external memory"
-# on chip. This memory is mapped like this:
-#
-# The bottom 8K of memory (0x0000 - 0x1fff) is used for both data and
-# code accesses. There's also 512 bytes for data only from 0xe000 - 0xe1ff.
-#
-# We tell the linker to start the xdata segment at 0x1800, 6K up from
-# the bottom.
-
-MEMOPTS = --code-loc 0x0000 --code-size 0x1800 --xram-loc 0x1800 --xram-size 0x0800 \
- -Wl '-b USBDESCSEG = 0xE000'
-
-LIBOPTS = -L ../../lib libfx2.lib
-LIBDEP = ../../lib/libfx2.lib
-
-LINKOPTS = $(MEMOPTS) $(LIBOPTS)
-
-EXECUTABLES = \
- std.ihx \
- blink_leds.ihx \
- check_mdelay.ihx \
- check_udelay.ihx \
- eeprom_boot.ihx
-
-STARTUP = _startup.rel
-
-.c.rel:
- $(XCC) $(FW_INCLUDES) $(DEFINES) \
- -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
-.a51.rel:
- test -f `basename '$<'` || $(LN_S) '$<' .
- test -f ../common/`basename '$<'` -o \
- \! -f `dirname '$<'`/../common/`basename '$<'` \
- || $(LN_S) `dirname '$<'`/../common/`basename '$<'` ../common/`basename '$<'`
- $(XAS) `basename '$<'`
-
-
-EEPROM_BOOT_OBJS = eeprom_boot.rel eeprom_init.rel $(STARTUP)
-
-eeprom_boot.ihx: $(EEPROM_BOOT_OBJS) $(LIBDEP)
- $(XCC) $(LINKOPTS) -o $@ $(EEPROM_BOOT_OBJS)
-
-usrp1_eeprom.bin: eeprom_boot.bin
- $(PYTHON) ../common/build_eeprom.py -r4 $< $@
-
-eeprom_boot.bin: eeprom_boot.ihx
- objcopy -I ihex -O binary $< $@
-
-USRP_OBJS = \
- vectors.rel \
- usrp_main.rel usrp_common.rel board_specific.rel \
- fpga_load.rel fpga_rev2.rel init_gpif.rel usrp_gpif.rel \
- usb_descriptors.rel spi.rel eeprom_io.rel $(STARTUP)
-
-std.ihx: $(USRP_OBJS) $(LIBDEP)
- $(XCC) $(LINKOPTS) -o $@ $(USRP_OBJS)
-
-CLEANFILES = \
- *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib *.bin \
- usrp_gpif.c usrp_gpif_inline.h
-
-DISTCLEANFILES = \
- *.ihx *.lnk *.lst *.map *.mem *.rel *.rst *.sym *.asm *.lib *.bin
-
-# build gpif stuff
-
-all: usrp_gpif.c std.ihx usrp1_eeprom.bin
-
-usrp_gpif.c usrp_gpif_inline.h : gpif.c
- srcdir=$(srcdir) $(PYTHON) $(srcdir)/edit-gpif $(srcdir)/gpif.c usrp_gpif.c usrp_gpif_inline.h
-
-# dependencies
-
-usrp_main.rel: usrp_gpif_inline.h
-
-#usrp_main.rel: fpga.h usrp_common.h ../../include/usrp_commands.h usrp_gpif_inline.h ../../include/usrp_config.h usrp_rev2_regs.h ../../include/fx2regs.h
-#usrp_common.rel: usrp_common.h ../../include/usrp_commands.h ../../include/usrp_config.h usrp_rev2_regs.h ../../include/fx2regs.h
-#fpga.rel: usrp_common.h ../../include/usrp_commands.h fpga.h ../../include/usrp_config.h usrp_rev2_regs.h ../../include/fx2regs.h
-#init_gpif.rel: usrp_common.h ../../include/usrp_config.h usrp_rev2_regs.h ../../include/fx2regs.h
diff --git a/firmware/fx2/src/usrp1/_startup.a51 b/firmware/fx2/src/usrp1/_startup.a51
deleted file mode 100644
index 4f5309922..000000000
--- a/firmware/fx2/src/usrp1/_startup.a51
+++ /dev/null
@@ -1 +0,0 @@
- .include "../common/_startup.a51"
diff --git a/firmware/fx2/src/usrp1/blink_leds.c b/firmware/fx2/src/usrp1/blink_leds.c
deleted file mode 100644
index c633d5d48..000000000
--- a/firmware/fx2/src/usrp1/blink_leds.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../common/blink_leds.c"
diff --git a/firmware/fx2/src/usrp1/check_mdelay.c b/firmware/fx2/src/usrp1/check_mdelay.c
deleted file mode 100644
index ea4ccdb14..000000000
--- a/firmware/fx2/src/usrp1/check_mdelay.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../common/check_mdelay.c"
diff --git a/firmware/fx2/src/usrp1/check_udelay.c b/firmware/fx2/src/usrp1/check_udelay.c
deleted file mode 100644
index d01622e5e..000000000
--- a/firmware/fx2/src/usrp1/check_udelay.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../common/check_udelay.c"
diff --git a/firmware/fx2/src/usrp1/edit-gpif b/firmware/fx2/src/usrp1/edit-gpif
deleted file mode 100755
index 5367b75a5..000000000
--- a/firmware/fx2/src/usrp1/edit-gpif
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env python
-# -*- Python -*-
-#
-# Copyright 2003 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio 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 3, or (at your option)
-# any later version.
-#
-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-
-# Edit the gpif.c file generated by the Cypress GPIF Designer Tool and
-# produce usrp_gpif.c, and usrp_gpif_inline.h, files suitable for our
-# uses.
-
-import re
-import string
-import sys
-
-def check_flow_state (line, flow_state_dict):
- mo = re.match (r'/\* Wave (\d) FlowStates \*/ (.*),', line)
- if mo:
- wave = int (mo.group (1))
- data = mo.group (2)
- split = data.split (',', 8)
- v = map (lambda x : int (x, 16), split)
- # print "%s, %s" % (wave, data)
- # print "split: ", split
- # print "v : ", v
- flow_state_dict[wave] = v
-
-
-def delta (xseq, yseq):
- # set subtraction
- z = []
- for x in xseq:
- if x not in yseq:
- z.append (x)
- return z
-
-
-def write_define (output, name, pairs):
- output.write ('#define %s()\t\\\n' % name)
- output.write ('do {\t\t\t\t\t\\\n')
- for reg, val in pairs:
- output.write ('%14s = 0x%02x;\t\t\t\\\n' % (reg, val))
- output.write ('} while (0)\n\n')
-
-def write_inlines (output, dict):
- regs = ['FLOWSTATE', 'FLOWLOGIC', 'FLOWEQ0CTL', 'FLOWEQ1CTL', 'FLOWHOLDOFF',
- 'FLOWSTB', 'FLOWSTBEDGE', 'FLOWSTBHPERIOD', 'GPIFHOLDAMOUNT']
-
- READ_FLOW_STATE = 2
- WRITE_FLOW_STATE = 3
-
- read_info = zip (regs, dict[READ_FLOW_STATE])
- write_info = zip (regs, dict[WRITE_FLOW_STATE])
-
- output.write ('''/*
- * Machine generated by "edit-gpif". Do not edit by hand.
- */
-
-''')
- write_define (output, 'setup_flowstate_common', read_info)
- write_define (output, 'setup_flowstate_read', delta (read_info, write_info))
- write_define (output, 'setup_flowstate_write', delta (write_info, read_info))
-
-
-def edit_gpif (input_name, output_name, inline_name):
- input = open (input_name, 'r')
- output = open (output_name, 'w')
- inline = open (inline_name, 'w')
- flow_state_dict = {}
-
- output.write ('''/*
- * Machine generated by "edit-gpif". Do not edit by hand.
- */
-
-''')
-
- while 1:
- line = input.readline ()
- line = string.replace (line, '\r','')
- line = re.sub (r' *$', r'', line)
-
- check_flow_state (line, flow_state_dict)
-
- line = re.sub (r'#include', r'// #include', line)
- line = re.sub (r'xdata ', r'', line)
- if re.search (r'GpifInit', line):
- break
-
- output.write (line)
-
- output.close ()
- write_inlines (inline, flow_state_dict)
- inline.close ()
-
-
-# gpif.c usrp_gpif.c usrp_gpif_inline.h
-edit_gpif (sys.argv[1], sys.argv[2], sys.argv[3])
diff --git a/firmware/fx2/src/usrp1/fpga_load.c b/firmware/fx2/src/usrp1/fpga_load.c
deleted file mode 100644
index b0256e925..000000000
--- a/firmware/fx2/src/usrp1/fpga_load.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../common/fpga_load.c"
diff --git a/firmware/fx2/src/usrp1/init_gpif.c b/firmware/fx2/src/usrp1/init_gpif.c
deleted file mode 100644
index 0f5944b3b..000000000
--- a/firmware/fx2/src/usrp1/init_gpif.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../common/init_gpif.c"
diff --git a/firmware/fx2/src/usrp1/usrp_common.c b/firmware/fx2/src/usrp1/usrp_common.c
deleted file mode 100644
index f389d9253..000000000
--- a/firmware/fx2/src/usrp1/usrp_common.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../common/usrp_common.c"
diff --git a/firmware/fx2/src/usrp1/vectors.a51 b/firmware/fx2/src/usrp1/vectors.a51
deleted file mode 100644
index fa579ba8a..000000000
--- a/firmware/fx2/src/usrp1/vectors.a51
+++ /dev/null
@@ -1 +0,0 @@
- .include "../common/vectors.a51"
diff --git a/firmware/fx2/usrp1/CMakeLists.txt b/firmware/fx2/usrp1/CMakeLists.txt
new file mode 100644
index 000000000..3d99a2ac1
--- /dev/null
+++ b/firmware/fx2/usrp1/CMakeLists.txt
@@ -0,0 +1,84 @@
+#
+# Copyright 2010 Ettus Research LLC
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+include_directories(${CMAKE_SOURCE_DIR}/common)
+
+#for usrp_common.h and the regs files...
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+#now make a lib to link against
+set(libusrp1_sources
+ ${CMAKE_SOURCE_DIR}/common/delay.c
+ ${CMAKE_SOURCE_DIR}/common/fx2utils.c
+ ${CMAKE_SOURCE_DIR}/common/i2c.c
+ ${CMAKE_SOURCE_DIR}/common/init_gpif.c
+ ${CMAKE_SOURCE_DIR}/common/isr.c
+ ${CMAKE_SOURCE_DIR}/common/timer.c
+ ${CMAKE_SOURCE_DIR}/common/usb_common.c
+# ${CMAKE_SOURCE_DIR}/common/spi.c
+# ${CMAKE_SOURCE_DIR}/common/vectors.a51
+)
+
+#file(GLOB libusrp1_c_sources ${CMAKE_SOURCE_DIR}/common/*.c)
+#file(GLOB libusrp1_a51_sources ${CMAKE_SOURCE_DIR}/common/*.a51)
+#list(APPEND libusrp1_sources ${libusrp1_c_sources} ${libusrp1_a51_sources})
+
+add_library(libusrp1 STATIC ${libusrp1_sources})
+
+# edit-gpif hacks up gpif.c for our purposes. no major surgery, just moving stuff around.
+set(GPIF_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/gpif.c)
+set(GPIF_SOURCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/usrp_gpif.c)
+set(GPIF_HEADER_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/usrp_gpif_inline.h)
+
+add_custom_command(
+ OUTPUT ${GPIF_SOURCE_OUTPUT}
+ DEPENDS ${EDIT_GPIF_USRP1}
+ COMMAND ${PYTHON_EXECUTABLE} ${EDIT_GPIF_USRP1} ${GPIF_SOURCE} ${GPIF_SOURCE_OUTPUT} ${GPIF_HEADER_OUTPUT}
+ COMMENT "Generating ${GPIF_SOURCE_OUTPUT}"
+)
+
+#file(GLOB usrp1_sources *.c)
+set(usrp1_sources
+ ${CMAKE_SOURCE_DIR}/common/vectors.a51
+ board_specific.c
+ eeprom_io.c
+ fpga_load.c
+ fpga_rev2.c
+ usrp_common.c
+ usrp_gpif.c
+ usrp_main.c
+ usb_descriptors.a51
+ ${CMAKE_SOURCE_DIR}/common/spi.c
+ ${CMAKE_SOURCE_DIR}/common/_startup.a51
+)
+add_executable(usrp1_fw ${usrp1_sources})
+target_link_libraries(usrp1_fw libusrp1)
+
+set(eeprom1_sources
+ ${CMAKE_SOURCE_DIR}/common/eeprom_boot.a51
+ ${CMAKE_SOURCE_DIR}/common/eeprom_init.c
+ ${CMAKE_SOURCE_DIR}/common/_startup.a51
+)
+
+add_custom_target(usrp1_eeprom ALL
+ DEPENDS usrp1_boot
+ COMMAND objcopy -I ihex -O binary usrp1_boot.ihx usrp1_boot.bin
+ COMMAND ${PYTHON_EXECUTABLE} ${BUILD_EEPROM} -r2 usrp1_boot.bin usrp1_eeprom.bin
+)
+
+add_executable(usrp1_boot ${eeprom1_sources})
+target_link_libraries(usrp1_boot libusrp1)
diff --git a/firmware/fx2/src/usrp1/board_specific.c b/firmware/fx2/usrp1/board_specific.c
index ef0081d84..ef0081d84 100644
--- a/firmware/fx2/src/usrp1/board_specific.c
+++ b/firmware/fx2/usrp1/board_specific.c
diff --git a/firmware/fx2/src/usrp1/eeprom_io.c b/firmware/fx2/usrp1/eeprom_io.c
index 9eeb53636..9eeb53636 100644
--- a/firmware/fx2/src/usrp1/eeprom_io.c
+++ b/firmware/fx2/usrp1/eeprom_io.c
diff --git a/firmware/fx2/src/usrp1/eeprom_io.h b/firmware/fx2/usrp1/eeprom_io.h
index 558017b12..558017b12 100644
--- a/firmware/fx2/src/usrp1/eeprom_io.h
+++ b/firmware/fx2/usrp1/eeprom_io.h
diff --git a/firmware/fx2/src/common/fpga_load.c b/firmware/fx2/usrp1/fpga_load.c
index c3ae9e707..c3ae9e707 100644
--- a/firmware/fx2/src/common/fpga_load.c
+++ b/firmware/fx2/usrp1/fpga_load.c
diff --git a/firmware/fx2/src/usrp1/fpga_rev2.c b/firmware/fx2/usrp1/fpga_rev2.c
index cca961dc4..cca961dc4 100644
--- a/firmware/fx2/src/usrp1/fpga_rev2.c
+++ b/firmware/fx2/usrp1/fpga_rev2.c
diff --git a/firmware/fx2/src/usrp1/fpga_rev2.h b/firmware/fx2/usrp1/fpga_rev2.h
index 54ec3f9fa..54ec3f9fa 100644
--- a/firmware/fx2/src/usrp1/fpga_rev2.h
+++ b/firmware/fx2/usrp1/fpga_rev2.h
diff --git a/firmware/fx2/src/usrp1/gpif.c b/firmware/fx2/usrp1/gpif.c
index f6745a43b..f6745a43b 100644
--- a/firmware/fx2/src/usrp1/gpif.c
+++ b/firmware/fx2/usrp1/gpif.c
diff --git a/firmware/fx2/src/usrp1/gpif.gpf b/firmware/fx2/usrp1/gpif.gpf
index 854e25399..854e25399 100755
--- a/firmware/fx2/src/usrp1/gpif.gpf
+++ b/firmware/fx2/usrp1/gpif.gpf
Binary files differ
diff --git a/firmware/fx2/src/usrp1/usb_descriptors.a51 b/firmware/fx2/usrp1/usb_descriptors.a51
index a60adbef8..a60adbef8 100644
--- a/firmware/fx2/src/usrp1/usb_descriptors.a51
+++ b/firmware/fx2/usrp1/usb_descriptors.a51
diff --git a/firmware/fx2/src/common/usrp_common.c b/firmware/fx2/usrp1/usrp_common.c
index 0998653c2..0998653c2 100644
--- a/firmware/fx2/src/common/usrp_common.c
+++ b/firmware/fx2/usrp1/usrp_common.c
diff --git a/firmware/fx2/usrp1/usrp_gpif.c b/firmware/fx2/usrp1/usrp_gpif.c
new file mode 100644
index 000000000..1191c8b28
--- /dev/null
+++ b/firmware/fx2/usrp1/usrp_gpif.c
@@ -0,0 +1,206 @@
+/*
+ * Machine generated by "edit-gpif". Do not edit by hand.
+ */
+
+// This program configures the General Programmable Interface (GPIF) for FX2.
+// Please do not modify sections of text which are marked as "DO NOT EDIT ...".
+//
+// DO NOT EDIT ...
+// GPIF Initialization
+// Interface Timing Async
+// Internal Ready Init IntRdy=1
+// CTL Out Tristate-able Binary
+// SingleWrite WF Select 1
+// SingleRead WF Select 0
+// FifoWrite WF Select 3
+// FifoRead WF Select 2
+// Data Bus Idle Drive Tristate
+// END DO NOT EDIT
+
+// DO NOT EDIT ...
+// GPIF Wave Names
+// Wave 0 = singlerd
+// Wave 1 = singlewr
+// Wave 2 = FIFORd
+// Wave 3 = FIFOWr
+
+// GPIF Ctrl Outputs Level
+// CTL 0 = WEN# CMOS
+// CTL 1 = REN# CMOS
+// CTL 2 = OE# CMOS
+// CTL 3 = CLRST CMOS
+// CTL 4 = unused CMOS
+// CTL 5 = BOGUS CMOS
+
+// GPIF Rdy Inputs
+// RDY0 = EF#
+// RDY1 = FF#
+// RDY2 = unused
+// RDY3 = unused
+// RDY4 = unused
+// RDY5 = TCXpire
+// FIFOFlag = FIFOFlag
+// IntReady = IntReady
+// END DO NOT EDIT
+// DO NOT EDIT ...
+//
+// GPIF Waveform 0: singlerd
+//
+// Interval 0 1 2 3 4 5 6 Idle (7)
+// _________ _________ _________ _________ _________ _________ _________ _________
+//
+// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
+// DataMode NO Data NO Data NO Data NO Data NO Data NO Data NO Data
+// NextData SameData SameData SameData SameData SameData SameData SameData
+// Int Trig No Int No Int No Int No Int No Int No Int No Int
+// IF/Wait Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
+// Term A
+// LFunc
+// Term B
+// Branch1
+// Branch0
+// Re-Exec
+// Sngl/CRC Default Default Default Default Default Default Default
+// WEN# 0 0 0 0 0 0 0 0
+// REN# 0 0 0 0 0 0 0 0
+// OE# 0 0 0 0 0 0 0 0
+// CLRST 0 0 0 0 0 0 0 0
+// unused 0 0 0 0 0 0 0 0
+// BOGUS 0 0 0 0 0 0 0 0
+//
+// END DO NOT EDIT
+// DO NOT EDIT ...
+//
+// GPIF Waveform 1: singlewr
+//
+// Interval 0 1 2 3 4 5 6 Idle (7)
+// _________ _________ _________ _________ _________ _________ _________ _________
+//
+// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
+// DataMode Activate Activate Activate Activate Activate Activate Activate
+// NextData SameData SameData SameData SameData SameData SameData SameData
+// Int Trig No Int No Int No Int No Int No Int No Int No Int
+// IF/Wait Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
+// Term A EF#
+// LFunc AND
+// Term B EF#
+// Branch1 ThenIdle
+// Branch0 ElseIdle
+// Re-Exec No
+// Sngl/CRC Default Default Default Default Default Default Default
+// WEN# 0 1 1 1 1 1 1 0
+// REN# 0 0 0 0 0 0 0 0
+// OE# 0 0 0 0 0 0 0 0
+// CLRST 0 0 0 0 0 0 0 0
+// unused 0 0 0 0 0 0 0 0
+// BOGUS 0 0 0 0 0 0 0 0
+//
+// END DO NOT EDIT
+// DO NOT EDIT ...
+//
+// GPIF Waveform 2: FIFORd
+//
+// Interval 0 1 2 3 4 5 6 Idle (7)
+// _________ _________ _________ _________ _________ _________ _________ _________
+//
+// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
+// DataMode NO Data Activate NO Data NO Data NO Data NO Data NO Data
+// NextData SameData SameData SameData SameData SameData SameData SameData
+// Int Trig No Int No Int No Int No Int No Int No Int No Int
+// IF/Wait Wait 1 IF Wait 1 IF Wait 1 Wait 1 Wait 1
+// Term A TCXpire TCXpire
+// LFunc AND AND
+// Term B TCXpire TCXpire
+// Branch1 Then 2 ThenIdle
+// Branch0 Else 1 ElseIdle
+// Re-Exec No No
+// Sngl/CRC Default Default Default Default Default Default Default
+// WEN# 0 0 0 0 0 0 0 0
+// REN# 1 0 0 0 0 0 0 0
+// OE# 1 1 1 0 0 0 0 0
+// CLRST 0 0 0 0 0 0 0 0
+// unused 0 0 0 0 0 0 0 0
+// BOGUS 0 0 0 0 0 0 0 0
+//
+// END DO NOT EDIT
+// DO NOT EDIT ...
+//
+// GPIF Waveform 3: FIFOWr
+//
+// Interval 0 1 2 3 4 5 6 Idle (7)
+// _________ _________ _________ _________ _________ _________ _________ _________
+//
+// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val
+// DataMode NO Data Activate Activate Activate Activate Activate Activate
+// NextData SameData SameData SameData SameData SameData SameData SameData
+// Int Trig No Int No Int No Int No Int No Int No Int No Int
+// IF/Wait Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 Wait 1
+// Term A TCXpire
+// LFunc AND
+// Term B TCXpire
+// Branch1 ThenIdle
+// Branch0 Else 1
+// Re-Exec No
+// Sngl/CRC Default Default Default Default Default Default Default
+// WEN# 0 0 0 0 0 0 0 0
+// REN# 0 0 0 0 0 0 0 0
+// OE# 0 0 0 0 0 0 0 0
+// CLRST 0 0 0 0 0 0 0 0
+// unused 0 0 0 0 0 0 0 0
+// BOGUS 0 0 0 0 0 0 0 0
+//
+// END DO NOT EDIT
+
+// GPIF Program Code
+
+// DO NOT EDIT ...
+// #include "fx2.h"
+// #include "fx2regs.h"
+// #include "fx2sdly.h" // SYNCDELAY macro
+// END DO NOT EDIT
+
+// DO NOT EDIT ...
+const char WaveData[128] =
+{
+// Wave 0
+/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
+/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* Output*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
+// Wave 1
+/* LenBr */ 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
+/* Opcode*/ 0x22, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
+/* Output*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
+/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
+// Wave 2
+/* LenBr */ 0x01, 0x11, 0x01, 0x3F, 0x01, 0x01, 0x01, 0x07,
+/* Opcode*/ 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+/* Output*/ 0x06, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* LFun */ 0x00, 0x2D, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x3F,
+// Wave 3
+/* LenBr */ 0x01, 0x39, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
+/* Opcode*/ 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
+/* Output*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* LFun */ 0x00, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
+};
+// END DO NOT EDIT
+
+// DO NOT EDIT ...
+const char FlowStates[36] =
+{
+/* Wave 0 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/* Wave 1 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+/* Wave 2 FlowStates */ 0x81,0x2D,0x26,0x00,0x04,0x04,0x03,0x02,0x00,
+/* Wave 3 FlowStates */ 0x81,0x2D,0x21,0x00,0x04,0x04,0x03,0x02,0x00,
+};
+// END DO NOT EDIT
+
+// DO NOT EDIT ...
+const char InitData[7] =
+{
+/* Regs */ 0xA0,0x00,0x00,0x00,0xEE,0x4E,0x00
+};
+// END DO NOT EDIT
+
+// TO DO: You may add additional code below.
+
diff --git a/firmware/fx2/usrp1/usrp_gpif_inline.h b/firmware/fx2/usrp1/usrp_gpif_inline.h
new file mode 100644
index 000000000..77a741a8b
--- /dev/null
+++ b/firmware/fx2/usrp1/usrp_gpif_inline.h
@@ -0,0 +1,27 @@
+/*
+ * Machine generated by "edit-gpif". Do not edit by hand.
+ */
+
+#define setup_flowstate_common() \
+do { \
+ FLOWSTATE = 0x81; \
+ FLOWLOGIC = 0x2d; \
+ FLOWEQ0CTL = 0x26; \
+ FLOWEQ1CTL = 0x00; \
+ FLOWHOLDOFF = 0x04; \
+ FLOWSTB = 0x04; \
+ FLOWSTBEDGE = 0x03; \
+FLOWSTBHPERIOD = 0x02; \
+GPIFHOLDAMOUNT = 0x00; \
+} while (0)
+
+#define setup_flowstate_read() \
+do { \
+ FLOWEQ0CTL = 0x26; \
+} while (0)
+
+#define setup_flowstate_write() \
+do { \
+ FLOWEQ0CTL = 0x21; \
+} while (0)
+
diff --git a/firmware/fx2/src/usrp1/usrp_main.c b/firmware/fx2/usrp1/usrp_main.c
index b8c2e98ec..3eb8c001f 100644
--- a/firmware/fx2/src/usrp1/usrp_main.c
+++ b/firmware/fx2/usrp1/usrp_main.c
@@ -19,6 +19,7 @@
*/
#include "usrp_common.h"
+#include "usrp_regs.h"
#include "usrp_commands.h"
#include "fpga.h"
#include "usrp_gpif_inline.h"
diff --git a/firmware/fx2/src/usrp1/usrp_rev2_regs.h b/firmware/fx2/usrp1/usrp_regs.h
index a4f1d9896..a4f1d9896 100644
--- a/firmware/fx2/src/usrp1/usrp_rev2_regs.h
+++ b/firmware/fx2/usrp1/usrp_regs.h
diff --git a/firmware/fx2/src/common/build_eeprom.py b/firmware/fx2/utils/build_eeprom.py
index ae62587db..298ccc00c 100755
--- a/firmware/fx2/src/common/build_eeprom.py
+++ b/firmware/fx2/utils/build_eeprom.py
@@ -28,7 +28,7 @@ from optparse import OptionParser
# USB Vendor and Product ID's
VID = 0xfffe # Free Software Folks
-PID = 0x0002 # Universal Software Radio Peripheral
+
def msb (x):
return (x >> 8) & 0xff
@@ -46,9 +46,14 @@ def build_eeprom_image (filename, rev):
f = open(filename, 'rb')
bytes = f.read()
- devid = rev
+ devid = 4 #for compatibility
start_addr = 0 #prove me wrong
+ if(rev == 1):
+ PID = 0x0002 #USRP1
+ else:
+ PID = 0x0003 #USRP1P
+
rom_header = [
0xC2, # boot from EEPROM
lsb (VID),
@@ -87,7 +92,7 @@ if __name__ == '__main__':
usage = "usage: %prog -r REV [options] bootfile.bin outfile.bin"
parser = OptionParser (usage=usage)
parser.add_option ("-r", "--rev", type="int", default=-1,
- help="Specify USRP revision number REV (2 or 4)")
+ help="Specify USRP revision, 1 for USRP1, 2 for USRP1P")
(options, args) = parser.parse_args ()
if len (args) != 2:
parser.print_help ()
diff --git a/firmware/fx2/src/common/edit-gpif b/firmware/fx2/utils/edit-gpif.py
index 5367b75a5..5367b75a5 100755
--- a/firmware/fx2/src/common/edit-gpif
+++ b/firmware/fx2/utils/edit-gpif.py
diff --git a/firmware/fx2/include/generate_regs.py b/firmware/fx2/utils/generate_regs.py
index 656cd5e81..656cd5e81 100755
--- a/firmware/fx2/include/generate_regs.py
+++ b/firmware/fx2/utils/generate_regs.py