# additional libraries for linking with the SWIG-generated library
pager_swig_la_swig_libadd = \
- $(builddir)/../lib/libgnuradio-pager.la
+ $(abs_top_builddir)/gr-pager/lib/libgnuradio-pager.la
# additional SWIG files to be installed
pager_swig_swiginclude_headers = \
assert (len (image) <= 256)
return image
-def build_shell_script (out, ihx_filename, rev):
+def build_shell_script (out, ihx_filename, rev, prefix):
image = build_eeprom_image (ihx_filename, rev)
out.write ('#!/bin/sh\n')
- out.write ('usrper -x load_firmware /usr/local/share/usrp/rev%d/std.ihx\n' % rev)
+ out.write ('usrper -x load_firmware ' + prefix + '/share/usrp/rev%d/std.ihx\n' % rev)
out.write ('sleep 1\n')
# print "len(image) =", len(image)
out.write ('sleep 1\n')
if __name__ == '__main__':
- usage = "usage: %prog -r REV [options] bootfile.ihx"
+ usage = "usage: %prog -p PREFIX -r REV [options] bootfile.ihx"
parser = OptionParser (usage=usage)
+ parser.add_option ("-p", "--prefix", type="string", default="",
+ help="Specify install prefix from configure")
parser.add_option ("-r", "--rev", type="int", default=-1,
help="Specify USRP revision number REV (2 or 4)")
(options, args) = parser.parse_args ()
sys.stderr.write (
"You must specify the USRP revision number (2 or 4) with -r REV\n")
sys.exit (1)
+ if options.prefix == "":
+ sys.stderr.write (
+ "You must specify the install prefix with -p PREFIX\n")
+ sys.exit (1)
+ if not os.path.isdir(options.prefix):
+ sys.stderr.write (
+ "PREFIX dir (" + options.prefix + "), does not exist\n")
+ sys.exit (1)
ihx_filename = args[0]
- build_shell_script (sys.stdout, ihx_filename, options.rev)
+ build_shell_script (sys.stdout, ihx_filename, options.rev, options.prefix)
$(XCC) $(LINKOPTS) -o $@ $(EEPROM_BOOT_OBJS)
burn-usrp2-eeprom: eeprom_boot.ihx
- $(PYTHON) $(srcdir)/../common/build_eeprom.py -r2 eeprom_boot.ihx > $@
+ $(PYTHON) $(srcdir)/../common/build_eeprom.py -p$(prefix) -r2 eeprom_boot.ihx > $@
chmod +x $@
burn-usrp4-eeprom: eeprom_boot.ihx
- $(PYTHON) $(srcdir)/../common/build_eeprom.py -r4 eeprom_boot.ihx > $@
+ $(PYTHON) $(srcdir)/../common/build_eeprom.py -p$(prefix) -r4 eeprom_boot.ihx > $@
chmod +x $@
-/*
- * Copyright 2009 Ettus Research LLC
- */
+//
+// Copyright 2009 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 asversion 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 "db_wbxng_adf4350_regs.h"
#include "db_wbxng_adf4350.h"
-/*
- * Copyright 2009 Ettus Research LLC
- */
+//
+// Copyright 2009 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 asversion 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.
#ifndef ADF4350_REGS_H
#define ADF4350_REGS_H
#include "clocks.h"
#include "u2_init.h"
#include <string.h>
+#include "usrp2_i2c_addr.h"
volatile bool link_is_up = false; // eth handler sets this
int cpu_tx_buf_dest_port = PORT_ETH;
static void
fill_db_info(u2_db_info_t *p, const struct db_base *db)
{
- p->dbid = db->dbid;
+ //p->dbid = db->dbid;
p->freq_min_hi = u2_fxpt_freq_hi(db->freq_min);
p->freq_min_lo = u2_fxpt_freq_lo(db->freq_min);
p->freq_max_hi = u2_fxpt_freq_hi(db->freq_max);
fill_db_info(&r->tx_db_info, tx_dboard);
fill_db_info(&r->rx_db_info, rx_dboard);
+ r->tx_db_info.dbid = read_dboard_eeprom(I2C_ADDR_TX_A);
+ r->rx_db_info.dbid = read_dboard_eeprom(I2C_ADDR_RX_A);
+
return r->len;
}
/*
* Copyright 2010 Free Software Foundation, Inc.
*
- * 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
/*
* Copyright 2010 Free Software Foundation, Inc.
*
- * 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
/*
* Copyright 2010 Free Software Foundation, Inc.
*
- * 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
bool
db_set_gain(struct db_base *db, u2_fxpt_gain_t gain);
+/*!
+ * \brief Read the eeprom value from the db, without defaulting to BasicRX/TX
+ */
+int
+read_dboard_eeprom(int i2c_addr);
#endif /* INCLUDED_DB_H */
/*
* Copyright 2010 Free Software Foundation, Inc.
*
- * 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
/*
* Copyright 2010 Free Software Foundation, Inc.
*
- * 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