Jonathon,

Thanks, I found that I needed to add "$LOCALPREFIX/lib/python2.7/dist-packages:$PYTHONPATH" to my python path in order for it to see the OOT modules.

So, now I'm on to my next problem.  When I execute the python script on the E310 I now get another error:

[INFO] [0/Radio_0] Performing CODEC loopback test...
[INFO] [0/Radio_0] CODEC loopback test passed
Traceback (most recent call last):
  File "e310_rx_spectrum.py", line 214, in <module>
    main()
  File "e310_rx_spectrum.py", line 203, in main
    tb = top_block_cls(freq=options.freq, rfnoc_gain=options.rfnoc_gain, rx_gain=options.rx_gain)
  File "e310_rx_spectrum.py", line 101, in __init__
    self.tutorial_gain_0 = tutorial.gain(
AttributeError: 'module' object has no attribute 'gain'

I've seen on other posts that this has something to do with an error when importing the tutorial module.  Or that maybe, something needs to be added to a header file.  I've verified my xml files by comparing them with the project files downloaded from the ettus web-site as described by the application note AN-823 (Getting Started with RFNoC Development).

Sorry for the questions on basic operation.  If I can get a configuration that goes from start to finish I can expand from there to more complex operations.  I think the embedded E310 environment is making it more complicated than other environments that don't require cross-compilation.

Thanks,

Mike

On 11/12/20 11:44 PM, Jonathon Pendlum wrote:
Hi Mike,

The might be due to the PYTHONPATH env variable not including the directory where your OOT module is installed. Try looking for a directory like /usr/lib/python2/dist-packages or similar and adding that to PYTHONPATH.

Jonathon

On Thu, Nov 12, 2020, 13:40 Mike via USRP-users <[email protected] <mailto:[email protected]>> wrote:

    I got an error when running a gnuradio python script on the E310. 
    The
    python script was created on the host machine in GRC and then copied
    (scp) over to E310.   I've done this successfully with built-in
    modules/blocks.  Now that I've created a custom FPGA, I've
    successfully
    updated the XML files in the OOT RFNoC module so that the new block
    shows up named correctly when I run "uhd_usrp_probe".

    The gnuradio error happens when I try to import the new module (in
    this
    case "import tutorial").

    root@ni-e31x:~# python e310_rx_spectrum.py
    Traceback (most recent call last):
       File "e310_rx_spectrum.py", line 19, in <module>
         import tutorial
    ImportError: No module named tutorial
    root@ni-e31x:~#

    On the host side I am able to see the new OOT module and choose
    the new
    block (in this case, "gain") and create the new grc block diagram.  I
    compile the GRC diagram and then copy the python script over to
    the E310.

    I created a new "build-arm" directory in the rfnoc OOT directory (in
    this case, "rfnoc-tutorial").  I performed a cmake, make, and install
    similar to the other cross-compile steps with the result that I
    see the
    files being installed into the /e300 directory (i.e. the directory
    that
    is sshfs shared with the E310).  But, I still feel that something is
    missing since the embedded version of gnuradio is unable to locate
    the
    new tutorial module.

    Any suggestions?  I feel like I'm real close...

    Thanks,

    Mike


    _______________________________________________
    USRP-users mailing list
    [email protected] <mailto:[email protected]>
    http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to