0

I have created a GRC flowchart that includes a custom OOT module. The flowchart has been compiled, and the resulting .py file copied to my USRP device.

When I try to run this file on the USRP, I get an error: no module named "my_custom_blocks"

Which makes complete sense!

My Question: How do I integrate my custom OOT module onto the USRP device, so that my file will run correctly? Do I need to use gr_modtool on my USRP device (and then copy my code in?) is there an easier way?

Thank you for your help

Joe
  • 1
  • 1

1 Answers1

1

You need to install that module on your E-series USRP (the fact that you can execute code on your USRP says it's E-Series).

That means either:

  1. If your OOT module is Python-only, the you could copy over your gr-my_custom_blocks, thenmkdir build; cd build; cmake -DCMAKE_INSTALL_PREFIX=/usr ..; make; sudo make install.
  2. In general, the cleaner (even for Python-only modules) and the only way sensible if you have C++ code in your module is

    • Set up a cross-compilation toolchain on your PC,
    • Cross-compile your module and
    • install it to the correct directory structure, finally
    • copying over the thus generated filesystem tree to your device

The Ettus Knowledge Base Application Notes AN-311 and AN-315 (your module is just like gr-ettus) will help.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
  • Hi Marcus, Thanks for your reply. 1. On our device (E312) I used gr_modtool to create an identical OOT module and block (with identical names to the OOT on my local PC). I then copied across my local .py to replace the generated one. I used the build commands you provided, which appear to work (though there is a warning: cannot find DOXYGEN). However, when I run the grc python file on the device, I get this message: - RuntimeError: e300: failed to open /dev/axi_fpga Are there an online tutorials / documentation for these procedures (for both py and cpp)? Thanks again. – Joe Nov 12 '19 at 05:10
  • completely unrelated error. Also, don't use `gr_modtool` on the device; as said, just copy over the whole module directory. – Marcus Müller Nov 12 '19 at 07:53