|
From: | Nelson Pina |
Subject: | [Discuss-gnuradio] Fwd: USRP1 control GPIOs on SBX boards |
Date: | Thu, 25 Apr 2013 22:36:02 +0100 |
Nelson Pina Product Developer Hardware |
|
T +351 220 301 596 (PT) T +44 114 213 2712 (UK) www.tomorrow-options.com Porto // Portugal Sheffield // United Kingdom |
On 04/23/2013 02:06 PM, Nelson Pina wrote:
I tried some approaches, using the gr_modtool to create the module, but it always fails with GRC running errors like:I believe that for people with knowledge of C++, and Python this is a very simple module, unfortunately that is not my area since I'm a hardware engineer and I only work with C.1 parameter - to define the motherboard serial number1 integer input - that will define the state of the GPIOsI wonder if anyone can help me on this, making a functional draft code of such a block:Hi everyone,I have been trying to make a gnuradio out-of-the-tree block that is able to control the four GPIOs, currently attached to LED's, of the SBX daughter-boards working with an USRP motherboard.
**********************
Traceback (most recent call last):
File "/home/to-nelsonpina/Desktop/locus_gnuradio/GRC_files/top_block.py", line 16, in <module>
import gpio
File "/usr/local/lib/python2.7/dist-packages/gpio/__init__.py", line 45, in <module>
from gpio_swig import *
File "/usr/local/lib/python2.7/dist-packages/gpio/gpio_swig.py", line 26, in <module>
_gpio_swig = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/gpio/gpio_swig.py", line 22, in swig_import_helper
_mod = imp.load_module('_gpio_swig', fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-gpio.so: undefined symbol: _ZN3uhd4usrp10multi_usrp4makeERKNS_13device_addr_tE
*************************
This is most likely a failure to define the SWIG header file appropriately, or possibly you've _declared_ a class that SWIG found but you haven't _defined_ it. Finally because I just found this out the hard way, if you're using the new code structure with block.h, block_impl.h, and block_impl.cc, be aware that block.h needs to declare an abstract class and its method declarations need to be pure virtual. block_impl.h declares the concrete class and block_impl.cc provides concrete method definitions.
If you want to unmangle that symbol, type this:
c++filt _ZN3uhd4usrp10multi_usrp4makeERKNS_13device_addr_tE
I will appreciate all the help I can get from you guys.
Best regards,
__
Nelson Pina
Product Developer
Hardware
T +351 220 301 596 (PT)
T +44 114 213 2712 (UK)
www.tomorrow-options.com
Porto // Portugal
Sheffield // United Kingdom
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
locus_gpio_vv.cc
Description: Binary data
locus_gpio_vv.h
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |