About 6 months ago I started a tutorial on how to setup a free development environment for a Cortex-M0 microcontroller from STMicroelectronics. This tutorial utilized a free ARM toolchain, Eclipse and OpenOCD (for debugging) to setup this environment. It was based on the $8 STM32F0Discovery board.
While the tutorial targeted the STM32F0Discovery board, the larger objective of that tutorial was to make setting up a free GCC-based development environment for Microcontroller development (Cortex-M0/M3/M4) more accessible to everyone and not just the geeky few. And I feel that the tutorial has somewhat succeeded in this goal…
My issue with the STM32 and most other Cortex-M0/M3/M4 parts is that they’re only available in hard to solder surface mount packages. While I know that they are solderable, 0.5mm 48/64QFP packages are almost impossible to align with the naked eye (at least my eye). QFN packages are generally harder to solder at any pitch and simply not designed for people who want to mess around with microcontrollers on a breadboard. Sadly most of of the Cortex-M0/M3/M4 parts out there come in these packages. The exceptions are some of the Cortex-M0 chips (LPC1114) from NXP that come in 600mil 28-DIP and 0.65mm SSOP. Unfortunately these parts do not have a large enough memory density (32K Flash and 4KB RAM) and peripheral integration to peak my interest.
Due to my lack of interest (and possibly ability) in trying to solder these parts I’m forced to look elsewhere, specifically at Microchip’s PIC32MX1/2 offering. The PIC32MX250 Chip comes with 128KB Flash, 32KB RAM, 2-SPI, 2-I2C, 2-UART, 1Msps 10-bit ADC, plenty of timers, USB, RTC and many more peripherals are available of 28-pin DIP, 28-pin SOIC packages as well as the challenging but do-able 0.8mm 44QFP packages. The chip itself runs at 50MHz and provide upto 78 DMIPS of processing power. It is available from newark for under $4 in unit prices.
Because of this high level of integration of memory and peripherals, and availability of easy to use packages, I will probably be moving to the PIC32 for my future microcontroller projects.
The PIC32 is by no means ideal. It has some problems including the fact that its based on the older M4K MIPS core, it has longer (slower) interrupt latency and is more power hungry than the Cortex-M microcontrollers. It still better fits my needs that the Cortex-M Microcontrollers out there due to its flexible packaging options.
Another disadvantage of the PIC32 is that the free XC32 (GCC) compiler offered my Microchip is crippled…i.e. optimization is disabled. A workaround that I intend to experiment with in the future is to use the Newlib based ChipKit (MIPS-GCC) compiler as a toolchain and to use ejtagproxy as the GDBserver for debug. A Sample minimal application for such a setup exists here. With these tools one can easily setup a free development environment for the PIC32 with Eclipse or any other IDE of their choice.
If one does not mind using Microchip’s XC32 compiler with optimization’s disabled, one can use the compiler along with Microchip’s awesome MPLABX IDE. Both of which are available on Linux, Mac and Windows.
I will start experimenting with the PIC32 (with Free Development Environment) in the near future.