CC Blog Research & Design Hub Tech Trends

MCU Development Tools

Written by Michael Lynes

TOOLS MAKE MONEY

  • What are some essential microcontroller development tools?
  • Who are major players in the microcontroller tool industry?
  • What are some rules for debugging embedded systems?

  • STM32Cube
  • Simplicity Studio
  • MCUXpresso
  • Microchip Studio
  • Eclipse
  • Visual Studio

Engineers. Engineers are a weird bunch. I mean no offense, of course. I’m an engineer, myself. But as you’re probably aware, our profession—and our unique personalities—are not well understood by the populace at large.

One of the main differentiators of engineers from the rest of the world is the stuff that will make us laugh. There’s even a term for it: “engineering humor.” Usually the “jokes” revolve around double and triple meanings, bizarre tangents, math, or a combination of all three. It’s not that we can’t appreciate slapstick, dad jokes, or other normal forms of humor. It’s just that nothing pleases a bunch of engineers more than a well-timed pun, an obscure physics reference, or any sort of play on words.

Another thing about engineers is that we are sticklers for precision. Most folks are content to be sloppy in their speech and definitions. One word is as good as another, and the meaning is fungible. With engineers that won’t fly. If you ever have the dubious pleasure of having to address a group of engineers, be prepared to be constantly interrupted, corrected, and interrogated. We all have issues, we pay attention, and we are stuck on details.

Also, we make stuff. We are kindred souls with artists, artisans, and builders of all types. We may specialize, as perhaps a mechanical expert or an electrical wizard. But in general, we all see the world as potential—raw stuff that can be molded and shaped, tested and measured. So, naturally, another big thing with engineers is tools. Engineers love tools because they make our lives simpler and increase our efficiency.

And engineers are cheap, the kind of folks that know down to the approximate dollar how much we’ve spent on our current project, and how much value we are getting for that dollar. Paradoxically, we are also overly generous, eager to jump in and help a colleague, friend, or random stranger—despite being behind schedule and underwater on seventeen other projects—if a more interesting collection of wires and chips floats through the lab.

— ADVERTISMENT—

Advertise Here

We also have X-ray vision, of a sort. Don’t get me wrong: The “MCU” in this month’s title does not stand for the Marvel Cinematic Universe. Our gaze doesn’t contain high-energy photons capable of mutating DNA or interacting with the atomic structure of the objects that we observe. (By the way, if you chuckled at the previous phrase, congratulations! You’re an engineer.) What I mean is that we have a form of deep insight. This type of vision has to do with how we perceive the world around us.

I’ll give you an example. Most folks look at an object and they see its shape, color, and what it is doing. One blinking LED is the same as another, and if you show a layperson three boxes that are similar in size, color, and appearance and that are all plugged in and sitting on a bench, and ask them what they each do, you’ll get some interesting responses. Most people will be puzzled, indifferent, or annoyed. Almost all will lose attention in a few seconds.

Engineers, on the other hand, will be immediately interested in a box with blinking lights. They’ll pick it up, look at the connections, poke at the buttons, and imagine what’s inside. They’ll guess, test, and think aloud. They’ll be delighted by the puzzle. Their X-ray vision will be engaged. And, based on the results of their testing, they’ll refine their guesses. At the end of a few minutes, hours, or days, they’ll still be guessing, and given sufficient resources or urgency, you can capture the attention of engineers for an indefinite period, so long as the mystery of the box’s contents remains unsolved.

And, when they finally solve it (and God knows they will), they’ll proclaim their success triumphantly to the room, excited to share their information—and incidentally mystified that the rest of the world not only doesn’t care but will, in fact, be annoyed again that they’re still talking about this box. But their audience is not the rest of the world. Largely they’re speaking to only one person—themself. Or, if by chance there’s another engineer in the room, they can babble on about what they did, how many tests they tried, the blind alleys they explored, and what they learned along the way. The other like-minded mage will listen in rapt attention to their tale, interjecting with their own similar experiences, each interlocutor enthralled by the intricate details of the solved puzzle. This is the difference. We look deeply, passionately, and, to the rest of the world, mysteriously, into the unknown. We’re fascinated by the puzzles of the world and employ all our experience—and tools—to solve them.

