Electronic Design

EiED Online>> Developing ARMs

We are being inundated by standard 32-bit, ARM7TDMI-S-based microcontroller these days. Almost every major microcontroller vendor has their own version. Likewise, there are a host of tools available. Some are real bargains-like the two we examine here from Keil and IAR. Both utilize a Philips LPC2148FBD64, part of the LPC214x family. The third kit in the bunch, from Oki Semiconductor, comes with an ML67Q4051 processor, part of the ML67Q40x0 family. It also comes with IAR's tool suite.

The development kits come complete with software, tutorials, development board, and JTAG emulator. Versions are available without the JTAG emulator, in which case debugging is handled through the serial port. All boards include a pair of serial ports.

Don't jump to the end of the review to see if there is a winner in this comparison because the only winner will be you-the user. Keil's and IAR's tool suites are well polished and extremely functional, as are their development boards. You will not be disappointed with either one of them.

There are aspects of each vendor's offerings that might sway you one way or another. For example, IAR's visualState, an optional tool, provides a graphical design methodology for building state machines and the associated C code to integrate into your application. Likewise, Keil has a range of stacks for protocols such as TCP/IP and CAN, as well as their own set of operating systems. Of course, their development boards have unique aspects that might help you get your application out the door more quickly.

Reaching A Plateau
Not all development kits are created equal. It is next to impossible to compare them all directly, except in an instance like this where the target chip is the same. However, there are ways to provide you with a relative comparison of quality.

