About Erich Styger

Embedded is my passion....

First Steps with the LPC55S69-EVK (Dual-Core ARM Cortex-M33 with Trustzone)

For the long Easter weekend I have organized a new toy: the NXP LPC55S69-EVK board: a dual ARM Cortex-M33 running at 100 MHz with ARM TrustZone:

LPC55S69 Microcontroller

LPC55S69 Microcontroller

Continue reading

Advertisements

Dandelion, Snow and Mythen

Image

The long Easter Weekend has its benefits, beside of preparing lecture material and writing up geeky technology articles :-). I love that view with meadows sprinkled with all the Dandelion, and the snow-covered mountains in the back. Back on the left the peaks of the Mythen.

Mythen Panorama

Talkessel Schwyz (click to enlarge)

Continue reading

Tutorial: MCUXpresso SDK with Linux, Part 2: Commandline Debugging with GDB

In “Tutorial: MCUXpresso SDK with Linux, Part 1: Installation and Build with Maked” I used cmake and make to build the SDK application. In this part I’m going to use the command line gdb to debug the application on the board.

Cross-Debugging with GDB

Cross-Debugging with GDB

Continue reading

Tutorial: MCUXpresso SDK with Linux, Part 1: Installation and Build with Make

I admit: my work laptop machine is running a Windows 10 OS by default. But this does not prevent me running Linux in a Virtual Machine (VM). Each host platform has its benefits, and I don’t feel biased to one or the other, but I have started using Ubuntu more and more, simply because I have worked more on Embedded Linux projects. While I have used mostly Windows with Eclipse for NXP LPC, Kinetis and i.MX platforms in the past, I started using Ubuntu too from last year with the NXP MCUXpresso SDK. I did not find much documentation about this on the web, so I thought it might be a good idea to write a tutorial about it. So here we go…

Building NXP MCUXpresso SDK on Linux Ubuntu

Continue reading

Log2Ram: Extending SD Card Lifetime for Raspberry Pi LoRaWAN Gateway

