Tutorial: Git with Eclipse

There are things which are game changer in the world of software development: one such event was when I started using a VCS (Version Control System): it changed for me how I keep and store my projects and settings. It even changed the way how I deal with non-software related items like documents or other valuable things: I started storing them in to a VCS too.

EGit with Eclipse

EGit with Eclipse

Continue reading

Advertisements

Tutorial: μCUnit, a Unit Test Framework for Microcontrollers

Unit testing is a common practice for host development. But for embedded development this still seems mostly a ‘blank’ area. Mostly because embedded engineers are not used to unit testing, or because the usual framework for unit testing requires too many resources on an embedded target?

What I have used is the μCUnit framework which is a small and easy to use framework, targeting small microcontroller applications.

uCUnit

uCUnit

Continue reading

Tutorial: First Steps with Embedded Artists NXP i.MX RT1052 OEM Module

Not ready for the complexity of a full blown Embedded Linux, but need that extra compute performance? Need an ARM Cortex-M7 running at 600 MHz module on a half-sized business card, ready to be integrated? Here we go: the Embedded Artists i.MX RT1052 OEM module:

Embedded Artists NXP i.MX RT1052 OEM Module

Embedded Artists NXP i.MX RT1052 OEM Module

Compute modules are very common in the Embedded Linux space, for example see this Toradex module. The reason is simple: these high-performance boards simplify the design, as I don’t have to care about the BGA packages and the external SDRAM and FLASH devices: everything is on a module I can easily integrate into my base board.

Continue reading

Tutorial: Open-Source Embedded GUI Library LittlevGL with i.MX RT1050-EVK

Most embedded projects need an user input device. For the NXP i.MX RT1050-EVK board I have recently added a 480×272 full color touch LCD (see “Adding a Rocktech Capacitive Touch LCD to the NXP i.MX RT1052 EVK“). I have looked at different commercially available GUI libraries, but none of them really were matching my expectations: either very expensive or closed source, or an overkill for small LCDs and projects. But then I have found LittlevGL: free-of-charge, open source, easy to use, well documented and has everything I need. And it really looks gorgeous 🙂

Hello from LittlevGL

Hello from LittlevGL

Continue reading

Tutorial: Catching Rogue Memory Accesses with ARM Watchpoint Comparators and Instruction Trace

In my “Tutorial: Catching Rogue Memory Accesses with Eclipse and GDB Watchpoints” I have used Eclipse/CDT and GDB watchpoints.  I used a conditional watchpoint, but this comes with a performance hit. In this article I show how to use the ARM Cortex trace hardware to catch specific writes to a memory location. Without severe performance degradation. But for this I need a little helper: the DEADBEEF catcher!

0xdeadbeef catcher

0xdeadbeef catcher

Continue reading

Tutorial: Catching Rogue Memory Accesses with Eclipse and GDB Watchpoints

Eclipse is great: it gives me the tools and capabilities to solve the really hard bugs to find. An example of that ‘hard’ category are ‘rogue’ memory accesses: something in the application is accessing an unwanted memory location and corrupts the data. This might be very sporadic, or takes a long while until it happens. With normal ‘stop-mode’ debugging (setting a normal breakpoint) and stepping usually won’t let me find that bug, as it might be coming from a pointer somewhere. Maybe from an interrupt routine. Or maybe an unitialized or corrupted pointer corrupts to my memory. Usually all what I know is the memory adddress of the data, maybe what is written, but not what or who is writing to that location.

In this article I’m using one of the ‘less-known’ debugging techniques available in Eclipse and CDT and how it works: watchpoints!

Watchpoint with Condition

Watchpoint with Condition

In this article I’m using one of the ‘less-known’ debugging techniques available in Eclipse and CDT and how it works: watchpoints!

Continue reading

Tutorial: Using Runtime Statistics with Amazon FreeRTOS V10

FreeRTOS includes a nice feature to give me information about how much time every task is spending running on the system:

FreeRTOS Runtime Information

FreeRTOS Runtime Information

This tutorial explains that FreeRTOS Runtime Statistics feature and how it can be turned on and used.

Continue reading

Porting Processor Expert Projects to MCUXpresso IDE

The McuOnEclipse GitHub repository hosts many Processor Expert projects and is very popular (cloned more than 1000 times, thank you!). Processor Expert is a powerful framework which generates driver and configuration code, simplifying application development for a wide range of microcontroller and families. But Processor Expert won’t be developed further by NXP and is not part of MCUXpresso IDE. While it is possible to install Processor Expert into MCUXpresso IDE 10.2, how can these projects used ini an IDE *without* Processor Expert? This article describes how to port an existing Processor Expert project into the NXP MCUXpresso IDE.

Adafruit SSD1351 with FRDM-K64F

Ported Project with FRDM-K64F using Adafruit SSD1351 and Processor Expert

Continue reading

Adding a Rocktech Capacitive Touch LCD to the NXP i.MX RT1052 EVK

It is never too early to start thinking about Halloween projects :-).

rended Eyes with i.MX RT

rendered Eyes with i.MX RT

