commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10133 - in gnuradio/branches/developers/n4hy/pfb_fbs:


From: n4hy
Subject: [Commit-gnuradio] r10133 - in gnuradio/branches/developers/n4hy/pfb_fbs: gnuradio-core grc/freedesktop grc/src/gui usrp2/firmware usrp2/firmware/apps
Date: Fri, 19 Dec 2008 17:51:25 -0700 (MST)

Author: n4hy
Date: 2008-12-19 17:51:24 -0700 (Fri, 19 Dec 2008)
New Revision: 10133

Added:
   gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/configure.gnu
Modified:
   gnuradio/branches/developers/n4hy/pfb_fbs/gnuradio-core/gnuradio-core.pc.in
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/freedesktop/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/MainWindow.py
   gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/apps/test_ram.c
Log:
Bringing my branch up to date so I can get back to work after a extended 
absence.

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/gnuradio-core/gnuradio-core.pc.in
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/gnuradio-core/gnuradio-core.pc.in 
2008-12-19 22:08:40 UTC (rev 10132)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/gnuradio-core/gnuradio-core.pc.in 
2008-12-20 00:51:24 UTC (rev 10133)
@@ -5,7 +5,7 @@
 
 Name: gnuradio-core
 Description: GNU Software Radio toolkit
-Requires: gnuradio-omnithread fftw3f
+Requires: gruel fftw3f gsl gnuradio-omnithread
 Version: @VERSION@
 Libs: -L${libdir} -lgnuradio-core @BOOST_LDFLAGS@ @BOOST_THREAD_LIB@ 
@BOOST_DATE_TIME_LIB@
 Cflags: @BOOST_CPPFLAGS@ @BOOST_CXXFLAGS@ -I${includedir} @DEFINES@

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/freedesktop/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/freedesktop/Makefile.am       
2008-12-19 22:08:40 UTC (rev 10132)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/freedesktop/Makefile.am       
2008-12-20 00:51:24 UTC (rev 10133)
@@ -21,36 +21,35 @@
 
 include $(top_srcdir)/grc/Makefile.inc
 
-sizes = 32 48 64 128 256
+ourdatadir = $(grc_data_prefix)/freedesktop
 
-install-data-local:
-       for size in $(sizes); do \
-               xdg-icon-resource install --context mimetypes --theme gnome 
--mode system --size $${size} $(srcdir)/grc-icon-$${size}.png 
application-gnuradio-grc; \
-               xdg-icon-resource install --context mimetypes --mode system 
--size $${size} $(srcdir)/grc-icon-$${size}.png application-gnuradio-grc; \
-               xdg-icon-resource install --context apps --theme gnome --mode 
system --size $${size} $(srcdir)/grc-icon-$${size}.png gnuradio-grc; \
-               xdg-icon-resource install --context apps --mode system --size 
$${size} $(srcdir)/grc-icon-$${size}.png gnuradio-grc; \
-       done
-       xdg-mime install --mode system $(srcdir)/gnuradio-grc.xml
-       xdg-desktop-menu install --mode system $(srcdir)/gnuradio-grc.desktop
-       xdg-desktop-menu install --mode system 
$(srcdir)/gnuradio-usrp_diagnostics.desktop
+dist_ourdata_DATA = \
+       grc-icon-256.png \
+       grc-icon-128.png \
+       grc-icon-64.png \
+       grc-icon-48.png \
+       grc-icon-32.png \
+       gnuradio-grc.xml \
+       gnuradio-grc.desktop \
+       gnuradio-usrp_diagnostics.desktop
 
-uninstall-local:
-       for size in $(sizes); do \
-               xdg-icon-resource uninstall --context mimetypes --theme gnome 
--mode system --size $${size} application-gnuradio-grc; \
-               xdg-icon-resource uninstall --context mimetypes --mode system 
--size $${size} application-gnuradio-grc; \
-               xdg-icon-resource uninstall --context apps --theme gnome --mode 
system --size $${size} gnuradio-grc; \
-               xdg-icon-resource uninstall --context apps --mode system --size 
$${size} gnuradio-grc; \
-       done
-       xdg-mime uninstall --mode system $(srcdir)/gnuradio-grc.xml
-       xdg-desktop-menu uninstall --mode system $(srcdir)/gnuradio-grc.desktop
-       xdg-desktop-menu uninstall --mode system 
$(srcdir)/gnuradio-usrp_diagnostics.desktop
+dist_bin_SCRIPTS = grc_setup_freedesktop
 