This brings us back to this month’s topic: microcontroller (MCU) development tools. This subject is near and dear to my heart, having spent (some might say misspent) the better part of four decades developing and debugging (and most of the time silently cursing) embedded processor-based equipment. While researching this article, I was inordinately pleased to find that the ancient 8051 family of MCU (one of my favorites) is still going strong, as well as a whole host of more modern 8-bit and 32-bit platforms.

MCU tools have matured over the years, but in many ways, they’re better-packaged versions of the same tool suites that have been around for decades. There are many familiar names in this arena, as well as a few relative newcomers. Here, I’ll cover the pros and cons of some of these players. I also thought this article would be a great opportunity to share some of my hard-earned knowledge vis-à-vis embedded systems programming, and some of the rules, tips, and tricks I’ve picked up along the way during my forty-odd (and I do mean odd) years in this profession.

MCU TOOLS AND TOOLKITS

The breadth and scope of toolkits that exist for MCU development and debugging is, to say the least, mind-boggling. Everyone has a favorite and least favorite integrated development environment (IDE), and the “best” suite of features and capabilities is highly subjective. Much of it comes down to three criteria:

— ADVERTISMENT—

Advertise Here

  • Familiarity—If I already know how to use an IDE, I’ll be biased toward choosing that IDE.
  • Suitability—Is this toolset the most efficient for a given application or platform?
  • Exclusivity—Historically, some platforms have a closed IDE, forcing developers that wish to use a platform to also use its associated tools.

I’ve run into the exclusivity issue with platforms like Amulet, where the platform dictates the tool suite. Thankfully, most companies make plug-in type tools for the more popular IDEs, and many IDE developers have made their IDE open. Eclipse is the poster child for this, basically allowing you to develop and debug on any platform.

But, as mentioned above, there are still a lot of choices. I’ve gathered a few below, but this is far from an exhaustive list. Please feel free to contact me or Circuit Cellar if I failed to mention a particular favorite IDE of yours. Anyway, with those caveats, let’s begin.

— ADVERTISMENT—

Advertise Here

ST: STMicroelectronics is a global company with over 50,000 employees worldwide. ST is well known for analog and digital ICs, SOICs, and microprocessors (MPUs) of all kinds. STM32, ST’s current line of 32-bit MCUs equipped with the Arm Cortex, is a full-featured family of devices suitable for a wide variety of applications. As a complement to STM32, ST has developed STM32Cube, a suite of embedded software packages [1]. This includes the STM32CubeIDE, which supports all of ST’s current and many of its legacy MCUs and MPUs and comes fully integrated with compilers and configurator tools [2].

Configurator tools take the guesswork out of interfacing with a specific model of SOIC, providing the user with customized code designed by the manufacturer to run on the target platform. In addition, configurators provide a driver framework to interface with integrated peripherals such as digital signal processors (DSPs), multi-ported memories, dedicated programmable real-time units (PRUs), real-time processing units, function generators, and the like. The STM32Cube suite also includes in-circuit emulation/debugging (ICE) and third-party tool support. As you can see in Figure 1, CubeMX provides the user with a codebase library tailored for their specific platform(s), as well as platform-specific drivers that expose the capabilities of the device. CubeIDE can be used to develop your specific application on top of this core, but third-party IDE environments are supported as well. Finally, moving the compiled code into your target is done with the CubeProgrammer interface, and ST also provides CubeMonitor for run-time variable inspection, debugging, and code breakpoints. I’ve not used the ST tool suite myself, but as with all things ST, it’s comprehensively documented and comes with world-class support and a vibrant user community to back it up.

FIGURE 1
STM32Cube tool suite
FIGURE 1
STM32Cube tool suite

