Forum: GNU Radio GRCC generation

9616519a2e715b547f60efba3bae8da1?d=identicon&s=25 Miklos Maroti (Guest)
on 2013-08-11 23:02
(Received via mailing list)
Hi!

I would like to add a CMAKE rule to my out of tree module to generate
hierarchical blocks from GRC files using the GRCC tool. However, GRCC
refuses to pus the generated py and xml files to the right directory,
and instead it always places them into the $HOME/.grc_modules
directory even if another one is specified with the --directory
option. The problem (I think) is in the Generator.py file, where

        self._generate_options =
self._flow_graph.get_option('generate_options')
        if self._generate_options == 'hb':
            self._mode = HIER_BLOCK_FILE_MODE
            dirname = HIER_BLOCKS_LIB_DIR
        else:
            self._mode = TOP_BLOCK_FILE_MODE
            dirname = os.path.dirname(file_path)
            #handle the case where the directory is read-only
            #in this case, use the system's temp directory
            if not os.access(dirname, os.W_OK):
                dirname = tempfile.gettempdir()

So all hierarchical blocks are placed to HIEAR_BLOCKS_LIB_DIR, and the
file path argument is discarded. So how can I generate python code and
xml files for hierarchical blocks from grc sources in an automated
way?

Miklos
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.