I've come up with a rating system based on four plateaus:

  • Plateau 1: Their world
  • Plateau 2: Hello world
  • Plateau 3: My world
  • Plateau 4: No limits
  • How long it takes to reach each plateau, or if it is possible to reach them, can provide you with an idea of how well a kit may meet your needs. Likewise, there is the level of quality achieved by the product at each plateau.

    Plateau 1 shows off the hardware. Does it do something out of the box? The worst case is simply a power LED that lights up. The other extreme is demonstrated by Keil's board that delivers an audio response when plugged in.

    Plateau 2 is the creation and debugging of the quintessential "HelloWorld.c" program. It is essentially the simplest application that shows the board is working. It should be something provided with every development kit. More extensive tutorials improve the quality of experience at this level. Some demo kits may limit users to this level by providing some parts of the application in binary form, or by limiting the toolsuite used to create the applications.

    Plateau 3 is what it takes to build your own application versus making modifications of an existing application. Project-creation wizards make this level of support better. Kits that reach this level are suitable for application development, although they may be limited in the size of application they can create.

    Plateau 4 may be desirable depending upon the user's requirements and the capabilities of the development kit. In this review, the solutions from Keil and IAR reach Plateau 3 with flying colors, but both are limited to 16-kbyte applications. Plateau 4 requires upgrading the software tools to remove those limits.

    A development kit is a worthwhile development platform at Plateau 3. Demo kits are often limited to Plateau 1.

    The Chips
    Reviewing a group of development kits can be difficult if the hardware and software are similar but not identical. Luckily in this case, the base microcontroller in two of the kits is the same. Furthermore, the chip in the third kit-the Oki Semiconductor kit-is in the same class and uses the same basic core: ARM's ARM7TDMI-S 16-/32-bit architecture.

    Philips Semiconductor's LPC2148FBD64 (see Fig. 1) microcontroller supports the ARM and Thumb2 instruction sets. It's part of the LPC214x family and comes in an LQFP64 package.

    The processor runs up to 60 MHz and it comes with 64 kbytes of 128-bit-wide flash with ISP/IAP (in-system/in-application programming) support. Models are available with up to 512 kbytes of flash. Smaller versions are available as well. The family supports SRAM capabilities from 8 kbytes to 40 kbytes. This chip has 32 kbytes.

    The chip supports fast IO via the ARM local bus versus the slower peripheral bus. However, the same IO ports can be accessed using either method, allowing legacy code to continue to operate correctly. Vectored interrupts handle up to 21 of these pins. The chip runs off 3.3 V, but the IO ports are 5-V tolerant.

    Analog peripherals include a 10-bit DAC and two 10-bit ADCs with a 2.44-μsec conversion time. Digital peripherals include six PWM counters and two 32-bit timers. And serial communication includes two UARTs, two 400-kbit/s I2C interfaces, plus an SPI/SSP interface.

    There is a USB 2.0 full-speed device interface. This chip has 8 kbytes of endpoint RAM with DMA support in addition to the standard SRAM.

    The chip has a little of everything. It supports JTAG and ARM's embedded trace support, although neither development board comes with connectors for the latter. In addition, it supports a range of low-power modes, making it ideal for battery-based applications.

    Oki Semiconductor's 33-MHz ML67Q4051 has a complement of memory and peripherals similar to the Philips chip. Oki's offering comes with 64 kbyte through 128 kbyte zero-wait-state flash memory and 16 kbytes of SRAM, but it also sports an external memory controller. A lower pin count version is available without this controller.

    Its analog complement consists of a four-channel, 10-bit analog-to-digital converter. Digital communication is comparable with a pair of serial ports, I2C, two SPI ports, and an SIO port. It lacks the USB client, but adds an I2S audio interface that will provide superior audio performance compared to the Philips part. The latter can handle audio applications, but the Oki part excels in this area. The Oki chip also has the usual timers, DMA channels, and parallel IO. It does not include the fast IO found in the Philips part.

    The two chip families share a common core and peripheral set, but there are differences that will make most developers choose one over the other. It all depends upon the application.

    The Boards
    IAR's board (see Fig. 2) includes a two-line by 16-digit smart LCD display with contrast control. It supports both serial ports, although one is used as a debug monitor interface if the JTAG interface is not used. There is no trace connector installed.

    The board has a USB client socket along with an SD flash card socket. There are two large push buttons, a reset button, and a potentiometer that is connected to one of the ADC ports.

    Power can be provided by an external power brick (not included) via the USB client port or via the JTAG interface. The board comes with a JTAG interface and a single USB cable that can be used with the JTAG interface or with the on-board USB client.

    The prototyping area is large and the IO pins are available via two headers. One provides an easy way to connect a cable to another board.

    Keil's board (see Fig. 3) is a bit smaller than IAR's board. It does not include the LCD found on the IAR board and the patch area is significantly smaller. Keil also included plated holes for headers to access IO pins on the microcontroller, but you do need to solder the headers.

    The Keil board also includes a JTAG interface and skips the ETM interface. The pair of serial ports can operate in the same fashion as IAR's board, allowing one to be used for debugging in lieu of the JTAG interface. Keil's offering came with a JTAG interface and a pair of USB cables.

    One interesting aspect of the board is the lack of a power connector. Power can be supplied by the USB port or JTAG port. Not using the USB interface? No problem. It can still provide power. It is definitely easier to find a standard USB cable than the plethora of options for power jacks. This could be the end of power bricks for development boards. Power can be obtained from either source as there is no jumper selection as on the IAR board.

    The Keil board does have plenty of output options in addition to a reset button, a push button, and potentiometer input options. There is a set of eight LEDs and jumper pins that can be used to configure the system. There is also a speaker suitable for a range of audio outputs, including voice, although this is an area where Oki's chip shines.

    Oki's board (see Fig. 4) is a bit different from Kiel and IAR's boards. The Oki board does not have a patch area, but it does bring out all the pins to female headers found on the bottom of the board. This makes it easier to plug into a carrier board that would contain application-specific interfaces. The four headers are offset, making it impossible to plug in the board incorrectly.

    It is possible to greatly expand the memory capacity as all of the pins for the external memory interface are brought out. The board actually includes 512 kbytes of SRAM. The board also has a single-digit LED display, buttons, and a potentiometer. Power is supplied by an external power brick.

    The boards have slight differences like Keil' LEDs and speaker and IAR's LCD. The one that will appeal to you will depend upon your application and the amount of external peripherals and wiring you will need to add to it.

    All the boards reach Plateau 1 out of the box. Keil's own Philips kit is slightly more impressive. Connect it to a PC and the USB device is detected followed by an audio explanation of the board. IAR provides status information on the LCD.

    The Software
    The boards are similar, and so is the software. Here are some of the features common to both. First, there is the host platform: Windows. Second, there is support for assembler and C. IAR supports C++. The Keil gcc support handles C++. Most developers tend to stick with C, but having access to assembler is indispensable for interrupt routines.

    Installation for both was similar. Pop in the CD and a menu-driven interface walks you through the JTAG emulation software installation, and then the installation of the development tools followed by additional tools and sample applications and tutorials.

    Both provided good Plateau 2 and Plateau 3 experiences. I was able to reach the latter with both packages in one day. As such, I can highly recommend both products.

    Both have 16-kbyte code limitations that prevent a move to Plateau 4. Oki's code limit is 32 kbytes. These tools can take advantage of everything on the board except the extra flash memory (64 kbytes), or, in the case of the Oki board, 512 kbytes of SRAM. There is no limit on the use of flash or SRAM for data.

    Now for some details on the differences between the software packages.

    IAR Software
    Although the IAR installation requires online registration, you can get up and running for 30 days before that is necessary. The main difference between the Philips platform and the Oki platform are the demo applications.

    Oki's AME-51 comes with a set of pre-programmed applications that can be run in standalone mode using the switches and buttons on the board. This handles Plateau 1 very well, but it is the demo applications that make the difference in Plateau 2. All of them can be examined in an afternoon.

    There is a USB mouse demo with the Philips package that shows off the USB port. It uses the two buttons for left/right movement and the pot for up/down movement. Just plug it into a PC and check it out. It works with any OS that handles a standard mouse USB device including Windows and Linux. The standard drivers are used so there is really nothing to install.

    The USB mouse demo is a rather extensive Hello World program. It was a bit more difficult changing the HID product string, but I did find it. Oddly, the code for the string looks like:

    const char ProductStr\[\] =
      /* String descriptor 2*/
      98,   // bLength
      0x03, // bDescriptorType
      'I',0,'A',0,'R',0,' ',0,'E',0,
      'e',0,'d',0,' ',0,'W',0,'o',0,
      'c',0,'h',0,' ',0,'A',0,'R',0,
      'M',0,' ',0,'-',0,' ',0,'H',0,
      'I',0,'D',0,' ',0,'D',0,'e',0,
      'v',0,'i',0,'c',0,'e',0,' ',0,

    This is actually a USB 2-byte character encoding, not a limitation or problem with the software. There are plenty of other applications to play with. The docs that describe these applications are very good and provide enough hand holding to get familiar with the IDE and the board.

    The IAR Embedded Workbench (see Fig. 5) is a workspace/project-based development environment. It has multiple panes within the main window and most of these can be tabbed-as with the edit window-when multiple files are open. The interface does not support different perspectives, as in Eclipse.

    The Workbench has a very nice, extensible template interface. It has hooks for source code control, although the feature is not enabled until you have that service installed. It is not always necessary for small projects or for evaluations.

    The online help is extensive and very good overall. There are links to a range of PDF-based documents covering things like the ARM assembler.

    The Workbench comes with a simulator. This is very handy for testing subroutines that do not interface directly with peripherals. It can check access of memory ranges, making debugging easier.

    The C compiler supports MISRA C. MISRA (Motor Industry Software Reliability Association) specifies a number of rules that make it harder to create mistakes using C. It is disabled by default, but it can be enabled on a per-project basis. Individual MISRA rules can be disabled as well.

    The debugger supports a range of JTAG interfaces like Macraigor, not just the J-Link that is included with the package. It also handles the Angel debug monitor.

    The IDE is snappy and the editor provides color coding support. The C-Spy debugger supports macros and you can include a number of macro files in a project.

    A 20-state version of visualState (see Fig. 6) is included on the CD. Many embedded applications are easily implemented using a state machine, and visualState makes this process not quite painless, but close to it. Even a 20-state application can be quite useful depending upon the environment.

    Overall, IAR's Workbench is a polished development environment targeted at embedded developers. It provides the hands-on disassembly that low-end debugging requires, as well as handling C++ with structure/object navigation.

    Keil Software
    Keil's installation is very good. For example, it sets up the system with a "hello.c" project and includes other sample applications in the recently used list. This made moving through Plateau 2 quick and simple because there was no bouncing between the IDE and a web page or PDF document.

    The development environment must also address a range of options because you don't have one but two compiler options. There is the Keil CARM compiler and the GNU gcc compiler. I used the former since I had plenty of practice with the gcc compiler. The advantage of the latter is that it will be compatible with other applications developed with gcc.

    The CD does have a number of 5-minute animated videos that address most major aspects of the IDE and development. They are pretty good presentations using Lotus ScreenCam. Experienced users can bypass these if they want to get their hands dirty in the IDE like I did, but it is worth going through them to find some features you may have overlooked.

    Keil's uVision3 (see Fig. 7) is on par with IAR's Workbench. Of course, there are pluses and minuses compared to each other. For example, Keil's editor templates have a dialog box interface instead of text files. Keil supports a single definition for a file type while IAR supports multiple definition files.

    One feature I like in Keil's offering is outline support. This feature can compact a C file so only the function names are listed. These can then be expanded as necessary. It is a very useful feature that is found in a number of other IDEs, although not in IAR's. Keil has done a very good job implementing the outline feature. For example, it is possible to let the cursor float over some compacted code and have a popup window with the code appear.

    Script templates are a feature in the simulator that make Keil stand out. It allows the simulator to simulate digital and analog peripherals. For example, it can handle UART and CAN peripherals at a high level or analog inputs using input streams with things like square waves or noise. There is even a logic-analyzer recording mode that handles up to 256 variables.

    Keil includes a copy of Code Architect. It is a tool that can generate code for a variety of languages and processors, but this version generates C definitions for a particular Philips processor.

    If you like some of these features, then Keil may be the tool for you. Likewise, there are some features in IAR's IDE and options such as MISRA C or visualState that could also swing your choice in that direction. In either case, the underlying toolset is solid and extremely functional. Make sure the basics are covered and then check out the differences to see what you like and what you can live with.

    Related Links




    Oki Semiconductor

    Philips Semiconductor

    Hide comments


    • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

    Plain text

    • No HTML tags allowed.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Lines and paragraphs break automatically.