discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] GRCC generation


From: Miklos Maroti
Subject: [Discuss-gnuradio] GRCC generation
Date: Sun, 11 Aug 2013 16:01:14 -0500

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]