Modifying how-to-write-a-block 3.2.2

Hello all,

I have been spending a considerable amount of time to modify the how-
to-write-a-block to compile and make my own, different name, module.
While changing the code withing the howto_square_ff.cc is a simple
solution, it is unfulfilling.

Sadly, I think I tried to make big changes in the code structure and a
simple find/replace of Makefile.am and howto.i (as well as renaming
the files) and other obvious files, does not suffice. I tried to look
for instructions on exactly which files and lines to modify, but there
seem to be none for the structure provided in the example for version
3.2.2. There are several places (Dawei Shen’s tutorial amongst
others) that explain the modification for a boilerplate model for, I
believe, version 3.02 and before, but nothing for the newer version
where the Makefiles.am in the src/lib directory is quite different.

I will continue to hack on the current version, and keep notes so that
so I can report what and how it works, but if anyone knows of an
existing enumeration of steps on how to take the boilerplate provided
by the how-to-write-a-block ver 3.2.2 and modify it to say a module
name toneDetect, I will appreciate it.

Regards,

Affan.

Hi Affan,

Why kind of problems have you been having? I did quite a bit of
productive work with version 3.2.2 simply by creating a new set of
“how_to” routines in addition to the examples.

Are you having compile problems? Run-time problems? I remember
having lots of run-time difficulties because I think the how-to gets
put into /usr/local/lib by default and the usual gnuradio-3.2.2 stuff
goes into /usr/lib (or vice versa, I forget) and you need to make sure
both the regular stuff and the how-to stuff is configured with the
–prefix=/usr option.

-Tom

Tom,
most of my problems have to do with compilation i.e. my new block
doesnt compile as somewhere there is a reference to the old how_to
module structure. I didnt add any errors since I think I had attempted
a very large change in one go (i.e. changed the code and module name
and pared down from two classes to just one) and I can solve the
problem by incrementally changing just one thing at a time. I still
think I should be able solve this if I give it another 3-4 hrs
(probably tomorrow) but was hoping to see if someone updated the howto
that works for older versions.

Affan

Hi Affan - Since you modified the how-to stuff to meet your needs,
it’ll be difficult for any of us to provide definitive assistance
without seeing your code (I, personally, have very little free time
this week until I get a presentation finished). That said, if you do
succeed & come up with a set of notes on the process, I hope you
decide to edit them into a wiki (GNU Radio’s or some other) to help
out others trying to do the same thing. - MLD

I guess what I’m saying is that I don’t recall having any problems
using the “howto” with 3.2.2. I understand your frustrations however.
:slight_smile:

Sure, I plan to do just that.

I was wondering what the status was for the VRT work.

Are there any dates set or expected for being able to
use the USRP2 on Mac OSX?

@(^.^)@ Ed

So, I finally got everything to work. It appears most of the problem
was due to me changing a who bunch of stuff at the same time. However,
by changing just the function name and then the module name
incrementally, I was able to rename howto_* as a new module with
different functionality.

I have notes, that I need to work up on, but for the time being I have
setup a webpage on my website that contains a tarball of the new
module, with diff files included showing exactly which files were
changed from the standard howt-to*_3.2.2 block.

http://www.isi.edu/~asyed/code/gr_howto.html

I hope this helps some one.

When I get some time, I will try to list each step individually from
my notes.

Thanks to everyone here for help.

Affan

Hi ,
I am a newbie in this topic and trying to search for the answer to the
makefile hacking for making my own
module eg name “mycustomblock”, but in vain… i refered this post but i
am
unable to get the step by step
procedure to solve the problem, since i m new in this please do provide
me
if any solution we have to solve this
problem.
Hope i ll get a response soon, and thanking u all in advance.

:frowning:

Ton ph

Affan Ahmed wrote:

that works for older versions.

Are you having compile problems? Run-time problems? I remember

Hello all,
simple find/replace of Makefile.am and howto.i (as well as renaming
before, but nothing for the newer version where the Makefiles.am in
Regards,


Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


View this message in context:
http://old.nabble.com/modifying-how-to-write-a-block-3.2.2-tp27602155p28816481.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Hello, Affan,

Sorry to disturb you. I have halt importing my own block process for
quite
long time. Since I have read what your are posted in Feb and download
the
modified files howto from your website. It is quite useful to me.
However, I
am not quite sure how to compare every file with the original file.

Actually I have faced the same problem that I can only follow the shen’s
tutriol which might be insufficient to current howto file. So just for a
quick question, can you list which file I should modify to apply my own
block?

What I did so far is just rename the
howto_square_ff.h=>myblock_square_ff.h,
howto_square_ff.cc=>myblock_square_ff.cc howto.i=>myblock.i and changed
all
the words “howto” in those three files with “myblock”.

I did the same thing in Makefile.am.

Should I change anything else in another file?

Thank you.
regards,
Andy

Affan Ahmed wrote:

the files) and other obvious files, does not suffice. I tried to look
by the how-to-write-a-block ver 3.2.2 and modify it to say a module
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


View this message in context:
http://old.nabble.com/modifying-how-to-write-a-block-3.2.2-tp27602155p28195224.html
Sent from the GnuRadio mailing list archive at Nabble.com.