When I ordered originally the MIMXRT1050-EVK from Mouser, it was without the LCD display (see “MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor“. I ordered the LCD for the board soon after writing that article, but I was too busy with the university lectures and exams to get a hand on it. Finally I have spent a few hours at night and I proudly can say: the display is working 🙂

Continue reading

Using custom FreeRTOS with S32K SDK and OSIF for ARM

In “Tutorial: FreeRTOS 10.0.1 with NXP S32 Design Studio 2018.R1” I showed how to use a custom FreeRTOS with the S32 Design Studio (ARM). The OSIF (OS Interface) provides an operating system and services abstraction for the application which is used by other S32K SDK components:

OSIF in S32K for ARM Eclipse Project

OSIF in S32K for ARM Eclipse Project

Continue reading

Creating Disassembly Listings with GNU Tools and Eclipse

In many cases it is very useful to see the generated assembly code produced by the compiler. One obvious way to see the assembly code is to use the Disassembly view in Eclipse:

Disassembly View

Disassembly View

But this requires a debug session. An easier way is to use command line options to generate the listing file(s).

Continue reading

Tutorial: FreeRTOS 10.0.1 with NXP S32 Design Studio 2018.R1

NXP not only sells general purpose microcontroller, but as well a portfolio of automotive devices which includes the S32K which is ARM Cortex based. For this device family, they offer the S32 Design Studio (or S32DS) with its own Eclipse distribution and SDK. The interesting part is that the S32DS includes Processor Expert (which is a bit different from the ‘mainstream’ Processor Expert). It comes with its own components for the S32K SDK which includes a component for FreeRTOS. But that component in S32DS 2018.R1 comes with an old V8.2.1 FreeRTOS component:

FreeRTOS 8.2.1 in S32DS 2018.R1

FreeRTOS 8.2.1 in S32DS 2018.R1

So what to do if I want to use the latest FreeRTOS (currently 10.0.1) with all the bells and whistles?

Continue reading

Building a DIY SMT Pick&Place Machine with OpenPnP

This article is about a project I have started back in January 2018. As for many of my projects, it took longer than anticipated.But now it is working, and the result is looking very good: a DIY automated pick and place machine to place parts on circuit boards. In the age of cheap PCBs, that machine closes the gap for small series of boards which have to be populated in a time consuming way otherwise.

OpenPnP Pick&Place Machine

OpenPnP Pick&Place Machine

Continue reading

Installing Darkest Theme with MCUXpresso IDE 10.2

Is BLACK the color of the season? My students really seem to love these ‘dark’ Eclipse themes. Well, I tried ‘dark’ themes in the past, but I have not been vey excited about it. Somehow I preferred more the ‘black on white background’ thing. But: I have now managed to install the ‘Darkest Dark’ Eclipse theme into the NXP MCUXpresso 10.2 IDE for my daily work, and I feel it hurts my eyes less? Maybe I’m getting older? Or could it really be that ‘dark’ look and feel?

Darkest Dark Theme with MCUXpresso IDE

Darkest Dark Theme with MCUXpresso IDE

Find out for yourself in the following article….

Continue reading

Tutorial: Understanding and Using FreeRTOS Software Timers

Hardware Timers are essential to most embedded applications: I use them mostly for triggering actions at a given frequency, such as acquiring data from a  sensor. With using an RTOS I can do a similar thing using a task: the task will run with a given frequency and I can periodic work in it. However, using a task might be too much overhead doing this. The good news is that there is a much more efficient way to do this in FreeRTOS with Software Timers. And this is what this tutorial is about: how to use Software Timers with FreeRTOS.

FreeRTOS Software Timers

FreeRTOS Software Timers

Continue reading

Debugging ARM Cores with IP based Debug Probes and Eclipse

Using IP (Ethernet) based debug probes is a very handy thing: I don’t have to be directly connected to the debug probe (e.g. with the USB cable). This article explains how to use an IP-based Segger or P&E probe with the Eclipse based MCUXpresso IDE.

LAN Based Debugging

LAN Based Debugging

Continue reading

Recovering OpenSDA Boards with Windows 10

Windows 8 and 10 have added a ‘feature’ to scan and index devices attached to the host machine. This means that bootloaders or MSD (Mass Storage Device) programming implementations on evaluation boards developed in the Windows 7 age might not be prepared for that. Up to the point that it can impact the bootloader as outlined in “Bricking and Recovering OpenSDA Boards in Windows 8 and 10“. So far one of the easiest way to get out that situation was to use a Windows 7 machine. But if you only have a Windows 10 machine available, this article describes the needed steps to update the bootloader with Windows 10 host machines.

OpenSDA LED

OpenSDA LED

Continue reading

Converting Binary Files to Intel Hex Format with the SRecord Tool

I’m dealing a lot with bootloaders recently (see “Flash-Resident USB-HID Bootloader with the NXP Kinetis K22 Microcontroller“), and bootloaders are sometimes very picky about what file format they are able to consume. So what if I have a binary (see “S-Record, Intel Hex and Binary Files“) file and I need to convert it into the Intel Hex format?

converted binary to intel hex

converted binary to intel hex

Continue reading

Tutorial: CRC32 Checksum with the KBOOT Bootloader

In “Flash-Resident USB-HID Bootloader with the NXP Kinetis K22 Microcontroller” I presented how I’m using the tinyK22 (or FRDM-K22F) with a flash resident USB HID bootloader. To make sure that the loaded application is not corrupted somehow, it is important to verify it with a Cyclic redundancy Checksum (CRC). The NXP KBOOT Bootloader can verify such a CRC, but how to generate one and how to use it is not really obvious (at least to me), so this article explains how to generate that CRC.

CRC Values for KBOOT

CRC Values for KBOOT

Continue reading

Flash-Resident USB-HID Bootloader with the NXP Kinetis K22 Microcontroller

The tinyK22 board (see “tinyK22 Boards arrived“) gets rolled out at the Lucerne University of Applied Sciences and Arts, so I thought I write-up an article this weekend how to use that board with a Flash Resident Bootloader.

tinyK22 with USB HID Bootloader

tinyK22 with USB HID Bootloader

Continue reading