[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9708 - in gnuradio/trunk/usrp2/firmware: . lib
From: |
eb |
Subject: |
[Commit-gnuradio] r9708 - in gnuradio/trunk/usrp2/firmware: . lib |
Date: |
Fri, 3 Oct 2008 19:29:49 -0600 (MDT) |
Author: eb
Date: 2008-10-03 19:29:47 -0600 (Fri, 03 Oct 2008)
New Revision: 9708
Added:
gnuradio/trunk/usrp2/firmware/lib/abort.c
gnuradio/trunk/usrp2/firmware/lib/exit.c
Modified:
gnuradio/trunk/usrp2/firmware/Makefile.common
gnuradio/trunk/usrp2/firmware/lib/Makefile.am
gnuradio/trunk/usrp2/firmware/lib/db_init.c
gnuradio/trunk/usrp2/firmware/lib/u2_init.c
Log:
USRP2 firmware fixes for EDK 10.1 microblaze toolchain. Firmware now builds
and runs correctly using these tools.
Modified: gnuradio/trunk/usrp2/firmware/Makefile.common
===================================================================
--- gnuradio/trunk/usrp2/firmware/Makefile.common 2008-10-03 22:30:56 UTC
(rev 9707)
+++ gnuradio/trunk/usrp2/firmware/Makefile.common 2008-10-04 01:29:47 UTC
(rev 9708)
@@ -31,12 +31,13 @@
#AM_CFLAGS = $(STD_CFLAGS) -mno-xl-soft-mul -mxl-barrel-shift
-LINKER_SCRIPT = $(top_srcdir)/lib/microblaze.ld
-#AM_LDFLAGS = -Wl,-T$(LINKER_SCRIPT) -Wl,-defsym -Wl,_STACK_SIZE=1024
-#AM_LDFLAGS = -Wl,-T$(LINKER_SCRIPT) -Wl,-Map -Wl,address@hidden
-AM_LDFLAGS = -Wl,-T$(LINKER_SCRIPT)
+#LINKER_SCRIPT = $(top_srcdir)/lib/microblaze.ld
+#AM_LDFLAGS = -Wl,-T,$(LINKER_SCRIPT) -Wl,-defsym -Wl,_STACK_SIZE=1024
+#AM_LDFLAGS = -Wl,-T,$(LINKER_SCRIPT) -Wl,-Map -Wl,address@hidden
+#AM_LDFLAGS = -Wl,-T,$(LINKER_SCRIPT)
+#AM_LDFLAGS = -Wl,-Map -Wl,address@hidden -Wl,-defsym -Wl,_STACK_SIZE=2048
+AM_LDFLAGS = -Wl,-defsym -Wl,_STACK_SIZE=2048
-
%.bin : %
mb-objcopy -O binary $< $@
Modified: gnuradio/trunk/usrp2/firmware/lib/Makefile.am
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/Makefile.am 2008-10-03 22:30:56 UTC
(rev 9707)
+++ gnuradio/trunk/usrp2/firmware/lib/Makefile.am 2008-10-04 01:29:47 UTC
(rev 9708)
@@ -22,6 +22,7 @@
libu2fw_a_SOURCES = \
+ abort.c \
ad9510.c \
ad9777.c \
buffer_pool.c \
@@ -34,6 +35,7 @@
eeprom.c \
ethernet.c \
eth_mac.c \
+ exit.c \
hal_io.c \
hal_uart.c \
i2c.c \
Added: gnuradio/trunk/usrp2/firmware/lib/abort.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/abort.c (rev 0)
+++ gnuradio/trunk/usrp2/firmware/lib/abort.c 2008-10-04 01:29:47 UTC (rev
9708)
@@ -0,0 +1,32 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <nonstdio.h>
+
+extern void _exit(int status);
+
+void
+abort(void)
+{
+ putstr("\n\nabort\n");
+ // FIXME loop blinking leds
+ _exit(-1);
+}
Property changes on: gnuradio/trunk/usrp2/firmware/lib/abort.c
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: gnuradio/trunk/usrp2/firmware/lib/db_init.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_init.c 2008-10-03 22:30:56 UTC (rev
9707)
+++ gnuradio/trunk/usrp2/firmware/lib/db_init.c 2008-10-04 01:29:47 UTC (rev
9708)
@@ -211,19 +211,13 @@
u2_fxpt_freq_t fs = U2_DOUBLE_TO_FXPT_FREQ(100e6); // converter sample rate
u2_fxpt_freq_t delta = target_freq - baseband_freq;
+#if 0
printf("calc_dxc_freq\n");
printf(" fs = "); print_fxpt_freq(fs); newline();
printf(" target = "); print_fxpt_freq(target_freq); newline();
printf(" baseband = "); print_fxpt_freq(baseband_freq); newline();
printf(" delta = "); print_fxpt_freq(delta); newline();
-
-#if 0
- printf("--- printed as uint64_t ---\n");
- printf(" fs = "); print_uint64(fs); newline();
- printf(" target = "); print_uint64(target_freq); newline();
- printf(" baseband = "); print_uint64(baseband_freq); newline();
- printf(" delta = "); print_uint64(delta); newline();
-#endif
+#endif
if (delta >= 0){
while (delta > fs)
@@ -301,17 +295,17 @@
// master = 100e6;
// v = (int) rint(target_freq / master_freq) * pow(2.0, 32.0);
- printf("compute_freq_control_word\n");
- printf(" target_freq = "); print_fxpt_freq(target_freq); newline();
+ //printf("compute_freq_control_word\n");
+ //printf(" target_freq = "); print_fxpt_freq(target_freq); newline();
int32_t master_freq = 100000000; // 100M
int32_t v = ((target_freq << 12)) / master_freq;
- printf(" fcw = %d\n", v);
+ //printf(" fcw = %d\n", v);
*actual_freq = (v * (int64_t) master_freq) >> 12;
- printf(" actual = "); print_fxpt_freq(*actual_freq); newline();
+ //printf(" actual = "); print_fxpt_freq(*actual_freq); newline();
return v;
}
Added: gnuradio/trunk/usrp2/firmware/lib/exit.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/exit.c (rev 0)
+++ gnuradio/trunk/usrp2/firmware/lib/exit.c 2008-10-04 01:29:47 UTC (rev
9708)
@@ -0,0 +1,28 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+extern void _exit(int status);
+
+void
+exit(int status)
+{
+ _exit(status);
+}
Property changes on: gnuradio/trunk/usrp2/firmware/lib/exit.c
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: gnuradio/trunk/usrp2/firmware/lib/u2_init.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/u2_init.c 2008-10-03 22:30:56 UTC (rev
9707)
+++ gnuradio/trunk/usrp2/firmware/lib/u2_init.c 2008-10-04 01:29:47 UTC (rev
9708)
@@ -44,7 +44,6 @@
ok &= eeprom_read(I2C_ADDR_MBOARD, MBOARD_REV_MSB, &u2_hw_rev_major, 1);
}
-
/*
* We ought to arrange for this to be called before main, but for now,
* we require that the user's main call u2_init as the first thing...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9708 - in gnuradio/trunk/usrp2/firmware: . lib,
eb <=