Jonathon,

Yes, I believe I have cross compiled it correctly.  These are the steps I performed:

# now compile for e310 (updating XML files)
mkdir /rfnoc-mikes/build-arm && cd build-arm
# from new terminal (just to be sure) source the environment variables
source ~/prefix/rfnoc2/oe/environment-setup-cortexa9t2hf-neon-oe-linux-musleabi cmake -DCMAKE_TOOLCHAIN_FILE=~/prefix/rfnoc2/src/gnuradio/cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_QT=OFF ..
make -j3
make install DESTDIR=~/prefix/rfnoc2/e300/
make install DESTDIR=~/prefix/rfnoc2/oe/sysroots/cortexa9t2hf-neon-oe-linux-musleabi/

I am using sshfs to make the e300 directory visible to the e310 device.  I'm not sure why it needs to be installed in two locations but I'm just trying to follow instructions that I have seen from various sources.

When I ran rfnocmodtool I used the default settings to create the block control files but I left them untouched.  I only modified the xml for UHD and the xml for GRC located in ./rfnoc-mikes/grc/ and rfnoc-mikes/rfnoc/blocks/

Thanks for looking into this,

Mike

On 2/11/21 6:15 PM, Jonathon Pendlum wrote:
Hi Mike,

Did you cross-compile your RFNoC OOT module and install it to the E310?

Jonathon

On Tue, Feb 9, 2021 at 9:52 PM Mike via USRP-users <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> wrote:

    All,  I wanted to resurrect a problem that I had couple months ago
    that
    I put aside and would now like to fix.  The issue is that I get a
    python
    error when executing a flow graph on an E310 that was generated
    from GRC.

    The error is posted below.  For background I'm using UHD 3.15 with
    GNU
    Radio 3.7.  I've successfully created a bit file for the FPGA with a
    custom block (simple gain block).  I've updated the UHD xml file such
    that uhd_usrp_probe correctly identifies the new block. Also, using a
    python command line tool, I've been able to import my module and
    enough
    of other modules like ettus and create a device3 variable to see
    that I
    can instantiate my mikes.digitalgain block.  Previously I've
    successfully generated non-RFNoC OOT modules and run them on the
    E310.
    So, I'm a little stumped how to get past this error.  Is there an
    additional step that I'm missing to compile the RFNoC module so
    that the
    E310 version of GNU Radio can successfully import the module and
    connect
    to it in the top block.  Is the warning about using the default block
    controller relevant?  I thought that simple blocks could be
    controlled
    through the XML files using the default controller.  Any help
    would be
    greatly appreciated...

    root@ni-e31x:~# ./e310_rx_spectrum.py
    [INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106800;
    UHD_3.15.0.0-62-g7a3f1516
    [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
    mgmt_addr=127.0.0.1,type=e3xx,product=e310_sg1,serial=3092E3A,claimed=False
    [WARNING] [MPM.RPCServer] A timeout event occured!
    [INFO] [MPM.PeriphManager] Found 1 daughterboard(s).
    [INFO] [0/Radio_0] Initializing block control (NOC ID:
    0x12AD100000003310)
    [WARNING] [RFNOC] Can't find a block controller for key digitalgain,
    using default block controller!
    [INFO] [0/digitalgain_0] Initializing block control (NOC ID:
    0x1234123412341234)
    [INFO] [MPM.PeriphManager] init() called with device args
    `product=e310_sg1,mgmt_addr=127.0.0.1'.
    [WARNING] [RFNOC] Can't find a block controller for key FFT, using
    default block controller!
    [INFO] [0/FFT_0] Initializing block control (NOC ID:
    0xFF70000000000000)
    [INFO] [0/FIFO_0] Initializing block control (NOC ID:
    0xF1F0000000000000)
    [INFO] [0/FIFO_1] Initializing block control (NOC ID:
    0xF1F0000000000000)
    [INFO] [0/FIFO_2] Initializing block control (NOC ID:
    0xF1F0000000000000)
    [INFO] [0/Radio_0] Performing CODEC loopback test...
    [INFO] [0/Radio_0] CODEC loopback test passed
    [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 191, in <module>
         main()
       File "./e310_rx_spectrum.py", line 180, 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 80, in __init__
         self.mikes_digitalgain_0 = mikes.digitalgain(
    AttributeError: 'module' object has no attribute 'digitalgain'
    root@ni-e31x:~# ^C


    On 11/16/20 3:53 PM, Mike via USRP-users wrote:
    > All,
    >
    > I'm working with the E310 unit and have run up against a road
    block.
    > I've completed almost the entire application note, AN-823 (Getting
    > started with RFNoC Development).
    >
    > I'm using UHD 3.15 with GNU Radio 3.7.  I've successfully built a
    > custom FPGA with the tutorial's "gain" block.  I can see the new
    block
    > with the proper name with uhd_usrp_probe.
    >
    > I updated the XML files to allow GRC to implement the RFNoC block.
    >
    > Here is where I run into problems.  When I copy the gnuradio python
    > file over to the E310 I keep getting an error that states that the
    > 'module' object has no attribute 'gain'.
    >
    > root@ni-e31x:~# python e310_rx_spectrum.py
    > [INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106800;
    > UHD_3.15.0.0-62-g7a3f1516
    > [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
    >
    mgmt_addr=127.0.0.1,type=e3xx,product=e310_sg1,serial=3092E3A,claimed=False
    > [WARNING] [MPM.RPCServer] A timeout event occured!
    > [INFO] [MPM.PeriphManager] Found 1 daughterboard(s).
    > [INFO] [0/Radio_0] Initializing block control (NOC ID:
    > 0x12AD100000003310)
    > [WARNING] [RFNOC] Can't find a block controller for key gain, using
    > default block controller!
    > [INFO] [0/gain_0] Initializing block control (NOC ID:
    0x1111222233334444)
    > [INFO] [MPM.PeriphManager] init() called with device args
    > `mgmt_addr=127.0.0.1,product=e310_sg1'.
    > [INFO] [0/DDC_0] Initializing block control (NOC ID:
    0xDDC0000000000000)
    > [WARNING] [RFNOC] Can't find a block controller for key FFT, using
    > default block controller!
    > [INFO] [0/FFT_0] Initializing block control (NOC ID:
    0xFF70000000000000)
    > [INFO] [0/Radio_0] Performing CODEC loopback test...
    > [INFO] [0/Radio_0] CODEC loopback test passed
    > [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 216, in <module>
    >     main()
    >   File "e310_rx_spectrum.py", line 205, 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'
    >
    > Now, I've seen many suggestions on how to address this.  It mostly
    > describes this as a problem importing the module 'tutorial'.  I've
    > seen descriptions of using the "nm" command to see if the callback
    > function is undefined.  But I still haven't been able to fix the
    issue.
    >
    > But mostly what I'm after is a working example of an RFNoC
    module for
    > the E310. One that includes the GRC interface so that the software
    > interface can program the FPGA registers.  I think that a lot of
    the
    > tutorials are written for host applications whereas the E310 has a
    > cross-compiling aspect to it.
    >
    > So, if somebody has a working example, I'd greatly appreciate
    it. Or
    > maybe a better description or tutorial for E310 specific issues
    like
    > cross-compiling OOT RFNoC blocks.
    >
    > Many thanks for all the help that has already been given me.
    >
    > Mike
    >
    >
    > _______________________________________________
    > USRP-users mailing list
    > USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com>
    > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

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

_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to