|
by Liu Kai
Start ý Sales
Front-End Online ý Custom Software Service
Online ý Software Engineering ý Documentation
ý Utilities for Debugging and Production
ý GUI and OLE ý The
Benefits ý Sources and PDF
Using Perl in embedded software development
was not originally my idea. I was inspired by Bruce Lightnerýs PicoWeb
design, which consisted of a small web server in a microcontroller.
Perl is used with a DOS batch file and some other utilities to transfer
the know-how and whole design to other designers. This led me to survey
Perl in embedded software development. After reading a lot about Perl
applications in a book and on several web sites, I found that Perl
is a good tool for assisting in embedded software development.
Embedded software is a term that covers
a large spectrum, ranging from embedded computing to small microcontroller
applications. In this article, I will talk about the software (or
firmware) developed on low-end microcontrollers. Although development
tools continually increase in power, embedded software engineers always
work in a worse environment than those creating desktop applications.
A poor toolchain could be a simple ROM-monitor running in a target
controller with no source-level debugger, simple assembler, or programmer.
And, sometimes itýs worse, like when only a simulator or programmer
is available. That means that you have to key in a lot of commands
in the debug session. And, itýs hard to identify the bugs and the
process is slowed down.
Most of the source code has to be written
in assembly, and the architecture is hardly kept clear. I tried to
find some tools to save me from doing the same thing everyday. Thatýs
where Perl came in. Because Perl is open-source, any developer can
get the code and modify it for his or her own purposes. In fact, I
am writing some Perl scripts to generate custom make files, assembly
converters, code templates, and other utilities.
Perl is a language developed in UNIX
and is popular as a CGI script for web applications. One advantage
of Perl is in its text handling. It is a powerful script language,
which can operate in UNIX, Linux, Windows32, OS/2, and Mac. Many attractive
features include networking, object-oriented programming, GUI, OLE,
and more. Table 1 is a review of a typical development process for
(embedded) software development, identifying potential replacements
and improvements with the help of Perl.
|
Without Perl
|
With Perl
|
|
The sales team would get the
customersý inquiries.
|
Perl can handle the inquiries
from the web siteýs customer form.
|
|
The sales team would forward
the inquiries to the software engineers or project manager.
|
Perl can do it through an intranet.
|
|
The developer would send the
specifications back to the customers or sales team for approval
and further negotiation.
|
Perl can generate documentation
based on templates and the customersý demands and forward
it on to everyone involved.
|
|
The developer would start to
develop the project based on the specification.
|
Perl can help retrieve software
modules from existing code databases, generate make files,
and make custom code. The customer can retrieve the code via
e-mail after sending the inquires, providing no additional
error occurs.
|
|
Documentation is a key issue
in keeping the software architecture.
|
Perl has its own method to help
the programmer write, code, and document into one file and
then generate the required documentation format specified.
|
|
Table 1ýHere you can see how
Perl could potentially improve the development process, making
it faster.
|
Perl can also be used as an agent to
browse the whole software catalog and then compose an abstract of
software modules, easing the learning curve of a new software module.
During debugging, Perl can help the developer
debug the code and keep track of the process. And during production,
Perl can help the manufacturer test and program the devices. Because
Perl is open-source, the whole toolset is constantly changed and updated.
And seeing that it has its own GUI, Perl is useful for setting up
a Windows version in development and making a graphic device driver
(LCD, OSD).
Teamwork is important in developing a
project, and because Perl is a language of networks, it can be easily
achieved based on the Perl script. You will find that all the processes
will run faster because your database is increasing in size during
the processes.
Using Perl is not a new idea, but it
has not been popular in embedded software industries. However, Perl
will help embedded engineers in the areas of software engineering,
automation in definition, documentation, coding, debugging, production,
and almost every other session of development. It really makes the
development easier and faster.
Now, letýs follow the development process
and see how Perl can help.
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |