Forum: GNU Radio gr-modtool questions

Posted by Marcus D. Leech (Guest)
on 2012-04-08 19:38
(Received via mailing list)
After I do a newmod, how to I add a new block?

when I use gr_modtool.py add <directory-from-newmod>

It simply says no Gnu Radio module found in named directory.


--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org
Posted by Martin Braun (Guest)
on 2012-04-10 09:41
(Received via mailing list)
On Sun, Apr 08, 2012 at 01:37:22PM -0400, Marcus D. Leech wrote:
> After I do a newmod, how to I add a new block?
>
> when I use gr_modtool.py add <directory-from-newmod>
>
> It simply says no Gnu Radio module found in named directory.

If you're not in the module directory, use '-d <dirname>'.
Otherwise,

$ gr_modtool.py add myblock_ff

..or whatever your block's called.

$ gr_modtool help add

is your friend, and the example on https://www.cgran.org/wiki/devtools
seems OK too.

MB

--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
Posted by Serhat B. (serhat_b)
on 2013-02-09 22:56
Martin Braun wrote in post #1055756:
> On Sun, Apr 08, 2012 at 01:37:22PM -0400, Marcus D. Leech wrote:
>> After I do a newmod, how to I add a new block?
>>
>> when I use gr_modtool.py add <directory-from-newmod>
>>
>> It simply says no Gnu Radio module found in named directory.
>
> If you're not in the module directory, use '-d <dirname>'.
> Otherwise,
>
> $ gr_modtool.py add myblock_ff
>
> ..or whatever your block's called.
>
> $ gr_modtool help add
>
> is your friend, and the example on https://www.cgran.org/wiki/devtools
> seems OK too.


i did as you mentioned but, it gives me error when i try to add it to
grc as a block.

my steps:1

bynkln@ubuntu:~$ gr_modtool.py create myQpsk
Module directory is "./gr-myQpsk".
Creating directory...
Copying howto example...
Unpacking...
Replacing occurences of 'howto' to 'myQpsk'... Done.
Use 'gr_modtool add' to add a new block to this currently empty module.

2

adding qpsk.py code into __init__.py with hand editing

3


bynkln@ubuntu:~$ gr_modtool.py add myQpsk
No GNU Radio module found in the given directory. Quitting.
bynkln@ubuntu:~$ cd gr-myQpsk
bynkln@ubuntu:~/gr-myQpsk$ gr_modtool.py add myQpsk
Operating in directory .
GNU Radio module name identified: myQpsk
Enter code type: hier
Language: C++
Block/code identifier: myQpsk
Enter valid argument list, including default arguments: int val1, double
val2=0
Add Python QA code? [Y/n] y
Add C++ QA code? [y/N] y
Traversing lib...
Adding file 'myQpsk_impl.h'...
Adding file 'myQpsk_impl.cc'...
Adding file 'myQpsk.h'...
Adding file 'qa_myQpsk.cc'...
Adding file 'qa_myQpsk.h'...
Traversing swig...
Editing swig/myQpsk_swig.i...
Adding Python QA...
Adding file 'qa_myQpsk.py'...
Editing python/CMakeLists.txt...
Traversing grc...
Adding file 'myQpsk_myQpsk.xml'...
Editing grc/CMakeLists.txt...
bynkln@ubuntu:~/gr-myQpsk$ mkdir build
bynkln@ubuntu:~/gr-myQpsk$ cd build
bynkln@ubuntu:~/gr-myQpsk/build$ cmake ../
-- The CXX compiler identification is GNU 4.7.2
-- The C compiler identification is GNU 4.7.2
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Build type not specified: defaulting to release.
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'gruel'
--   found gruel, version 3.6.4git
-- Found GRUEL: /usr/local/lib/libgruel.so
-- checking for module 'gnuradio-core'
--   found gnuradio-core, version 3.6.4git
-- Found GNURADIO_CORE: /usr/local/lib/libgnuradio-core.so
-- checking for module 'cppunit'
--   found cppunit, version 1.12.1
-- Found CPPUNIT: /usr/lib/libcppunit.so;dl
-- Found SWIG: /usr/bin/swig2.0 (found version "2.0.7")
-- Found PythonLibs: /usr/lib/python3.2/config/libpython3.2.so (found
version "2.7.3")
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.1.2")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bynkln/gr-myQpsk/build
bynkln@ubuntu:~/gr-myQpsk/build$ make
Scanning dependencies of target gnuradio-myQpsk
[  5%] Building CXX object
lib/CMakeFiles/gnuradio-myQpsk.dir/myQpsk_impl.cc.o
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc: In constructor
‘gr::myQpsk::myQpsk_impl::myQpsk_impl(int, double)’:
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:30: error: expected
primary-expression before ‘<’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:32: error: ‘MIN_IN’ was not
declared in this scope
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:39: error: expected
primary-expression before ‘>’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:40: error: expected
primary-expression before ‘,’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:42: error: expected
primary-expression before ‘<’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:44: error: ‘MAX_IN’ was not
declared in this scope
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:51: error: expected
primary-expression before ‘>’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:52: error: expected
primary-expression before ‘,’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:62: error: expected
primary-expression before ‘<’ token
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:64: error: expected
primary-expression before ‘float’
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:42:64: error: expected ‘)’
before ‘float’
/home/bynkln/gr-myQpsk/lib/myQpsk_impl.cc:58:3: error: expected ‘{’
before ‘}’ token
make[2]: *** [lib/CMakeFiles/gnuradio-myQpsk.dir/myQpsk_impl.cc.o] Error
1
make[1]: *** [lib/CMakeFiles/gnuradio-myQpsk.dir/all] Error 2
make: *** [all] Error 2
bynkln@ubuntu:~/gr-myQpsk/build$


so i have stucked here... what should i do???
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.