Silicon Labs: Founded in 1996 by three mixed-signal engineers in Austin Texas, Silicon Labs has grown to be a world-class company with a presence in many major innovative markets. The company specializes in devices for the wireless, IoT, and digital communications industries. Its Simplicity Studio IDE and MCU development toolkits support a wide variety of MCU platforms in 8-bit and 32-bit configurations [3][4]. SiLabs has excellent tools that target the modern descendants of the venerable 8051 platform, with full kits (Figure 2), including evaluation boards and peripherals to meet your IoT or wireless application needs. As Figure 3 shows, Silicon Labs has an intuitive, flexible approach to its IDE user interfaces, and it supports a comprehensive line of devices and development kits—both its own and third-party vendors.

FIGURE 2
Silicon Labs MCU Development Kit
FIGURE 2
Silicon Labs MCU Development Kit

FIGURE 3
Simplicity Studio Simplicity Studio MCU IDE
FIGURE 3
Simplicity Studio Simplicity Studio MCU IDE

NXP: NXP Semiconductors makes a full line of multi-core Arm devices, the i.MX, as well as more traditionally architected devices. The company has over 36,000 employees and a worldwide footprint, with fabrication arms in China, India, Japan, Korea, Singapore, and Thailand, and offices throughout Europe, Asia, the Middle East, and the Americas. Its solutions serve the EdgeVerse of multi-level and platform IoT devices, as well as the automotive, AI, machine learning, medical telemetry, and wearables sectors, not to mention many other industries and governmental applications. NXP has developed the MCUXpresso IDE to support application development on its many platforms (Figure 4) [5]. As with ST and Silicon Labs, MCUXpresso has an integrated configurator tool, SDK, and optional security modules for secure transactions, encryption, or communications using the company’s devices. NXP’s website also has a platform selection wizard to assist the end user in choosing the right family and device that will meet their requirements [6].

FIGURE 4
MCUXPresso Tool Suite
FIGURE 4
MCUXPresso Tool Suite

Microchip Technology: Microchip Technology, the successor to Atmel, is yet another provider of highly scalable integrated SOIC platforms for embedded applications. In my current position as a firmware engineer for Rudolph Research Analytical, we use Microchip’s tool suite, Microchip Studio, to develop our embedded applications. Currently, we cross-compile to the AVR32 platform family, and I’m responsible for 25 different applications that make up the embedded instrumentation portion of RRA’s product offerings. The Microchip suite we are using is version 7, while the current release, MPLAB X, is version 10 [7]. As might be inferred from the name, Microchip Studio incorporates the core of Visual Studio, but has been skinned and customized by Microchip to better suit their unique set of products. The MPLAB X (Figure 5) incorporates an Assembler, linker, C/C++ compliers, a Simulator module, a real-time ICE, and an ICD with a dedicated hardware interface (Figure 6) [8][9].

FIGURE 4
MCUXPresso Tool Suite
FIGURE 4
MCUXPresso Tool Suite

FIGURE 6
MPLAB X ICD Interface Board
FIGURE 6
MPLAB X ICD Interface Board

I’ve used Microchip Studio and its precursor Atmel Studio for some time now, and I do find it relatively intuitive (for the experienced embedded programmer), and mostly bug-free. One caveat: We are cross-compiling to an older platform, so we are not using the Microchip tool suite directly but rather invoking olde-timey C Make files that use a compatible Atmel toolchain. As a grizzled EE with lots of Unix\Linux under my belt, I find this environment familiar. But for those who like a less gritty experience, Microchip Studio can manage and automate the build process directly with their own modern cross-compilation tools such as XC8.

Holtek: Founded in 1983, Taiwan-based Holtek Semiconductor is a manufacturer and designer of a wide range of System-on-Chip (SoC), SOIC, and mixed-signal integrated circuits. They have a global presence with manufacturing in China and Hong Kong, and sales offices in India and the USA. Holtek is a smaller player than some of these other names, but they too have a full-featured MCU development suite (Figure 7), with a more hobbyist-friendly cost structure [10].

