[PLUG-Devel] RAD for hardware control? Java? Something?
daniel at wolstenholme.net
daniel at wolstenholme.net
Thu Dec 14 16:20:47 MST 2006
It seems to me the best application to do this in would be straight C. If you
want a Java front-end to make part of the program cross-platform, and to do GUI
stuff, it'd be pretty easy to do that.What OS is this going to be running on?
I'll assume Linux since this is the PLUG list.Issuing specific serial data is
actually pretty easy in Linux; you just send your data to /dev/ttySx, as long
as you have permissions set properly. Issuing specific SCSI or IDE commands,
on the other hand, is probably somewhat more difficult. I could be mistaken,
but it seems to me that you'd probably need a custom device driver which takes
input from a user-space program and sends those commands over the SCSI/IDE bus.
As for the attributes of Java, why not just use the best tool for the job at
hand, instead of working about what the "suits" know about? Or using a
combination of tools? Again, if cross-platform capability is important to you,
then Java would be useful. However, with something so hardware-specific, I'm
not sure I see why cross-platform ability is useful at all. If a GUI interface
is important, and you already are familiar with GUI programming in Java, then
that's a big plus. If, however, you're more familiar with GUI programming in
C++ with some toolkit (e.g. Qt), then that would be a better choice. Don't let
unimportant reasons dictate your choice of development language.Dan>I'm looking
for a good, non-MS, non-BigEmbeddedProrpietaryHighCostVendor>rapid development
tool set.>>I am not a Java developer, just a dabbler and very little of even
that.> However, Java has much going for it as a rapid application development>
(RAD) language.>>- - Soon to be (already?) released as GPL (Way cool!)>- -
IDE's with pretty GUI development tools>- - Large knowledge base>- - Well known
to the "suits">- - Lots of tools>>However, where I work, we need RAD for
hardware. We need to write>programs that issue specific SCSI or IDE or serial
commands. That poke>register values and manipulate controllers.>>Can Java do
these things? Can it be extended, without too much>additional work, to do
these types of low-level hardware operations?>>What about other languages like
Python or TCL?>>Linux is "taking off" in the embedded world but the
hardware>manipulation level is still dominated by closed source tools. I
want>FS/OSS tools and a community to go with it.>>Jon M. Hanson wrote:>>
The problem is that Java isn't a "bare metal" language. Java runs in >> a
sandboxed virtual machine which translates the Java bytecode into the >> native
machine language on the fly. Because of Java's ability to do >> cross-platform
without any code modification, it would not be possible >> for it to peek and
poke at hardware registers like you want it to >> because that would violate
the cross-platform ability (not all platforms >> have those specific registers
at the same location) and it is a security >> risk as well.>>This is exactly
what I suspected. Thanks for that education.>>But if writing the hardware
interface in C or C++ is hard enough, might>as well just write the entire
application in C.>>I'll have to think about this more... Continued discussion
very welcome.>>Alan
More information about the PLUG-devel
mailing list