I start a new job shortly, and I have to maintain an 8051-based
assembly-language program. I have already been told that one of my first
tasks will be to consider migrating it to a new language, to ease the
difficulty of finding people to maintain it. Being 8051-based, resources
are at a premium. It occurs to me that embedding Ruby is one possible
option. Is there any information available on how to do this? Does one
just build the source code (in C), and bundle a Ruby script in with it?
Any hints gratefully accepted.
···
–
Steve Merrick
“Who cares, wins”
P.S. I’ve seen stuff about ‘eRuby’ - which I assume is ‘embedded Ruby’,
but I can’t seem to find it again…
I start a new job shortly, and I have to maintain an 8051-based
assembly-language program. I have already been told that one of my first
tasks will be to consider migrating it to a new language, to ease the
difficulty of finding people to maintain it. Being 8051-based, resources
are at a premium. It occurs to me that embedding Ruby is one possible
option. Is there any information available on how to do this? Does one
just build the source code (in C), and bundle a Ruby script in with it?
Any hints gratefully accepted.
–
Steve Merrick
“Who cares, wins”
P.S. I’ve seen stuff about ‘eRuby’ - which I assume is ‘embedded Ruby’,
but I can’t seem to find it again…
eruby is probably useless to you in this context.
It refers to Ruby code embedded in text files (like
a templating system), not embedded into devices.
I don’t think there’s been much done in the way of
embedding Ruby. There may even be some significant
technical obstacles. Others will know more than I.
Though I hate to say it, your best bet is probably to use C. There is
the SDCC compiler (http://sdcc.sourceforge.net/) which is free and
targets the 8051, and there are commercial compilers as well.
···
On Monday 24 June 2002 05:51 am, Steve Merrick wrote:
I start a new job shortly, and I have to maintain an 8051-based
assembly-language program. I have already been told that one of my
first tasks will be to consider migrating it to a new language, to
ease the difficulty of finding people to maintain it. Being
8051-based, resources are at a premium. It occurs to me that
embedding Ruby is one possible option. Is there any information
available on how to do this? Does one just build the source code
(in C), and bundle a Ruby script in with it? Any hints gratefully
accepted.
I start a new job shortly, and I have to maintain an 8051-based
assembly-language program. I have already been told that one of my first
tasks will be to consider migrating it to a new language, to ease the
difficulty of finding people to maintain it. Being 8051-based, resources
are at a premium. It occurs to me that embedding Ruby is one possible
option. Is there any information available on how to do this? Does one
just build the source code (in C), and bundle a Ruby script in with it?
Any hints gratefully accepted.
Hmmm… unless somebody has built a very stripped down version of Ruby or
unless the 8051’s address space has been seriously increased since I
worked with 'em back in the late '80s, I really doubt you’ll get Ruby to
work in that environment. As I recall the 8051 addresses 64K, but there
were some other versions that came out that could address 128K by use of
some special tricks. I kind of doubt you would be able to get Ruby to
play in that small of an address space and still be able to run any useful
programs with it… Could you convince’em to move to the StrongARM?
“Who cares, wins”
P.S. I’ve seen stuff about ‘eRuby’ - which I assume is ‘embedded Ruby’,
but I can’t seem to find it again…
I think eRuby has something to do with embedding Ruby in HTML… not what
you think.
On Monday 24 June 2002 05:51 am, Steve Merrick wrote:
I start a new job shortly, and I have to maintain an 8051-based
assembly-language program. I have already been told that one of my
first tasks will be to consider migrating it to a new language, to
ease the difficulty of finding people to maintain it. Being
8051-based, resources are at a premium. It occurs to me that
embedding Ruby is one possible option. Is there any information
available on how to do this? Does one just build the source code
(in C), and bundle a Ruby script in with it? Any hints gratefully
accepted.
Ruby is a heavy user of RAM. It’s unlikely that it would be a good
choice for your system. It’s also not small itself:
Though I hate to say it, your best bet is probably to use C. There is
the SDCC compiler (http://sdcc.sourceforge.net/) which is free and
targets the 8051, and there are commercial compilers as well.