My LoRaWAN gateway (“Contributing an IoT LoRaWAN Raspberry Pi RAK831 Gateway to The Things Network” is running and working great now for more than a month and it already has transmitted more than 30k messages:

Gateway Overview

Gateway Overview

This creates a lot of log entries on the micro SD card of the Raspberry Pi. To avoid writing too many times log data, I have installed Log2Ram.

Continue reading

Be aware: Floating Point Operations on ARM Cortex-M4F

My mantra is *not* to use any floating point data types in embedded applications, or at least to avoid them whenever possible: for most applications they are not necessary and can be replaced by fixed point operations. Not only floating point operations have numerical problems, they can lead to performance problems as in the following (simplified) example:

#define NOF  64
static uint32_t samples[NOF];
static float Fsamples[NOF];
float fZeroCurrent = 8.0;

static void ProcessSamples(void) {
  int i;

  for (i=0; i<NOF; i++) {
    Fsamples[i] = samples[i]*3.3/4096.0 - fZeroCurrent;
  }
}

Continue reading

Tutorial: RAK813 LoRaWAN+BLE+GPS Sensor Node with Eclipse IDE

In the IoT world, it is all about security, connectivity and low power. LoRaWAN with the Things Network is able to connect devices over several kilometers, and I’m running my gateway for it already (see “Contributing an IoT LoRaWAN Raspberry Pi RAK831 Gateway to The Things Network“). This tutorial is about building a BLE+LoRaWAN+GPS sensor node with GNU tools and Eclipse:

LoRa+BLE with RAK813 and LPC845

LoRa+BLE with RAK813 and LPC845

Continue reading

Running FreeRTOS on the VEGA RISC-V Board

In “Debugging the RV32M1-VEGA RISC-V with Eclipse and MCUXpresso IDE” I described how to build and debug applications for the VEGA RISC-V board. In this article I describe how to enable FreeRTOS for RISC-V, based on the latest FreeRTOS V10.2.0 release.

Blinky with FreeRTOS on the VEGA RISC-V Board

Blinky with FreeRTOS on the VEGA RISC-V Board

Continue reading

Debugging the RV32M1-VEGA RISC-V with Eclipse and MCUXpresso IDE

The ARM Cortex cores are everywhere. I like (and use) them a lot. Don’t take me wrong: maybe ARM needs some competition? It is very refreshing to see that something new is getting a lot of attention: RISC-V!

RV32M1

RV32M1 (VEGA)

Continue reading

Remote Debugging with USB based JTAG/SWD Debug Probes

For some projects it is not possible to have the device under debug available on my desk: the board might be in another room, on another site or in a place where physical access is not possible or even dangerous. In that case an IP-based debug probe (see Debugging ARM Cores with IP based Debug Probes and Eclipse) is very useful: as long as I can access its IP address, that works fine. It is an excellent solution even if the board is moving or rotating: hook it up to a WLAN access point and I still can use it as it would be on my desk.

But what if I have a debug probe only connected to USB? This article shows how to turn a USB debug probe into a IP-based debug solution: that way I can easily debug a board from remote, connected to the network:

IP Based Debugging with USB Debug Probe

IP Based Debugging with USB Debug Probe

Continue reading

Contributing an IoT LoRaWAN Raspberry Pi RAK831 Gateway to The Things Network

LoRa and LoRaWAN is getting the de-facto wireless IoT network in my area. No surprise that traditional telecom providers like Swisscom trying to monetize the ‘Internet of Things’ area. Luckily there is an open and free alternative: https://www.thethingsnetwork.org/. Volunteers, enthusiasts and members in the different TTN communities build gateways and offer free LoRaWAN network access. I wanted to contribute to that grassroots movement with building my gateway, providing LoRaWAN access to my neighborhood.

LoRaWAN TheThingsNetwork Gateway

LoRaWAN TheThingsNetwork Gateway

Continue reading

MCUXpresso IDE V10.3.1 available

On Friday a new release of the Eclipse Oxygen based NXP MCUXpresso IDE V10.3.1 has been made available. The IDE supports MacOS, Linux and Windows 32/64-bit and will be 64-bit only going forward.

MCUXpresso 10.3.1 About Information

MCUXpresso 10.3.1 About Information

Continue reading

Different Ways of Software Configuration

Most of the time software needs some way to configure things: depending on the settings, the software will do different things. For example the software running on the microcontroller on top of the Raspberry might have the OLED LCD available or not:

Raspberry Pi and tinK22 with OLED LCD

Raspberry Pi and tinyK22 (NXP Kinetis K22FN512) with OLED LCD

How can I deal with this in my application code? Continue reading

Debugging the Startup Code with Eclipse and GDB

By default, when debugging an embedded application, the target usually stops at main():

stopped in main

stopped in main

That’s usually fine, but what if I want to debug the code out of reset?

Continue reading

Tutorial: Changing ARM Cortex Core or Microcontroller in Eclipse CDT Projects

Sometimes I start a project with an ARM microcontroller, and in the middle of the project I find out that it was a wrong choice at the beginning and I need to switch the microcontroller derivative or even the used ARM core. With little knowledge of the project structure and the files needed, such a switch is not the easiest thing, but definitely possible.

switching cores

switching cores

Continue reading

Tutorial: Blinky with the NXP LPC845-BRK Board

The NXP LPC845-BRK board is a sub-$6 breadboard friendly development board with an ARM Cortex-M0+ on it. This tutorial is about developing a ‘blinky’ on it using MCUXpresso.

Binky on NXP LPC845-BRK Board

Binky on NXP LPC845-BRK Board

Continue reading

Tutorial: Transforming the NXP LPC845-BRK into a CMSIS-DAP Debug Probe

The NXP LPC845-BRK board is a tiny an inexpensive (sub $6) breakout board. The board includes a CMSIS-DAP (LPC11U35) on-board debug probe which can be used as a debug probe to debug any NXP LPC, Kinetis or i.MX RT device 🙂

LPC845-BRK used to debug robot

LPC845-BRK used to debug a Sumo Battle Robot

Continue reading

Tutorial: Using external Debug Probes with NXP LPC845-BRK Board

One great thing with that new NXP LPC845-BRK board is that it is possible to use it with any standard SWD/JTAG debugger, as it has the 10pin debug header present on the board. It is not populated by default, because the LPC845-BRK includes a CMSIS-DAP debug probe already. But if I want to use a SEGGER J-Link, a P&E Multilink or the NXP LPCLink2, this is certainly something to consider:

Debugging LPC845-BRK with LPC-Link2

Debugging LPC845-BRK with LPC-Link2

Continue reading