-EXTRA_DIST = \
-       $(srcdir)/grc-icon-256.png \
-       $(srcdir)/grc-icon-128.png \
-       $(srcdir)/grc-icon-64.png \
-       $(srcdir)/grc-icon-48.png \
-       $(srcdir)/grc-icon-32.png \
-       $(srcdir)/gnuradio-grc.xml \
-       $(srcdir)/gnuradio-grc.desktop \
-       $(srcdir)/gnuradio-usrp_diagnostics.desktop
+grc_setup_freedesktop: Makefile grc_setup_freedesktop.in
+       sed -e 's|@address@hidden|$(ourdatadir)|g' $(srcdir)/address@hidden > $@
+
+EXTRA_DIST = $(srcdir)/grc_setup_freedesktop.in
+BUILT_SOURCES = grc_setup_freedesktop
+MOSTLYCLEANFILES = $(BUILT_SOURCES)
+
+install-data-hook:
+       @printf "\n*** GRC Post-Install Message ***\
+       \nTo install icons, mime type, and menu items\
+       \nfor a freedesktop.org system (Gnome/KDE/Xfce):\
+       \n  >>> sudo grc_setup_freedesktop install\n\n"
+
+uninstall-hook:
+       @printf "\n*** GRC Post-Uninstall Message ***\
+       \nTo uninstall icons, mime type, and menu items\
+       \nfor a freedesktop.org system (Gnome/KDE/Xfce):\
+       \n  >>> sudo grc_setup_freedesktop uninstall\n\n"

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/MainWindow.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/MainWindow.py 
2008-12-19 22:08:40 UTC (rev 10132)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/MainWindow.py 
2008-12-20 00:51:24 UTC (rev 10133)
@@ -19,9 +19,10 @@
 
 from Constants import \
        MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT, \
-       NEW_FLOGRAPH_TITLE, REPORTS_WINDOW_HEIGHT, \
-       FLOW_GRAPH_FILE_EXTENSION
-from Actions import APPLICATION_QUIT, FLOW_GRAPH_KILL
+       NEW_FLOGRAPH_TITLE, DEFAULT_REPORTS_WINDOW_WIDTH
+from Actions import \
+       APPLICATION_QUIT, FLOW_GRAPH_KILL, \
+       FLOW_GRAPH_SAVE, get_accel_group
 import pygtk
 pygtk.require('2.0')
 import gtk
@@ -51,11 +52,13 @@
                self.handle_states = handle_states
                gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
                vbox = gtk.VBox()
-               hbox = gtk.HBox()
+               self.hpaned = gtk.HPaned()
                self.add(vbox)
                #create the menu bar and toolbar
+               self.add_accel_group(get_accel_group())
                vbox.pack_start(Bars.MenuBar(), False)
                vbox.pack_start(Bars.Toolbar(), False)
+               vbox.pack_start(self.hpaned)
                #setup scrolled window
                self.scrolled_window = gtk.ScrolledWindow()
                self.scrolled_window.set_size_request(MIN_WINDOW_WIDTH, 
MIN_WINDOW_HEIGHT)
@@ -69,31 +72,28 @@
                self.notebook.set_show_border(False)
                self.notebook.set_scrollable(True) #scroll arrows for page tabs
                self.notebook.connect('switch-page', self._handle_page_change)
-               fg_and_report_box = gtk.VBox(False, 0)
-               fg_and_report_box.pack_start(self.notebook, False, False, 0)
-               fg_and_report_box.pack_start(self.scrolled_window)
-               hbox.pack_start(fg_and_report_box)
-               vbox.pack_start(hbox)
-               #create the side windows
-               side_box = gtk.VBox()
-               hbox.pack_start(side_box, False)
-               side_box.pack_start(BlockTreeWindow(platform, 
self.get_flow_graph)) #allow resize, selection window can have more space
+               #setup containers
+               flow_graph_box = gtk.VBox(False, 0)
+               self.flow_graph_vpaned = gtk.VPaned()
+               flow_graph_box.pack_start(self.notebook, False, False, 0)
+               flow_graph_box.pack_start(self.scrolled_window)
+               self.flow_graph_vpaned.pack1(flow_graph_box)
+               self.hpaned.pack1(self.flow_graph_vpaned)
+               self.hpaned.pack2(BlockTreeWindow(platform, 
self.get_flow_graph), False) #dont allow resize
                #create the reports window
                self.text_display = TextDisplay()
                #house the reports in a scrolled window
                self.reports_scrolled_window = gtk.ScrolledWindow()