FIGURE 7
Holtek Development Kits
FIGURE 7
Holtek Development Kits

Eclipse: Then we have the Swiss-army knife IDE, Eclipse [11]. Eclipse has been around for multiple generations of MCUs, adapting itself to each new wave of platforms as needed. The company strives to be platform-agnostic—or, more accurately, to provide a holistic platform environment, whose editing, compilation, and debugging features have a nearly universal scope. This is both good, and not so good. If you become familiar and adept at using Eclipse, your experience will translate into many different project platforms. But Eclipse is generic, and often you are required to work around the platform to access specialized libraries, toolchains, and configurator outputs.

I have used, and generally like, the Eclipse IDE environment—take it from someone who did a ton of editing on the beast in Figure 8. Over the course of my career, I’ve used everything, from ancient creaky ED and Vi, to WYSIWYG editors like TECO, EMACS, EDT, and VIM, to modern editors like Notepad++ (a personal favorite), Visual Studio, and many other modern IDEs. Code editors that provide auto-formatting, context-sensitive suggestions, high-performance searching, code highlighting, decoration, and project scope linking are tremendously helpful and allow a skilled programmer to spend their time writing code instead of struggling with their tools to do so.

FIGURE 8
OG-EE ADM-3A Beast Terminal
FIGURE 8
OG-EE ADM-3A Beast Terminal

Visual Studio: Visual Studio, originally a closed IDE developed by Microsoft in the late 1980s as an outgrowth of FoxPro, has a long, checkered history, and you can find as many rabid fans of this development environment as you can vehement detractors. My experience with the various incarnations of VS goes all the way back to Visual C++, and Visual Source Safe, which my team and I used as a native development environment for several Windows 95/98-based UI products in the late 1980s (I know, more ancient history). I also spent a lot of time with Visual Studio 6.0 in the early 2000s, developing Windows-based communications applications and interfaces to USB-based IP telephony devices made by a company I co-founded. Our target environment was the native PC, so using VS made a lot of sense at the time. We were also more of a middleware application, adapting the events and audio streaming features of the USB IP telephones we were developing to the UI/API of the various Unified Communications and VoIP clients that were popular at that time.

Bringing the Visual Environment forward to the present, Visual Studio from 2010 onward to the 2019 release has evolved to become a (mostly) platform- and target-agnostic IDE [12]. VS supports a wide variety of plug-ins that allow the basic tool suite to support both native (Windows OS) and cross-complied embedded targets (Figure 9). For all its warts and bumps, VS is a workhorse of an MCU platform, and many other platform IDEs use the core of VS as their basic engine. Personally, I don’t mind using VS in its proper application space at all.

FIGURE 9
Embedded ARM Cortex on Visual Studio
FIGURE 9
Embedded ARM Cortex on Visual Studio

MIKE’S RULES

Over the years—decades, in fact—I’ve acquired a modicum of experience in debugging complex embedded systems. When debugging these types of systems, often with no more tools than your imagination and printf statements, that X-ray vision I mentioned comes into play—but it’s also a bit more. Perhaps you fellow Old Guy EEs out there can relate.

There is a certain level of satisfaction I get out of being able to look over a system that another engineer may be struggling with (say a section of code that has a particularly deeply entrenched bug), make a few hemming and hawing noises, and then lean toward the screen with an extended index finger and say, “Right there. That’s your problem.” And then casually step back and bask in the glow of their astounded expression.

The ability to do this seemingly miraculous identification of an arcane issue in a piece of code that you’ve neither written nor been heavily involved in lies in the fact that software, like chess or many other disciplines, follows certain rules and patterns. For example, once you’ve diagnosed and debugged the effects of an uninitialized pointer variable a few thousand times, you can spot the downstream signs from a long distance away. The miracle is not so much in identifying the flaw; it’s in knowing that it must be there. This experiential certainty allows me to narrow my search to likely root causes, a much smaller set, and rapidly winnow through them in my mind.

