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

Advertisements

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

Hiking on the Border of Two Cantons

Image

It was a very spontaneous hiking tour this Sunday afternoon: a hike up to the Wildspitz mountain and the border between the Canton Schwyz and Zug. Full of beautiful views, flowers and awesome butterflies!

The boarder between the Canton of Schwyz and Canton of Zug is marked with several stones. Below stone No. 18 (dated 1907) near at Langmatt:

Grenzstein Langmatt

Grenzstein Langmatt

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

Compiler Explorer

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:

Compiler Comparison

Compiler Comparison

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.

Happy Comparing 🙂

McuOnEclipse Components: 09-July-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following major changes and updates:

  • Complete refactoring for 1-Wire stack and DS18B20 temperature sensor components
  • Added HID Joystick device class to the FSL_USB_Stack
  • New SDK_Timer component to work with Kinetis SDK
  • New ST756P LCD driver component
  • New TSL2561 digitial temperature sensor driver
  • Added ReadByte() and WriteByte() GenericI2C functions
  • Added 64bit mapping functions to Utility
  • added configUSE_NEWLIB_REENTRANT and newlib reentrancy support to FreeRTOS
  • Pull resistor support for SDK_BitIO
  • Many smaller bug fixes and enhancements
SourceForge

SourceForge

Continue reading

Three more Reasons to Commute by Train in Switzerland

Video

Commuting to work can be boring. I’m gifted that I can use the Swiss train system, and I wrote about the “10 Reasons Why I Love my Train Commute“.

Immensee

Train at Immensee Station

Brendon asked if I need more reasons. I don’t. But there are indeed three more reasons I can share from my work commute today: Three lakes in three minutes. First Lake Lucerne on the right side, then Lake Zug on the left and finally Lake Lauerz on the right. Enjoy the ride:

Happy Commuting 🙂

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

Transforming Eclipse Linked Projects into Standalone Projects

Some silicon vendors provide their Eclipse example and SDK projects using linked files and folders. For example a bootloader demo application is provided in the context of an SDK or library. That’s fine until the time I want to transform such an example into a real project or if I want to have it without the hundreds of files for all the other devices I don’t need or use. I cannot take the project and put it into a version control system as the linked files won’t be in my VCS. I cannot move the project to another place as the links are pointing to many places. What I need is a ‘standalone’ project: a project which has all the needed files in it and is self-containing.

Eclipse Project with Linked Files

Eclipse Project with Linked Files and virtual groups

Continue reading

Experimental Smokerless Pulled Pork Sous-Vide Style

Don’t get me wrong. I love a good slow-smoked and true BBQ pulled pork shoulder just as probably everyone else out there. And I love the babysitting (aka beer drinking 🙂 ) while the shoulder gets that incredible taste inside the smoker. But my workload for this weekend is insane high with all the university exam and grading work. My family loves that pulled pork too, and I knew upfront that I would not have the time to check and handle the smoking process for 12-18 hours (see “Easter Weekend Apple Juice Brined Pulled Pork Smoked on Beech Wood“). So I decided to prepare pulled pork the ‘easy’ way: Using a Sous Vide cooker and then use a normal oven to finish it. So it was an experiment, and the result is interesting:

Pulled Pork on Toast

Pulled Pork on Toast

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

Zooming In and Out of Text with Eclipse

I like to have as many lines of source code visible on my notebook or desktop monitor. And I think I have found a good balance between font size and readability.

On the other side: I’m getting older and my eyes are not getting any better. At the same time I noticed that students start using these ‘high-resolution-retina-displays’. They are great, but result in tiny default system fonts, so I have a hard time to read the source code on their machines.

Another challenge I noticed are the high-resolution projectors in class rooms or conferences. They are not well suited to show source code or text files because of the tiny fonts. Starting with Eclipse Neon there is an awesome feature which I can use to dynamically increase and decrease the font size which solves that problem:

Eclipse with Large Font Size

Eclipse with Large Font Size

Continue reading

GNU Code Coverage on Embedded Target with Eclipse Neon and ARM gcc 5

For a research project, we are going to send a satellite with an embedded ARM Cortex microcontroller into space early next year. Naturally, it has to work the first time. As part of all the ESA paperwork, we have to prove that we tested the hardware and software thoroughly. One pice of the that is to collect and give test coverage evidence. And there is no need for expensive tools: Free-of-charge Eclipse and GNU tools can do the job for a space mission 🙂

Eclipse with Coverage Views

Eclipse with Coverage Views

Continue reading

Adding GNU Coverage Tools to Eclipse

The GNU tools include powerful utilities to collect coverage information. With coverage I know which lines of my code have been executed, which is a very useful test metric. The GNU coverage tools are commonly used for Linux applications. But to my surprise not much for embedded application development, mostly because it requires a few extra steps to have it available? Why not using free and powerful tools for improving software quality? This article explains how to install the GNU gcov tools into the Eclipse IDE.

gcov with Embedded Target

gcov with Embedded Target

Continue reading