-               self.reports_scrolled_window.set_size_request(-1, 
REPORTS_WINDOW_HEIGHT)
                self.reports_scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, 
gtk.POLICY_AUTOMATIC)
                
self.reports_scrolled_window.add_with_viewport(self.text_display)
-               fg_and_report_box.pack_end(self.reports_scrolled_window, False) 
#dont allow resize, fg should get all the space
-               #show all but the main window container and the reports window
-               vbox.show_all()
-               self.notebook.hide()
-               self._show_reports_window(False)
-               # load preferences and show the main window
+               self.reports_scrolled_window.set_size_request(-1, 
DEFAULT_REPORTS_WINDOW_WIDTH)
+               self.flow_graph_vpaned.pack2(self.reports_scrolled_window, 
False) #dont allow resize
+               #load preferences and show the main window
                Preferences.load(platform)
-               self.resize(*Preferences.window_size())
-               self.show()#show after resize in preferences
+               self.resize(*Preferences.main_window_size())
+               
self.flow_graph_vpaned.set_position(Preferences.reports_window_position())
+               self.hpaned.set_position(Preferences.blocks_window_position())
+               self.show_all()
 
        ############################################################
        # Event Handlers
@@ -136,15 +136,6 @@
                vadj.set_value(vadj.upper)
                vadj.emit('changed')
 
-       def _show_reports_window(self, show):
-               """
-               Show the reports window when show is True.
-               Hide the reports window when show is False.
-               @param show boolean flag
-               """
-               if show: self.reports_scrolled_window.show()
-               else: self.reports_scrolled_window.hide()
-
        ############################################################
        # Pages: create and close
        ############################################################
@@ -199,7 +190,9 @@
                #save state before closing
                Preferences.files_open(open_files)
                Preferences.file_open(open_file)
-               Preferences.window_size(self.get_size())
+               Preferences.main_window_size(self.get_size())
+               
Preferences.reports_window_position(self.flow_graph_vpaned.get_position())
+               Preferences.blocks_window_position(self.hpaned.get_position())
                Preferences.save()
                return True
 
