You may recall that I was asking about gr_modtool a week ago. I've made some 
progress and I think I'm very close to making my block work. I'm using Ubuntu 
Desktop 20.04 in a Virtual Machine, with GNU Radio 
3.9.0.0git~master~14059~focal.

Here is what I've learned so far:

packages needed: git doxygen clang-format cmake pybind11-dev python3-pygccxml 
liborc-0.4-dev

workflow:

cd ~/modules
gr_modtool newmod modulename
cd gr-modulename
gr_modtool add blockname
  < answer questions about blockname >
  < edit ./lib/blockname_impl.h ./lib/blockname_impl.cc 
./include/modulename/blockname.h >
gr_modtool makeyaml
  < edit ./grc/modulename_blockname.block.yml
gr_modtool bind blockname
mkdir build
cd build
cmake ../
  < check for errors; ignore '-- Could NOT find MPIR ...'
make
sudo make install
sudo ldconfig (needed once on ubuntu, after initial 'sudo make install')
 < check gnuradio-companion for modulename->blockname; test blockname >

My block is a trivial block that copies a float input to a float output. There 
are no parameters. I've gone through the above steps without errors, and I get 
to the very end, where I can see the block in the gnuradio-companion list, BUT 
when I try to add it to a flowgraph, it won't show up on the canvas. I've tried 
double-click and drag/drop, but neither puts the block in the flowgraph.

I would like to hear from anyone who has built an OOT block from scratch, using 
3.9.0 gr_modtool.
Is the above procedure correct?
What might cause the block to not load?

Assuming I get it working, is there a page planned on the wiki where I can 
document the procedures, tips, and pitfalls(I've found a few)?

Thanks,
Gavin





Reply via email to