Eclipse as IDE takes care about compiling and building all my source files. But in an automated build system I would like to build it from the command line too. While using make files (see “Tutorial: Makefile Projects with Eclipse“) is an option, there is another easy way to build Eclipse projects from the command line:
Last month (June 2017), the latest version of Eclipse “Oxygen” has been released, and I have successfully used it in several embedded projects. Time to write a tutorial how to use it to build a custom Do-It-Yourself IDE for ARM Cortex-M development: simple, easy, unlimited and free of charge. While the DIY approach takes a few minutes more to install, it has the advantage that I have full control and I actually know what I have.
I love 3D printing as it enables me to create custom enclosures for all kind of projects. The NXP LPC-Link2 probe is great, but it lacks a protective enclosure. So I decided to create a custom enclosure. And as 3D filaments are available in different colors, I experimented with red and black and custom painting:
The benefit of an IDE like Eclipse is: it makes working with projects very easy, as generates make files and it takes and automatically manages the make file(s). But sometimes this might not be what I want because I need greater flexibility and control, or I want to use the same make files for my continues integration and automated testing system. In that case a hand crafted make file is the way to go.
One thing does not exclude the other: This article explains how to use make files with Eclipse with similar comfort as the managed build system in Eclipse, but with the unlimited power of make files:
If you are like me – someone who always wants to know what the compiler generates for a piece of source code – then have a look at the Compiler Explorer: A web-based compiler code comparison tool:
Thanks to Matt Godbolt, I can select different compilers and compare their output for a given source code. Very useful to see the impact of a compiler optimization or to compare different GCC compiler versions.
For reliable applications, I avoid using functions of the standard libraries. They are banned for most safety related applications anyway. I do not use or avoid malloc(), printf() and all the other variants, for many reasons including the ones listed in “Why I don’t like printf()“. Instead, I’m using smaller variants (see “XFormat“). Or I’m using only the thread-safe FreeRTOS heap memory allocation which exist for many good reasons.
In “Cycle Counting on ARM Cortex-M with DWT” I have used the ARM DWT register to count the executed cycles. With the MCUXpresso IDE comes with a very useful feature: it can capture the ARM SWO (Single Wire Output) trace data. One special kind of trace data is the ‘cycle counter’ information which is sent through SWO.
During Embedded World 2017 in Nürnberg I was lucky to get a handful LPC800-DIP boards. To get all students who were lucky to get one, here is a tutorial to make that very exciting ‘blinky’ application on that board:
Eclipse for C/C++ (CDT) offers two different ways to get out of a debug session: Terminate and Disconnect:
Terminate and Disconnect
The terminate and disconnect behaviour is not standardized, and varies between Eclipse distributions and debug connection. This article is about how things are handled in MCUXpresso IDE, and how I can influence the behaviour.
I’m using Eclipse based IDE’s to develop and debug my embedded applications. This works great, as Eclipse has all the necessary tools to edit, build and debug it. But when it comes just to download/flash a binary to the board, then things are pretty much specific to the tools used. With the advent of the new MCUXpresso IDE, here is how that Eclipse IDE can be used for this.
The MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“) has one great feature: it includes debug support for the popular LPC-Link2 debug probes. That way I have yet another powerful debug probe with extra features for ARM based boards. That LPC-Link2 circuit is present on many LPCXpresso boards from NXP. So why not using it to debug it my custom hardware?
Many of my currently active projects are using Kinetis Design Studio (KDS) V3.2.0 from NXP (I have published many of my projects on GitHub). Now with the advent of the MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“), I have migrated several projects from KDS to MCUXpresso. This post is about how to easily get KDS projects ported and running in MCUXpresso IDE.
For me, the available software and tools are the primary key decision factor why I select a particular silicon vendor. Without good software and tools, a microcontroller only ‘sand in plastic case’, even if it is the best microcontroller in the world. I do have several probably excellent microcontroller boards, and they are only getting touched by more durst over the months and years.
The ‘traditional’ approach to install Eclipse plugins is using the menu Help > Install New Software. Using that approach, I have to use or enter an Eclipse update site. An easier way is to use the Eclipse Marketplace plugin which allows me to search and browse for plugins and simplifies installation of it. But as this one does not come installed by default with MCUXpresso. But it is my preferred way to browse and install plugins into Eclipse:
Eclipse Marketplace under Eclipse Neon and MCUXpresso IDE