@@ -238,33 +231,26 @@
                Show/hide the reports window.
                @param title the window title
                """
-               if self.get_page():
-                       title = ''.join((
-                                       Preferences.window_prefix(),
-                                       ' - Editing: ',
-                                       (self.get_page().get_file_path() or 
NEW_FLOGRAPH_TITLE),
-                                       (self.get_page().get_saved() and ' ' or 
'*'), #blank must be non empty
-                               )
+               title = ''.join((
+                               self._platform.get_name(),
+                               ' - Editing: ',
+                               (self.get_page().get_file_path() or 
NEW_FLOGRAPH_TITLE),
+                               (self.get_page().get_saved() and ' ' or '*'), 
#blank must be non empty
+                               (self.get_page().get_read_only() and ' 
(read-only)' or ''),
                        )
-               else: title = MAIN_WINDOW_PREFIX + ' - Editor '
+               )
                gtk.Window.set_title(self, title)
                #set tab titles
                for page in self._get_pages():
-                       title = os.path.basename(page.get_file_path())
-                       #strip file extension #TEMP
-                       if title.endswith('.xml'):
-                               title = title[0:-len('.xml')]
-                       #strip file extension
-                       if title.endswith(FLOW_GRAPH_FILE_EXTENSION):
-                               title = title[0:-len(FLOW_GRAPH_FILE_EXTENSION)]
+                       #get filename and strip out file extension
+                       title = 
os.path.splitext(os.path.basename(page.get_file_path()))[0]
                        page.set_text(''.join((
                                                (title or NEW_FLOGRAPH_TITLE),
                                                (page.get_saved() and ' ' or 
'*'), #blank must be non empty
+                                               (page.get_read_only() and ' 
(ro)' or ''),
                                        )
                                )
                        )
-               #reports window
-               self._show_reports_window(Preferences.show_reports_window())
                #show/hide notebook tabs
                if len(self._get_pages()) > 1: self.notebook.show()
                else: self.notebook.hide()

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/Makefile.am        
2008-12-19 22:08:40 UTC (rev 10132)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/Makefile.am        
2008-12-20 00:51:24 UTC (rev 10133)
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,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
@@ -15,7 +15,20 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+ACLOCAL_AMFLAGS = -I config
+
 include $(top_srcdir)/Makefile.common
 
-SUBDIRS = include lib apps 
+EXTRA_DIST = \
+       bootstrap \
+       configure \
+       configure.gnu
 
+
+SUBDIRS = config 
+
+if BUILDING_USRP2_FIRMWARE
+SUBDIRS += include lib apps
+endif
+
+

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/apps/test_ram.c
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/apps/test_ram.c    
2008-12-19 22:08:40 UTC (rev 10132)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/apps/test_ram.c    
2008-12-20 00:51:24 UTC (rev 10133)
@@ -43,32 +43,62 @@
 
 #define BUFSIZE 128
 
-int
-main(void)
+int test_ram()
 {
   int i,j,k;
-  unsigned char buf[512];
-
-  u2_init();
-  //hal_uart_init();
-  //puts("\ntest_ram\n");
+  output_regs->ram_page = 1<<10;
   
-  output_regs->ram_page = 0;
-
-  //puts("r[0]=DEADBEEF\n");
   extram[0] = 0xDEADBEEF;
   extram[1] = 0xF00D1234;
   extram[7] = 0x76543210;
-  puts("RD\n");
+  
+  output_regs->ram_page = 2<<10;
+  extram[7] = 0x55555555;
+  extram[1] = 0xaaaaaaaa;
+  extram[0] = 0xeeeeeeee;
+  
+  output_regs->ram_page = 1<<10;
+  
   i = extram[0];
   k = extram[1];
   j = extram[7];
-  //puts("r0=");
   
-  puthex32_nl(i);
-  puthex32_nl(k);
-  puthex32_nl(j);
-  puts("Done");
+  if((i != 0xDEADBEEF)||(j!=0x76543210)||(k!=0xF00D1234)) {
+    puts("RAM FAIL1!\n");
+    puthex32_nl(i);
+    puthex32_nl(j);
+    puthex32_nl(k);
+    return 0;
+  }
+  
+  output_regs->ram_page = 2<<10;
+
+  j = extram[7];
+  k = extram[1];
+  i = extram[0];
+
+  if((i != 0xeeeeeeee)||(j!=0x55555555)||(k!=0xaaaaaaaa)) {
+    puts("RAM FAIL2!\n");
+    puthex32_nl(i);
+    puthex32_nl(j);
+    puthex32_nl(k);
+    return 0;
+  }
+  return 1;
+}
+
+int
+main(void)
+{
+
+  u2_init();
+  puts("\ntest_ram\n");
+  int success = test_ram();
+  if(success)
+    puts("RAM Passed Tests\n");
+  else
+    puts("RAM Failed\n");
+
   hal_finish();
   return 0;
 }

Added: gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/configure.gnu
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/configure.gnu      
                        (rev 0)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/usrp2/firmware/configure.gnu      
2008-12-20 00:51:24 UTC (rev 10133)
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# wrapper to setup cross-compilation of firmware
+#
+
+for v in CC CPP CXX AR NM RANLIB STRIP F77 CFLAGS CXXFLAGS CPPFLAGS LDFLAGS 
+do
+  unset $v
+done
+
+args=
+for t in "$@"
+do
+  case "$t" in
+      (CC=*)       ;;
+      (CPP=*)       ;;
+      (CXX=*)      ;;
+      (AR=*)       ;;
+      (NM=*)       ;;
+      (RANLIB=*)   ;;
+      (STRIP=*)    ;;
+      (F77=*)      ;;
+      (CFLAGS=*)   ;;
+      (CXXFLAGS=*) ;;
+      (CPPFLAGS=*) ;;
+      (LDFLAGS=*)  ;;
+      (*)  args="$args $t" ;;
+  esac
+done
+
+
+`dirname $0`/configure CFLAGS='-O2' $args --host=mb





reply via email to

[Prev in Thread] Current Thread [Next in Thread]