Josh Blum edited this page Sep 8, 2017 · 4 revisions

GNU Radio support for Pothos



Pothos features can complement and enhance the GNU Radio experience:

How it works

The gr-pothos project provides two major functionalities: 1) It provides a special Pothos adapter block named "GrPothosBlock", that wraps a standard gr::block. GrPothosBlock is responsible for invoking the gr::block's work routine, and interfacing directly with inputs, outputs, buffers, tags, and messages. 2) The gr-pothos project scans headers and GRC xml files which it uses to generate Pothos block wrappers for GNU Radio. After installing GNU Radio and various out-of-tree projects, the user simply rebuilds gr-pothos to update the Pothos block wrappers.


Note: Before continuing, we recommend that you make sure that your GNU Radio install is clean. The gr-pothos utility scans installed header files and GRC blocks to generate wrappers. If your GNU Radio install is an amalgamation of recent and defunct files, the generation step will fail. If this is the case, you must clean the install directories and reinstall GNU Radio. This is already recommended practice for GNU Radio users.

Build requirements

  • Meet the standard build requirements for GNU Radio: See build guide.
  • Python PLY modules is an additional runtime requirement for GrPothosUtil.
#Ubuntu apt-get install instructions for additional requirements
sudo apt-get install python-ply

Install GNU Radio

Install GNURadio by the standard means, either a binary installer or from source (See build guide). Also, make sure to configure GNU Radio with GRC support as gr-pothos requires the block definitions.

Generate block wrappers

We are going to build the GrPothosBlock adapter and generate Pothos block wrappers for the installed GNU Radio blocks. After this step, you can use GNU Radio blocks within the Pothos framework. The gr-pothos component is a CMake project that scans the GNU Radio installation, and generates Pothos block wrappers. This step should be re-run after making changes to the GNU Radio installation (including out-of-tree projects).

git clone
cd gr-pothos
mkdir build
cd build
#set CMAKE_INSTALL_PREFIX to match the GNU Radio install
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local
make -j8
sudo make install


Report problems

This is complicated. We are parsing header files, GRC block definitions, and generating code. There are bound to be problems. To help the effort, please report missing blocks, blocks that have errors, or appear not to function. Tell us about the issue:

Utility assumptions

The gr-pothos utility works with the mainline GNU Radio components, and we cannot guarantee that it will work with every out-of-tree project. Given a project named gr-foo, gr-pothos assumes the following:

  • There is a library called
  • Headers are installed to include/gnuradio/foo/*.h
  • GRC files are installed to share/gnuradio/grc/blocks/foo_*.xml

Again, please report problems. We can probably make the gr-pothos utility more flexible to accommodate your project.

Blocks not supported

The gr-pothos utility only handles gr::block style blocks for now. That excludes hierarchical blocks and python blocks. This is a good first step as most blocks are gr::blocks. Hopefully, most missing hierarchical blocks can be recreated from their component blocks.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.