Exploring a Microcontroller and Software and Tools for the next Project

I’m using many microcontroller in my projects. And a lot more are available out there in the ecosystem. Like many others, I tend to select what I am familiar with. But is this the correct approach to select the hardware and tools for a next project?

Microcontroller Boards

Microcontroller Boards

Continue reading

Advertisements

Using a Custom Debug Perspective in Eclipse

The MCUXpresso IDE comes with a ‘Develop’ perspective which combines the usual C/C++ and the Debug perspective in one:

MCUXpresso Develop Perspective

MCUXpresso Develop Perspective

Continue reading

Dealing with Eclipse and Very Small Icons on Ultra High Density Displays

More and more these very-very-high-resolution (UHD, Ultra-High-Density) notebook displays show up in my class rooms.These displays have 3100×1800 or even more pixels, making it great for watching high-resolution videos or for playing games (maybe?). But such a high-resolution makes many tools including Eclipse very hard to use, because the toolbar icons get so tiny that they are really hard to hit with a mouse cursor on Windows:

Eclipse Icons with UHD Display

Eclipse Icons with UHD Display

Continue reading

Using Serial Terminal and COM Support in Eclipse Oxygen and Neon

Most of the time I’m using a dedicated terminal program like Termite or PuTTY to connect to a board using virtual or non-virtual COM port. Another way is to use the Eclipse built-in Terminal view: that way no extra program is needed to communicate with a real or virtual COM port to my target device:

Terminal Command Output

Terminal Command Output

Continue reading

McuOnEclipse Components: 25-Sept-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge. It  this release more ARM Cortex devices/vendors are supported with different SDKs, plus it comes with several FreeRTOS enhancements for debugging highly optimized code.

SourceForge

SourceForge

Continue reading

Managing Project and Library Dependencies with Eclipse CDT

For several projects I’m using library projects: I build a library and then use that library in the other project. If I change something in a library, I want to run make both on the referenced libraries and rebuild my application if needed. If you don’t know how to do this, then read on… 🙂

Shared Library Projects

Shared Library Projects

(… actually it means workign around  known Eclipse CDT bug too….)

Continue reading

Using Multiple Memory Regions with the FreeRTOS Heap

ARM Cortex-M microcontrollers can have multiple memory controllers. This is a good thing as it allows the hardware to do multiple parallel memory read/writes. However this makes the memory map more complicated for the software: it divides the memory into different regions and memory segments.  This article is about how to enable FreeRTOS to use multiple memory blocks for a virtual combined memory heap:

FreeRTOS with Segmented Heap Memory

FreeRTOS with Segmented Heap Memory

Continue reading

Tutorial: Porting BLE+NRF Kinetis Design Studio Project to MCUXpresso IDE

The tools and IDE market is constantly changing. Not only there is every year at least one new major Eclipse IDE release, the commercial tool chain and IDE vendors are constantly changing the environment too. For any ARM Cortex-M development, the combination of Eclipse with the GNU tool chain provided by ARM Inc. is the golden standard. But this does not mean that things can be easily moved from one IDE package to another.

While moving between Eclipse versions and GNU versions is usually not a big deal at all, moving between the Eclipse build tool integration is usually not simple. While the GNU MCU Eclipse plugins are widely used (see Breathing with Oxygen: DIY ARM Cortex-M C/C++ IDE and Toolchain with Eclipse Oxygen), the Eclipse based IDEs from the silicon vendors or commercial Eclipse toolchain vendors are using  their own GNU toolchain integration. Which means the project files are not compatible :-(.

NXP FRDM-KW41Z Board

NXP FRDM-KW41Z Board

Continue reading

Adding CMSIS-SVD Files to EmbSysRegView 0.2.6.r192 and Eclipse

In “EmbSysRegView 0.2.6 for Eclipse Neon and Oxygen” I have described how to add CMSIS-SVD register detail files to Eclipse using the EmbSysRegView plugin.

But what I need to add vendor or any other SVD files to it? Here is how:

EmbSys Registers View

EmbSys Registers View

Continue reading

Building Eclipse and MCUXpresso IDE Projects from the Command Line

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:

Building MCUXpresso IDE from Command Line

Building MCUXpresso IDE from Command Line

Continue reading

Custom 3D Printed Enclosure for NXP LPC-Link2 Debug Probes

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:

lpc-link2 enclosure

lpc-link2 enclosure

Continue reading

Troubleshooting Tips for FreeRTOS Thread Aware Debugging in Eclipse

FreeRTOS seems to get more and more popular, and I think as well because more and more debugger and Eclipse IDE vendors add dedicated debugging support for it.

FreeRTOS Threads in Eclipse

FreeRTOS Threads in Eclipse

Continue reading

How to use Custom Library Names with GNU Linker and Eclipse

By default, the GNU Linker expects a very special naming scheme for the libraries: the library name has to be surrounded by “lib” and the “.a” extension:

lib<NAME>.a

But what if the library I want to use does not conform to that naming standard?

Non-conforming Library Naming

Non-conforming Library Naming

Continue reading

Tutorial: Makefile Projects with Eclipse

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:

Makefile Project with Eclipse

Makefile Project with Eclipse

Continue reading

MCUXpresso IDE v10.0.2 – Updated Eclipse based IDE for LPC and Kinetis

NXP has released an updated of their Eclipse based IDE for ARM Cortex-M (Kinetis and LPC) microcontroller: the version v10.0.2 build 411:

MCUXpresso v10.0.2 build 411

MCUXpresso v10.0.2 build 411

Continue reading

Getting Started: ROM Bootloader on the NXP FRDM-KL03Z Board

A bootloader on a microcontroller is a very useful thing. It allows me to update the firmware in the field if necessary. There are many ways to use and make a bootloader (see “Serial Bootloader for the Freedom Board with Processor Expert“). But such a bootloader needs some space in FLASH, plus it needs to be programmed first on a blank device, so a JTAG programmer is needed. That’s why vendors have started including a ROM bootloader into their devices: the microcontroller comes out of the factory with a bootloader in FLASH. So instead writing my bootloader, I can use the one in the ROM.

FRDM-KL03Z with ROM Bootloader

FRDM-KL03Z with ROM Bootloader

And as with everything, there are pros and cons of that approach.

Continue reading

Using FreeRTOS with newlib and newlib-nano

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.

Things get problematic if malloc() still is pulled in, either because it is used by a middleware (e.g. TCP/IP stack) or if using C++. Dave Nadler posted a detailed article (http://www.nadler.com/embedded/newlibAndFreeRTOS.html) about how to use newlib and newlib-nano with FreeRTOS.

FreeRTOS Newlib Memory Allocation Scheme

FreeRTOS Newlib Memory Allocation Scheme

Continue reading

First Steps with the Variscite DART-6UL i.MX6 UltraLite Development Kit

For a next-gen course I’m evaluating different platforms, and one of it are modules based on the NXP i.MX ARM architectures. In this article I have a look a the Variscite DART-6UL development kit which includes the NXP i.MX6Ultralite ARM Cortex-A7 plus a 7″ capacitive touch LCD:

Variscite VAR-DVK-6UL_LO Kit

Variscite VAR-DVK-6UL_LO Kit

Continue reading