Embedded CPUs: Difference between revisions
m (moved Embedded Tools to Embedded CPUs) |
|||
(19 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
==== Atmel ==== | ==== Atmel ==== | ||
The [http://www.atmel.com Atmel Corporation] is based in Norway and sells a large variety of products, | The [http://www.atmel.com Atmel Corporation] is based in Norway and sells a large variety of products, | ||
from simple 8-bit CPUs costing less | from simple 8-bit CPUs costing less than US$1 to sophisticated 32-bit products with on-board peripherals | ||
like CAN | like [http://en.wikipedia.org/wiki/CAN_bus CAN-bus] and Ethernet. | ||
'''Pros:''' Excellent tool chain support, lots of styles and price points to work with | '''Pros:''' Excellent tool chain support, lots of styles and price points to work with. The Atmega line is used in the popular [http://arduino.cc Arduino Microcontroller]. Programming the chips is straightforward and supported with 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 | '''Cons:''' Atmel is known for supply chain issues. Long lead times and chip shortages are not uncommon. Hardware debugging requires a proprietary device. | ||
===== | =====Compilers and IDEs===== | ||
* [http://www.atmel.com/avrstudio AVR Studio] | * [http://www.atmel.com/avrstudio AVR Studio] | ||
**Supports C/C++/ASM | **Supports C/C++/ASM | ||
**Includes libraries and support for most of the Atmel product line | **Includes libraries and support for most of the Atmel product line | ||
**Includes support for various | **Includes support for various programming devices | ||
**Available for Windows only, but will run in a VM | **Available for Windows only, but will run in a VM | ||
**Commercial, but available as a free download from Atmel | **Commercial, but available as a free download from Atmel | ||
Line 32: | Line 30: | ||
**Open-source IDE for Windows, includes full toolchain | **Open-source IDE for Windows, includes full toolchain | ||
Programmers and Debuggers | * [http://www.insidegadgets.com/2011/04/30/move-from-arduino-software-to-winavr-with-programmers-notepad/ Arduino vs. AVR-GCC Toolchain] | ||
** How to step up from Arduino to the standard AVR-GCC toolchain | |||
=====Programmers and Debuggers===== | |||
* [http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2726 AVR ISP] | * [http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2726 AVR ISP] | ||
**Costs about US$59 from Atmel, available from many sources. | **Costs about US$59 from Atmel, available from many sources. | ||
Line 47: | Line 48: | ||
**Sold by Atmel, offers on-chip debugging as well as full programming capability | **Sold by Atmel, offers on-chip debugging as well as full programming capability | ||
==== ARM ==== | |||
The [http://www.arm.com/ 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 by companies such as [http://www.ti.com Texas Instruments] and [http://www.nxp.com NXP Semiconductor]. These chip makers often add various additional peripherals and features to the ARM-based chips they sell. | |||
More on the [http://en.wikipedia.org/wiki/ARM_processor ARM Processor]. | |||
'''Pros:''' Very powerful chips, available from the low Mhz range to 1Ghz+. Support a variety of on-board peripherals. | |||
'''Cons:''' Overkill for many embedded applications. Tool chains tend to be aimed at large professional customers and | |||
finding a good development environment and vendor-specific libraries for open-source projects may be challenging. | |||
=====Compilers and IDEs===== | =====Compilers and IDEs===== | ||
All Chips | ======All ARM Chips====== | ||
*[http://www.iar.com/ IAR Embedded Workbench] | *[http://www.iar.com/ IAR Embedded Workbench] | ||
**Supports C/C++/ASM | **Supports C/C++/ASM | ||
Line 60: | Line 66: | ||
**Available for Windows only, but will run in a VM | **Available for Windows only, but will run in a VM | ||
**Commercial, expensive. Code-size limited and other version often available from manufacturers. | **Commercial, expensive. Code-size limited and other version often available from manufacturers. | ||
*[http://www.mentor.com/embedded-software/codesourcery Code Sourcery] | |||
**Commercially supported IDE and development environment based on the GNU Tool Chain | |||
**Free and Lite versions also available | |||
*[http://www.gnuarm.com/ GNU ARM] | *[http://www.gnuarm.com/ GNU ARM] | ||
Line 72: | Line 82: | ||
**Compatible with both commercial and GNU toolchains | **Compatible with both commercial and GNU toolchains | ||
*[http://www.freertos.org/Free RTOS] | *[http://www.freertos.org/ Free RTOS] | ||
**Microkernel Operating System | **Microkernel Operating System | ||
**Supports 27 different architectures | **Supports 27 different architectures | ||
Line 79: | Line 89: | ||
**Can make robust real-time development easier | **Can make robust real-time development easier | ||
======Texas Instruments====== | |||
=====Texas Instruments===== | |||
*[http://www.ti.com/tool/ccstudio Code Composer Studio] | *[http://www.ti.com/tool/ccstudio Code Composer Studio] | ||
**Supports the Stellaris and other ARM-based chips from TI. | **Supports the Stellaris and other ARM-based chips from TI. | ||
Line 86: | Line 95: | ||
**Free versions that are locked to a dev board are available | **Free versions that are locked to a dev board are available | ||
*[http://www.ti.com/Stellarisware Stellaris Ware] | |||
**Libraries and Example Code suitable for use with the GNU tool chain available from TI | |||
**[http://www.matthewkendall.com/freesoftware/stellaris-toolchain GNU Stellaris How-to] Good overview and links to more tools to help get a freeStellaris environment set up. | |||
=====NXP===== | ======NXP====== | ||
[http://www.microbuilder.eu/ Microbuilder] offers a series of LPC1343-based boards and maintains a free toolchain. | [http://www.microbuilder.eu/ Microbuilder] offers a series of LPC1343-based boards and maintains a free toolchain. | ||
*[http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign/LPC1343CodeBase.aspx Microbuilder Toolchain] | *[http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign/LPC1343CodeBase.aspx Microbuilder Toolchain] | ||
Line 93: | Line 105: | ||
**This chip does not require a JTAG debugger or ISP to program | **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 | **Chip shows up as a flash drive and programs can be drag-and-dropped | ||
=====Programmers and Debuggers===== | |||
*[http://www.segger.com/jlink.html Segger JLink] | |||
**Standard JTAG Debugger that supports a wide variety of chips | |||
**Available cheap on eBay | |||
==== PIC ==== | ==== PIC ==== | ||
Line 101: | Line 117: | ||
PICs are currently available in a wide variety of packages, but, for beginners, it's good to know that most of their devices are available in DIP packages for breadboarding. | PICs are currently available in a wide variety of packages, but, for beginners, it's good to know that most of their devices are available in DIP packages for breadboarding. | ||
=====Families===== | |||
PIC chips come in several families, but the 4 most relevant are: | |||
*PIC16 - 8-bit processors with extremely minimalist RISC instruction set. | *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. | *PIC18 - 8-bit family with expanded instruction set including features like hardware multiplication and reduced need for banking. | ||
Line 107: | Line 124: | ||
*PIC32 - 32-bit MIPS-compliant processors. | *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. | 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. | ||
=====Compilers and IDEs===== | |||
*MPLab - Most people get started with [http://www.microchip.com/mplab 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. Technically, MPLab is an assembler IDE, so, if you're not into learning PIC ASM, it might not be for you. Luckily, it installs Hi-Tech C by default, so that is also an option. | *MPLab - Most people get started with [http://www.microchip.com/mplab 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. Technically, MPLab is an assembler IDE, so, if you're not into learning PIC ASM, it might not be for you. Luckily, it installs Hi-Tech C by default, so that is also an option. | ||
*MikroC - MikroElektronika offers a free download of their software [http://www.mikroe.com/eng/products/view/7/mikroc-pro-for-pic/ 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. MikroE also have PIC IDEs for Pascal and Basic, also for around $200-$250, with free try-out versions. MikroE's compilers are used in most of the [http://www.elsevierdirect.com/imprint.jsp?iid=73 Newnes/Elsevier books] on PIC programming, which is helpful if you're learning. | *MikroC - MikroElektronika offers a free download of their software [http://www.mikroe.com/eng/products/view/7/mikroc-pro-for-pic/ 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. MikroE also have PIC IDEs for Pascal and Basic, also for around $200-$250, with free try-out versions. MikroE's compilers are used in most of the [http://www.elsevierdirect.com/imprint.jsp?iid=73 Newnes/Elsevier books] on PIC programming, which is helpful if you're learning. | ||
*Hi-Tech C - Another product from Microchip, the [http://www.htsoft.com/ Hi-Tech C-compiler] is automatically installed when you install MPLab. But, while the full version of MPLab is completely free, Hi-Tech is limited until you upgrade to the full version, which is pretty pricy. $500 for the 8-bit compiler, $500 for the 16-bit compiler, and $900 for the 32-bit compiler. | *Hi-Tech C - Another product from Microchip, the [http://www.htsoft.com/ Hi-Tech C-compiler] is automatically installed when you install MPLab. But, while the full version of MPLab is completely free, Hi-Tech is limited until you upgrade to the full version, which is pretty pricy. $500 for the 8-bit compiler, $500 for the 16-bit compiler, and $900 for the 32-bit compiler. | ||
=====Programmers and Debuggers===== | |||
PIC programming used to be iffy and expensive, but now it's a piece of cake and easy to get started. Keep in mind a couple of things, though. | PIC programming used to be iffy and expensive, but now it's a piece of cake and easy to get started. Keep in mind a couple of things, though. | ||
Line 129: | Line 147: | ||
* Olimex - My first PIC programmer was an Olimex, and it was a tank. Haven't used them in a while, but they have a lot of products available for programming everything in the universe. [http://www.olimex.com/dev/index.html Their website] and [http://www.olimex.com/dev/pricelist.html pricing page] are notoriously bad, but they make good gear in my experience. Here is an [http://www.olimex.com/dev/pic-mcp-usb.html MPLab Compatible device] that is seen as a PICStartPlus by the IDE, for 35 euros, with ZIF. | * Olimex - My first PIC programmer was an Olimex, and it was a tank. Haven't used them in a while, but they have a lot of products available for programming everything in the universe. [http://www.olimex.com/dev/index.html Their website] and [http://www.olimex.com/dev/pricelist.html pricing page] are notoriously bad, but they make good gear in my experience. Here is an [http://www.olimex.com/dev/pic-mcp-usb.html MPLab Compatible device] that is seen as a PICStartPlus by the IDE, for 35 euros, with ZIF. | ||
====Single-board Linux and RTOS Computers==== | |||
This is the "everything else" category and includes single-board PCs, ARM-Linux systems and RTOS (real-time OS) devices. | |||
=====Raspberry Pi===== | |||
The newest addition to the low-cost "full ARM Linux" line, this board will be great if it ever ships. | |||
*[http://www.raspberrypi.org The Raspberry Pi Foundation] | |||
*[http://elinux.org/RPi_Low-level_peripherals Raspberry Pi GPIO pinouts] | |||
=====Plug PC===== | |||
Plug Computers are self-contained Linux PCs with full server OS functionality and a variety of peripherals | |||
*[http://www.plugcomputer.org/plugwiki/index.php/Main_Page Plug Computing Wiki] | |||
*[http://www.globalscaletechnologies.com/ Globalscale Technologies] |
Latest revision as of 09:07, 24 April 2012
Embedded Systems Tools
Overview of CPUs available for embedded development
A variety of CPUs are available for Open Source Hardware projects. Unfortunately, these products have traditionally been marketed to large-volume end-users and finding a way to compare them can be tough. This article describes the tools we have available for working with embedded hardware.
The devices below have a combination of commercial and open-source tools available to the developer.
Atmel
The Atmel Corporation is based in Norway and sells a large variety of products, from simple 8-bit CPUs costing less than 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 popular Arduino Microcontroller. Programming the chips is straightforward and supported with 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 a proprietary device.
Compilers and IDEs
- AVR Studio
- Supports C/C++/ASM
- Includes libraries and support for most of the Atmel product line
- Includes support for various programming 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
- Arduino vs. AVR-GCC Toolchain
- How to step up from Arduino to the standard AVR-GCC 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 by companies such as Texas Instruments and NXP Semiconductor. These chip makers often add various additional peripherals and features to the ARM-based chips they sell.
More on the ARM Processor.
Pros: Very powerful chips, available from the low Mhz range to 1Ghz+. Support a variety of on-board peripherals.
Cons: Overkill for many embedded applications. Tool chains tend to be aimed at large professional customers and finding a good development environment and vendor-specific libraries for open-source projects may be challenging.
Compilers and IDEs
All ARM 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.
- Code Sourcery
- Commercially supported IDE and development environment based on the GNU Tool Chain
- Free and Lite versions also available
- 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
- Free 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
- Stellaris Ware
- Libraries and Example Code suitable for use with the GNU tool chain available from TI
- GNU Stellaris How-to Good overview and links to more tools to help get a freeStellaris environment set up.
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
Programmers and Debuggers
- Segger JLink
- Standard JTAG Debugger that supports a wide variety of chips
- Available cheap on eBay
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.
PICs are currently available in a wide variety of packages, but, for beginners, it's good to know that most of their devices are available in DIP packages for breadboarding.
Families
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.
Compilers and IDEs
- 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. Technically, MPLab is an assembler IDE, so, if you're not into learning PIC ASM, it might not be for you. Luckily, it installs Hi-Tech C by default, so that is also an option.
- 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. MikroE also have PIC IDEs for Pascal and Basic, also for around $200-$250, with free try-out versions. MikroE's compilers are used in most of the Newnes/Elsevier books on PIC programming, which is helpful if you're learning.
- Hi-Tech C - Another product from Microchip, the Hi-Tech C-compiler is automatically installed when you install MPLab. But, while the full version of MPLab is completely free, Hi-Tech is limited until you upgrade to the full version, which is pretty pricy. $500 for the 8-bit compiler, $500 for the 16-bit compiler, and $900 for the 32-bit compiler.
Programmers and Debuggers
PIC programming used to be iffy and expensive, but now it's a piece of cake and easy to get started. Keep in mind a couple of things, though.
- Almost every PIC product can be programmed with a simple, basic programmer -- if not directly in the socket, then with In-Circuit-Serial-Programming (ICSP).
- Don't get a programmer without a ZIF socket, unless you plan on ONLY using ICSP.
- MPLab's device support is different from the support offered by the individual devices. Do some research on your chip before you buy 10 of them. The new stuff might not be supported right now by your programming device.
There are several good, cheap, PIC-compatible programmers. Here are a few:
- Microchip PICKit2 and PICKit3 - These Microchip products are definitely the slickest beginner versions out there. Fashionable styling, and of course full compatibility. The whole PICKit2 is about $50, including a devboard to play with. The PICKit3 is around $70 with dev board and serial debugger, which is a pretty sweet deal. Without dev boards and cables, they're even cheaper. Keep in mind that PICKit2 will program ALMOST everything made by Microchip. Compatibility list is here.
- CanaKit - Canakit makes a nice little PIC Programmer which is 100% compatible with PICKit2. I've used it for a year with absolutely no problems. Plus it has a ZIF!
- Olimex - My first PIC programmer was an Olimex, and it was a tank. Haven't used them in a while, but they have a lot of products available for programming everything in the universe. Their website and pricing page are notoriously bad, but they make good gear in my experience. Here is an MPLab Compatible device that is seen as a PICStartPlus by the IDE, for 35 euros, with ZIF.
Single-board Linux and RTOS Computers
This is the "everything else" category and includes single-board PCs, ARM-Linux systems and RTOS (real-time OS) devices.
Raspberry Pi
The newest addition to the low-cost "full ARM Linux" line, this board will be great if it ever ships.
Plug PC
Plug Computers are self-contained Linux PCs with full server OS functionality and a variety of peripherals