Embedded CPUs

From ACCX Products Wiki
Revision as of 10:49, 16 October 2011 by Arclight (talk | contribs) (→‎ARM)
Jump to navigation Jump to search

Embedded Systems Tools

Overview of CPUs available for embedded development

This describes the major embedded CPU choices we have for developing the Open Access Control ecosystem.

Note that some of these products have well-supported, free tool chains and libraries that can be redistributed without royalties. Others have only an expensive, licensed tool chain or a compiler/tool chain that is licensed to a commercial development board. Most are something in between, with some free tools that do the basics, and commercial products with more libraries, better code optimization, etc.


Atmel

The Atmel Corporation is based in Norway and sells a large variety of products, from simple 8-bit CPUs costing less thatn US$1 to sophisticated 32-bit products with on-board peripherals like CAN BUS and Ethernet.

Pros: Excellent tool chain support, lots of styles and price points to work with, the Atmega line is used in the arduino. Programming the chips is straightforward and supported iwth both GNU and commercial tools.

Cons: Atmel is known for supply chain issues. Long lead times and chip shortages are not uncommon. Hardware debugging requires an expensive, proprietary device.


Tool Chain

Compilers and IDEs

  • AVR Studio
    • Supports C/C++/ASM
    • Includes libraries and support for most of the Atmel product line
    • Includes support for various programmer devices
    • Available for Windows only, but will run in a VM
    • Commercial, but available as a free download from Atmel
  • AVR-GCC
    • Open-source C/C++ compiler,Assembler, linker program loader, etc.
    • Well-supported, works on Windows/Linux/MAC OSX
  • WIN AVR
    • Open-source IDE for Windows, includes full toolchain

Programmers and Debuggers

  • AVR ISP
    • Costs about US$59 from Atmel, available from many sources.
    • Can perform in-system programming on most AVR chips
    • Requires a 6-pin ISP connector to the board
    • Does not support debugging
  • AVR Kraken
    • Open-source AVR-ISP clone
    • Supported by AVR-dude and works with AVR Studio
    • Low cost
  • AVR Dragon
    • Sold by Atmel, offers on-chip debugging as well as full programming capability


ARM

The Arm Corp does not manufacture chips. They develop a line of 32-bit CPUs and micro controllers that are used in a variety of consumer, industrial and other devices. Their ARM Core designs are licensed to companies such as Texas Instruments and NXP Semiconductor. These chip makers often add various additional peripherals and features.

Compilers and IDEs

All Chips

  • IAR Embedded Workbench
    • Supports C/C++/ASM
    • Libraries and examples available for many vendors' chips
    • Includes support for various programmer devices
    • Available for Windows only, but will run in a VM
    • Commercial, expensive. Code-size limited and other version often available from manufacturers.
  • GNU ARM
    • Supports C/C++/ASM
    • Completely license free, includes most tools needed for development
    • Vendor-neutral, specific support libraries available for specific chips
    • Tends to produce less optimized code than IAR and other commercial products
  • Embedded LUA
    • Supports embedded development in the LUA Programming language
    • Cross-platform, high-level development possible
    • Compatible with both commercial and GNU toolchains
  • RTOS
    • Microkernel Operating System
    • Supports 27 different architectures
    • Offers ready-made TCP/IP and other primatives
    • Requires more resources than pure embedded systems
    • Can make robust real-time development easier


Texas Instruments
  • Code Composer Studio
    • Supports the Stellaris and other ARM-based chips from TI.
    • Lots of tutorials and examples available
    • Free versions that are locked to a dev board are available


NXP

Microbuilder offers a series of LPC1343-based boards and maintains a free toolchain.

  • Microbuilder Toolchain
    • All tools and most popular libraries are included
    • This chip does not require a JTAG debugger or ISP to program
    • Chip shows up as a flash drive and programs can be drag-and-dropped

PIC

One-time ruler of the microcontroller market, Microchip Technology's PIC microcontroller was once in just about every single electronic device you could buy. To date, they have sold over 6 billion chips.

The PIC line has literally hundreds of devices in current production, which allows a developer to find one that is nearly ideally suited to a specific project without paying for more chip than is necessary. As a result, PIC typically has the cheapest device for any one project, though individual chips may lack the sheer number of capabilities that might be found in a competing device.

PIC chips come in several families, but the 4 most relevant are:

  • PIC16 - 8-bit processors with extremely minimalist RISC instruction set.
  • PIC18 - 8-bit family with expanded instruction set including features like hardware multiplication and reduced need for banking.
  • PIC24 - 16-bit family, complete with real stack.
  • PIC32 - 32-bit MIPS-compliant processors.

Writing code for the PIC:

Because of it's stackless architecture and sometimes strange coding practices, PIC doesn't have a lot of open source support. There is currently no GCC toolchain or open-source dev project for the platform. But, that doesn't mean that it's expensive to get started. Here are some IDEs that are available.

  • MPLab - Most people get started with MPLab, because it's free and it's fanatically supported by its creator, Microchip. There is a huge community, and the software gets frequent updates whenever new devices are created or when bugs are found. Microchip are currently developing MPLabX which should work on OSX, Windows, and various flavors of Unix
  • MikroC - MikroElektronika offers a free download of their software MikroC Pro for PIC development in C. This version will allow you to produce up to 2K lines of machine code, which is sufficient for many projects. The full version is $250.