From this and many other experiences, I developed a set of rules, a sort of guide that I compiled and published for the team I was leading in the early 1990s. The original list is lost to the depths of time and decaying magnetic media. However, I’ve reconstructed a fair number of them from memory, and listed them here.

Mike’s (Abridged) Rules for Debugging Embedded

Systems:

  1. It’s never the hardware—unless it is.
  2. It’s always the software—unless it isn’t.
  3. It’s always the last thing you did.
  4. Your first idea is probably wrong.
  5. The compiler is always right.
  6. If you think that an interrupt can occur between two statements—it can. If the effects of that interrupt could be bad—they will.
  7. When you hear clip-clop clip-clop, look for horses, not zebras, or you’ll end up finding an ass.
  8. If two contradictory observations both appear to be true, check your assumptions. One of them will be wrong.

CONCLUSION

Well, that’s all from me for now. After all, it’s September, summer is fading, school has started, and us war-weary developing veterans are gearing up for the end-of-year push that typifies most cyclical instrument sales businesses. My current bubbling pot of projects is calling me, and I must go tend to them before they boil over and make a mess. Embedded MCUs by their nature are temperamental little beasties, and the care and feeding of them is a tricky business. That said, embedded system development is a complex, challenging, and rewarding pursuit, and I would recommend it as a career to anyone who enjoys staring at blinking lights, incremental successes, spectacular failures, and mazes of twisty passages, all alike. Until next month! 

REFERENCES
[1] STM32Cube Software Tools: https://www.st.com/en/ecosystems/stm32cube.html
[2] ST Cube IDE: https://www.st.com/en/development-tools/stm32cubeide.html
[3] Silicon Labs Microcontroller Simplicity Studio: https://www.silabs.com/developers/simplicity-studio
[4] Silicon Labs – MCU Development Kits: https://www.silabs.com/development-tools/mcu
[5] NXP: MCUXpresso (IDE) – https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE
[6] NXP Product Advisor: https://www.nxp.com/products/product-advisor:PRODUCT-ADVISOR
[7] Microchip MPLAB: https://www.microchip.com/en-us/tools-resources/develop/development-tools-for-arm-mcus
[8] MPLAB IDE: https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide
[9] MPLAB ICD: In-circuit debugger: https://www.microchip.com/en-us/development-tool/DV164055
[10] Holtek MCU Tools: https://www.holtek.com/development-kit
[11] Eclipse: Embedded CDT (C/C++ Development Tools) – https://projects.eclipse.org/projects/iot.embed-cdt
[12] Visual Studio: Embedded Software Development – https://devblogs.microsoft.com/cppblog/visual-studio-embedded-development/

RESOURCES
Eclipse | www.eclipse.org
Holtek Semiconductor Inc. | www.holtek.com
Visual Studio | visualstudio.microsoft.com

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • SEPTEMBER 2023 #398 – Get a PDF of the issue

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Sponsor this Article

Michael Lynes is an entrepreneur who has founded several startup ventures. He was awarded a BSEE degree in Electrical Engineering from Stevens Institute of Technology and currently works as an embedded software engineer. When not occupied with arcane engineering projects, he spends his time playing with his three grandchildren, baking bread, working on ancient cars, backyard birdwatching, and taking amateur photographs. He’s also a prolific author with over thirty works in print. His latest series is the Cozy Crystal Mysteries. Book one, Moonstones and Murder, is already in print, and book two is on its way. His latest works include several collections of ghost stories, short works of general fiction, a collection called Angel Stories, and another collection called November Tales, inspired by the fiction of Ray Bradbury. He currently lives with his wife Margaret in the beautiful, secluded hills of Sussex County, New Jersey. You can contact him via email at mikelynes@gmail.com.

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2024 KCK Media Corp.

MCU Development Tools

by Michael Lynes time to read: 14 min