Sorry for the dummy question, but I didn't find a simple and direct answer searching around for this. (Not need to say also that I am just starting with GNU Radio... :)
OK I have a code, generated with Gnu radio companion that i want to run over the command line to follow with GDB. I was under the impression that if I simply got the code generated in the ~/.grc_gnuradio, add the
----
def main():
""" go, go, go """
top_block = [CLASS]()
top_block.run()
if __name__ == "__main__":
print 'Blocked waiting for GDB attach (pid = %d)' % (os.getpid(),)
raw_input ('Press Enter to continue: ')
main()
----
as stated at
https://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging it would run to attach GDB. However, i am getting the following error:
---
Traceback (most recent call last):
File "ieee802_15_4_phy.py", line 120, in <module>
main()
File "ieee802_15_4_phy.py", line 115, in main
top_block.run()
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py", line 53, in __getattr__
return getattr(self._hb, name)
AttributeError: 'hier_block2_sptr' object has no attribute 'run'
---
The code runs correctly on Gnuradio companion! No problem whatsoever! Which would be the correct way to run the code auto-generated by gnuradio companion in a stand alone way?