Professional Documents
Culture Documents
Standing between
various buses, Ethernet and USB. Development
Why should free software be chained to keyboard, mouse and screen? In the first of a boards with stuff like flash and 2.6.10 on board
are readily available, with core CPUs such as
compelling and practical two-parter Martin Howse examines open tools which allow for
hardware and software PowerPC abounding, but most GNU/Linux DIY
SoC work takes place within the burgeoning
embedding computation deep within the environment. FPGA scene under the hardcore LGPLed LEON2
and coder, interface in the field very much to the fore, are a tough
Let’s Get
call to explain satisfactorily without some degree
of low level knowledge of logic, processors and
Physical
further tethers of an OS which can penetrate tentacle-like downwards
into hardware.
Indeed, with OS defined primarily as both reliable and standard
interface and manager of resources, in our world of open,
environmentally embedded hardware it’s a tough call to decide exactly
what needs managing and how to go about this awesome task.
That said, it’s perfectly feasible, given some awareness of how a
full-blown OS may condition our device, to run with uClinux, a port
to small and MMU (Memory Management Unit) deficient systems. Early test prototype shows three ap0201 modules connected
including main computational board, charging circuitry and
The advantages here include ease of porting for already coded apps microphone pre-amp
or those that lend themselves to a high level language, and hassle-
free hardware support if you’re looking to interface to a full-blown for Very High Speed Integrated Circuit, is
Von Neumann style architecture, or to other machines by way of high favoured in Europe, and such described code is
level protocols or, say, a wireless interface. It’s an approach with a then synthesised and uploaded to the FPGA
A modular design helps in debugging embedded devices with both hardware and software tested in easy stages
good deal of overhead both power-wise and conceptually but it rather than being used to fabricate costly silicon.
works for a good many more conventional projects. On the hardware With the correct software in place, a decent
side, and of course well supported by the GNU/Linux toolchain, sized FPGA could function as well defined DSP
P
comprising GNU binutils, compiler set (GCC) and debugger, and one moment, offering up a bank of filters, or
pushing forward the uCsimm approach of a good few years back, the SoC after another upload. It’s most definitely soft
Gumstix Basix platform is very much de rigueur in such embedding hardware and several scientists have thrown
hysical computing is all about freedom Gate Array) led designs. And though embedding is commonly circles. As the name would suggest Gumstix are the size of a stick of genetic algorithms (GA) into the mix to grow
from a highly restrictive desktop bound used to refer to any specialised system which is embedded within gum, lightweight and offer comparatively low power consumption circuits which exhibit extraordinary properties.
modus operandi in favour of new ways an often hidden purpose built device, for example an internal stats. Performance under the Intel XScale is good, and a 2.6.10 kernel To demonstrate the sheer versatility of FPGAs,
of approaching code and computation. missile guidance system, it’s possible to extend the definition to boots from flash to interface to optional Bluetooth, CF or RS232. hobbyists have even succeeded in fitting the
Whether it’s about examining imaginative talk about embedding in a wider sense and to use such systems, Gumstix are perfect for a wearables project which needs to interface innards of a range of old-school arcade games,
modes of input and output, conditioning fresh perhaps within an artistic context, to refer to notions of to a PDA or wireless enabled desktop. Indeed, the author first including Pacman, into a single and CPU-sized
responses in the user, investigating wearable environmental computing under which factors other than tightly encountered them in use within this context at the Piet Zwart Xilinx Virtex chip. In the case of our friend
processing or, at an other extreme, embedding bound I/O enter the computational equation. Institute in Rotterdam, where media students were constructing an LEON2, which is commonly implemented on the
sensor rich machines in extreme environments, Embedded systems are all about embedding; laying down within audio narrative weaving jacket based on the platform. popular, but now discontinued Xess XSV-800
getting physical is tightly bound with a free a wider context which involves the physical. And within these development board based around a Virtex FPGA,
software model. terms, the notion of an interface is well untied from casual modes SOC IT TO ME GNU/Linux has been ported to run on the
Within a domain which stresses black boxing of thought. Indeed, standing between hardware and software and Development under a familiar OS and GNU toolchain is one way to SPARC-based core, with further SoC components
of software by the device in question, using between software and user or coder, interface is a ripe area for go for projects which adhere to more conventional conceptual thrown in by an active community of hackers.
free software in this environment is essentially further investigation - especially under the exposure of the overlap architectures, or which can leverage additional memory and code to FPGAs are a tricky matter, with key
all about visibility; devices which are otherwise of both hard and soft enacted by reconfigurable computing. add virtual machine layers, but physical computing aficionados have documentation, particularly with reference to
totally opaque in relation to underlying tech Although, as we’ll see, we can readily interface microcontrollers a good many more radical choices in reserve, which play well to low cost development on a GNU/Linux platform,
become open and hackable, schematics are and the like to a range of sensors, ranging from basic ADCs and varying degrees with a GNU development platform. Next down the hard to find. Issues ensnared with physical
exposed to further development, interfaces are DACs for audio capture and response, through to less apparent hierarchy in terms of complexity and overhead we find the SoC, or computing are well exposed by these complex
laid wide open and even processor designs can analogue data collectors such as accelerometers and magnetic field System-on-Chip, processors which are very much in favour currently devices which will receive full illumination in the
be readily implemented without encumbrances sensors, physical computing is more about running wild with a at the industrial end of the spectrum. next instalment.
under extreme FPGA (Field Programmable close knit of code and interface. As the name implies, it’s all on board; CPU, RAM controllers, SoC processors, whilst usually employed in
The main ap0201 WHAT’S GNU GOT TO DO WITH IT? would be to upload hex assembled from simple
board shows bulky Running wild in the embedded field with a manufacturer or code, for example flashing an LED hanging from
battery backed-up interpreter defined instruction set is one thing, but, aside from a one of the PIC’s digital ports. GPUTILS includes
NVRAM on the left, suitable development model for PIC code, what’s GNU got to do with gpasm, the GNU PIC assembler, and the linking and
large PIC16F877 anything? And how can we quickly and efficiently develop for such a combining functionalities of gplink, gplib together
bottom right and platform whilst shying away from commercial development kits and with a range of disassemblers and other useful
assorted logic softwares? command line tools. At its most basic, before
Until recently, GNU PIC tools have suffered from a lack of exposure, or getting bogged down in directives and relocatable
at least some degree of denigration in comparison to closed source code, gpasm quite simply converts our assembly
counterparts which, under the gloss of the commercial, can well appear source file of human readable instructions into hex.
as of more industry strength. And though a central repository for a range The resulting file can then be written to the PIC by
of GNU tools does exist, it’s somewhat less than complete and lacks the way of PICprg and friends. Alternatively, those used
total breadth of other PIC sites which embrace know how, code and Prior to unpacking and embedding, after one to a more integrated approach will relish the
month debugging and rigorous testing ap0201
the MIDIbox hardware platform is an open tools under all platforms. In the face of tackling a trinity of hefty learning devices are ready for deployment recently developed PIKdev IDE which backs up
sourced project which offers a range of PIC- curves which involves tackling hardware data sheets, learning instruction editing and project management functionalities with
based MIDI hardware projects for implementing sets and GNU tools, it’s little wonder that newbies turn to limited the good old GPUTILS, cpik PIC18 C compiler and a
knob boxes and synthesisers galore. Such a solutions such as the Parallax BASIC Stamp or to well specified IDEs. It programming engine to deliver the goods to the
project is a good start for those new to both PICs has to be said that proprietary solutions imply containing and in the field SPEAKING THE RIGHT LANGUAGE hardware.
and interfacing to the humble PC. Moreover, key of knowledge such an approach can win out over the heavily Free software which actually gets your code onto the PIC is one thing, but With correct hardware attached it’s as simple as
developer Thorsten Klose’s MIDIbox Operating decentralised. Peer reviewed and daily updated community resources are it’s very unlikely, though of course possible, that you’ll be programming that. Or at least it should be. The embedded
System (MIOS) seriously lowers the entry level the only answer; open sourced Pd has won out over centralised Max/ the chip in raw hexadecimal, the internal base 16 code of the PIC. How we embrace of hardware and software is tough to prise
for coders new to the PIC and can be used for MSP on these very terms. talk to the PIC is an important choice which raises all sorts of issues relating open for the purposes of debugging and what can
control-led real-time MIDI and non-MIDI based In the first instance, reducing choice is a good thing. After newbies to programming language and practise. Indeed, many artists and novice go wrong will go wrong. Although it’s far more
applications. With schematics for sample projects have the hang of basic tools which get the job done, other avenues can embedders choose to work with a costly pre-programmed PIC, the satisfying to make use of serial debug facilities a la
online, and rich API documentation, MIOS be sniffed out and new methodologies explored. Thus, the necessary Parallax BASIC Stamp 2, simply because it can readily be programmed in printf, or LED-led morse code style message
makes for a complete and free development and established GNU toolkit will be outlined here with reference to a few simple PBASIC language by way of an on board interpreter. Another exchanges, simulation by way of Gpsim, the
environment which can well be compared to DIY programmers and a limited range of PIC micros. After all, if you’re approach would be to simply compile code written in C or a custom GPUTILS compatible simulator which throws in
other initiatives of note such as the Smart-Its interested in building your own machines, why go all IKEA with the language such as JAL into assembly language according to the specific advanced components such as LCD screens and
project, which is all about embedding programmer hardware? A vast array of DIY programmers exist within a instruction set of the chip and then burn this to flash using the GNU tools LEDs, can prove very useful if something is seriously
computation within the big bad world, or the rich family tree of freely documented modifications well worthy of study above. A free software toolkit could thus be specified comprising compiler, wrong and it can certainly help narrow down
Art Interface Device (AID) platform. by any genealogist. At the head of the tree we find David Tait’s assembler, if we choose that route, and choice of programmer. problems to software or often flaky hardware. Of
Aside from a perhaps secondary role as programmer, and, a particularly minimal favourite, the NOPPP, or no Within any workflow it’s worth working mentally through the steps course, certain laws dictate that the last place we
interface, tough old PICs make great parts PIC programmer, which nevertheless does fall foul of any trade which lead to hex hitting the PIC; a series of steps which includes all look will prove most revealing but it’s tough to
embedders, and Microchip offer a vast range descriptions act. Both of these originally, and under most variants, hang important acquaintance with PIC instruction set by way of Microchip’s second guess that magic spot.
of processors to suit most needs, from tiny off the parallel port and can be coaxed into attacking a range of devices, excellent data sheets. The choice
surface mount eight pin affairs, as used by folk with small 16F628 (pin compatible with the now obsoleted 16F84) and of whether to work within high
at the University of Massachusetts to 40 pin 16F877 workhorse as the hot favourites. Indeed, the choice of a level language or assembly, or to Key Links
implement a match head sized Web server, mix and match both (see Desert
Gumstix
through to 40 pin DIP mounting monsters Devices) can only really be www.gumstix.org
such as the trusty old 16F877 which packs in a In our world of open, environmentally attempted after such an exercise, Microchip PIC
www.microchip.com
fair amount of ADC functionality. New on the and it must be said that the
block is the dsPIC line of chips which, as the embedded hardware it’s a tough call to register and data juggling which
MIDIbox
www.ucapps.de
Smart-Its
name implies, throws DSP functionality into an raw PIC coding is prone to does
already rich mix. Architecture-wise nearly all decide exactly what needs managing offer its own rewards and insights
www.smart-its.org
AID
PICs usable for DIY embedding pack in varying into computational process. aid.interaccess.org/drupal
amounts of flash-based program memory, and how to go about this awesome task Larger projects, which the Match head sized web server
www-ccs.cs.umass.edu/~shri/iPic.html
which allows for in-circuit re-programming, increased code size of newer PICs NOPPP
plain old RAM, EEPROM for non-volatile encourage, may well cry out for www.covingtoninnovations.com/noppp
NOPPP Linux software
storage of state and the like, and a variety of I/ suitable PIC will well condition which DIY programmer variant to kick off structured C programming, patearl.net/projects/pic
O subsystems. UARTs are both handy to have with. The 16F877, which packs eight 10-bit ADCs, decent-sized memory, perhaps mixed with assembly PICprg
on board and thankfully commonplace, a reasonable 20 MHz clock-speed and a sufficient number of timers and routines which can attack bit- www.brianlane.com/software/picprg
Broccoli18
enabling easy serial communications between interrupts into a low-power, medium sized package, has long been the bound I/O. Yet, until relatively recently PIC programmers on a GNU/Linux Gpsim currently home.earthlink.net/~davesullins/software/pic18f.html
devices such as a PC and the micro itself. For DIY embedder’s chip of choice. Both Tait and NOPPP exhibit variants platform had little choice but to put up with assembly or bed down with a presents some Oddysey
truly standard RS-232C interfacing PICs must which can burn code into the 877 under GNU programming tools such commercial compiler such as c2c or CCS PCHL compiler. Thankfully SDCC, seriously powerful
www.desert.cx/odyssey
Picp
be beefed up with the a simple chip which as PICprg and specific NOPPP Linux software. the Small Device C Compiler, which now targets a good range of functionalities and home.pacbell.net/theposts/picmicro
takes care of ugly voltage level issues. Coders Over the last year a brand new PIC, the PIC18F452, which is pin microcontrollers, including our favourite PIC models, as well as other tiny it’s well worth piping SDCC
sdcc.sourceforge.net
used to the world of the digital do well to shy compatible with the 877, has pipped the older model to the post with devices, has snowballed since the early days. SDCC, which offers full ANSI code through just to GPUTILS
away from the analogue realm and thankfully more flash, more RAM, new instructions and a faster clock speed at more C and a range of optimisations and also includes a simulator and check for basic gputils.sourceforge.net
ubiquitous chips such as the MAX3221 or or less the same low price point. Both PICprg and NOPPP related debugger, is well documented online as to its use, and will readily generate mistakes before Gpsim
sourceforge.net/projects/gpsim
MAX3222 take care of all issues with few hardware and software may need to be modified to work with this chip, PIC friendly Hex code. Example code is available for study, but it’s worth committing to flash PIKdev
additional components. When coupled with but two projects, Brocolli18 and Odyssey, exist which can make light stressing that commercial compilers, attacking a specific range of pikdev.free.fr
the use of a reasonably high level language work of such modifications. For those who value sheer flexibility over a microcontrollers, are able to provide simpler library routines for I/O. Desert devices
www.1010.co.uk/devices.html
such as C, by way of a decent compiler, serial DIY approach, Microchip’s very own Picstart Plus pre-built programmer, To do anything useful under SDCC, the full GPUTILS suite of GNU PIC Wloader
abilities make for easy debugging of devices compatible with a vast array of microcontrollers is readily accessible by tools will have to be installed, and it’s also very useful to have these on www.voti.nl/wloader/index_1.html
LINWLOAD
in the field. way of the free software Picp or GUI Gpicp interface. hand for testing purposes. Having built a programmer, the next step www.ise.pw.edu.pl/~wzab/linwload/linwload.html