For novel ideas about building embedded systems (both hardware and firmware), join the 40,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and no vendor PR. Click here to subscribe.
New Book About the Cortex-M0/M0
Summary: Working with the M0/M0+? There's an excellent new book out about these MCUs.
ARM has over 200 licensees for their Cortex-M parts, and there are thousands of variants on the market. While they introduced the M7 last year, which offers incredible performance for an MCU, the bottom end of the line has elicited an enormous amount of interest. The M0 core only needs about 12,000 gates so costs pretty much nothing. The M0+ has the same instruction set but better low-power performance for those battery-operated devices, plus more (optional) debug capabilities, and even an optional memory protection unit (a poor person's MMU).
Joseph Yiu has a new book about these two processors. The Definitive Guide to ARM Cortex-M0 and Cortex-M0+ Processors complements his earlier tome about the M3. At 746 pages I have to agree that it is indeed complete and is the "definitive" work about these parts. He works for ARM, and parts of the first two chapters do read like an ad for the company, though there's plenty of valuable information in them.
The book is very current, so current there's a great description of the EEMBC's work on ultra-low power benchmarks. I wrote about this in March (http://www.embedded.com/electronics-blogs/break-points/4438951/Energy-Monitor) and for those of you working with battery-powered systems it's worthwhile to see what EEMBC is up to. A chapter covers low-power features, but you'll have to dig deeply into the data sheet of the part you're using, as the licensees add in a sometimes mind-boggling number of proprietary features to minimize the coulombs consumed.
As in his earlier book, Mr. Yiu does a good job explaining the MCUs' architecture and ISA. If you're using, or considering, these parts, this information is absolutely critical to have. ARM parts are complex, with multiple busses, pipelines of varying lengths, sometimes variable endianness, and other features that can be confusing.
The best parts are the four chapters about getting started with writing code. One each covers the Keil, IAR, GCC and mbed toolchains. Pick your tools, go to the appropriate chapter, and Mr. Yiu will guide you quickly through setting up an environment and writing your first Cortex-M0/M0+ code. He also targets some specific boards, such as Freescale's FRDM and ST's STM32 products. The chapter you use will pay for the book.
One section details porting code from various CPUs (e.g., the 8051) to the M0/M0+. That is sure to tick off vendors selling other sorts of parts! But mostly he details moving code from other, more capable, ARM devices to these entry-level devices, a process that has some landmines. The guidance given is Good Stuff.
The writing style is clear and the typography easy on the eyes. One quibble, which is perhaps more a complaint about the state of the publishing industry today: there was clearly no copy editor involved. Once upon a time these people, who were masters of the English language, would find obvious language errors and correct them. The Definitive Guide to ARM Cortex-M0 and Cortex-M0+ Processors has a lot of grammatical errors. An example: "Easy to learning programming of new devices." These are distracting but don't detract from the technical content.
It's $62 from Amazon, or $34 for a Kindle edition. 62 bucks for a book is ridiculous the state of things today. But if you're new to these components, swallow your outrage and buy the book. It will give you the insight embedded you need to be productive on real projects.
On an unrelated note, I'm doing a survey about firmware engineering processes. Please take two minutes and fill it out here (http://www.ganssle.com/survey-fw.html).
Published September 2, 2015