Programming the ESP32 with an ARM Cortex-M USB CDC Gateway

The Espressif ESP32 devices are getting everywhere: they are inexpensive, readily available and Espressif IDF environment and build system actually is pretty good and working well for me including Eclipse (see “Building and Flashing ESP32 Applications with Eclipse“). The default way to program an ESP32 is to a) enter UART bootloader by pressing some push buttons and b) flash the application with ESP-IDF using a USB cable.

That works fine if the ESP32 is directly connected to the host PC. But in my case it is is behind an NXP Kinetis K22FX512 ARM Cortex-M4F microcontroller and not directly accessible by the host PC. So I had to find a way how to allow boot loading the ESP32 through the ARM Cortex-M which is the topic of this article.

TTGO ESP32 MICRO-D4 Module

TTGO ESP32 MICRO-D4 Module

Continue reading

Advertisements

DIY Stepper Motor Clock with NXP LPC845-BRK

This project is about building a stepper motor clock around the NXP LPC845-BRK board. The design is using a combination of 3D printed and laser cut parts and costs below $15.

Stepper Clock Acrylic Face White Hands

Stepper Clock Acrylic Face White Hands

Continue reading

Building and Flashing ESP32 Applications with Eclipse

The new semester is approaching in a very fast way, and so is the new lecture and lab module ‘Advanced Distributed Systems’ at the Lucerne University. For that module we are going to build a new ‘Sumo’ style robot with WLAN capabilities using the ESP32 chip. It will be a new robot PCB, and below is the current robot (based on NXP K22FX512) with the WLAN module connected to it:

Zumo connected to TTGO ESP32 module

Zumo connected to TTGO ESP32 module

Continue reading

Restoring Default Firmware on Seeed Arch Mix NXP i.MX RT1052 Board

In my previous article “Debug and Execute Code from FLASH on the Seeed Arch Mix NXP i.MX RT1052 Board” I explained how to take complete control over the board and flash and debug a firmware. Of course this overwrites the one which comes by default shipped on the board. This article is about how to restore or update the original firmware.

Restored Seeed Firmware

Restored Seeed Firmware

Continue reading

Debug and Execute Code from FLASH on the Seeed Arch Mix NXP i.MX RT1052 Board

In my previous article “Seeed Studio Arch Mix NXP i.MX RT1052 Board” I described how I can use and debug the Seeed Arch Mix Board. But so far I only had things running in RAM. Ultimately I want to use the QSPI FLASH memory on the device with my firmware and running code on it. This article shows how to get from RAM execution to SPI FLASH in-place execution (XiP).

Seeed Arch Mix NXP i.MX RT1052 Board

Seeed Arch Mix NXP i.MX RT1052 Board

Continue reading

Seeed Studio Arch Mix NXP i.MX RT1052 Board

The Seeed Studio ‘Arch Mix’ board is a small and versatile development board with an NXP i.MX RT1052 on it, and it costs only $29.90. So I was not able to resist and just have ordered one so I can explore it.

Seeed Arch Mix Top Side

Seeed Arch Mix Top Side

Continue reading

DIY Wireless Magnetic Levitating Moon Lamp

If your child is making a special wish, you will do everything to make it happen, right? So my daughter’s wish was a ‘moon lamp’. And here is it: a magnetic levitating (MagLev) wireless moon light:

MagLev wireless LED Moon

MagLev wireless LED Moon

Continue reading

Generating Intel Hex Files with a given Length using srec_cat

The ‘standard’ binary files for many tools are S19, binary or Intel Hex files. Especially for S19 and Intel Hex it can be useful to control the amount of data per line. By default, the GNU objcopy creates files with a line length of 44 characters:

default objcopy binary file line length

default objcopy binary file line length

But it is possible to have Intel Hex files with an custom line length using the SRecord utility, and this is what this article is about.

Continue reading

New NXP MCUXpresso Eclipse IDE v11.0

A few days ago NXP has released a new version of their Eclipse IDE flagship: the MCUXpresso IDE v11.0.

NXP MCUXpresso IDE V11.0.0

NXP MCUXpresso IDE V11.0.0

The previous v10.3.1 was released back in Feb 2019, and the 11.0 now in June this year matches up with the Fall university semester. I appreciate that the releases are about every 6 months, so this gives me time to use it in my university lecture material and lab work. I had the weekend for trying it out, and I’m very pleased.

Continue reading

SWO with NXP i.MX RT1064-EVK Board

With the cost of an single pin, many ARM Cortex-M boards including the NXP i.MX RT1064 can produde SWO data: think about a pin able to stream data out of the chip in realtime. For example interrupt activity which otherwise might be hard to capture:

SWO Interrupt Trace

SWO Interrupt Trace

Continue reading

MCUXpresso Eclipse IDE Mouse Tips & Tricks

In a modern development workflow both command-line and a graphical user interface has its place. On the GUI side, Eclipse is famous that it offers many different ways to accomplish something which is great. But sometimes I continue to use an old habit or way because I have missed that there is a newer and better way, and the MCUXpresso Eclipse IDE is no exception to that. In this article I show a few ways how to use the mouse even more productive.

Project Settings

Project Settings

Continue reading

Tutorial: MCUXpresso SDK with Linux, Part 3: RAM and XiP Code on i.MX RT1064

In my previous articles I have used the command line on Linux to build and debug NXP MCUXpresso SDK applications. In this article I’m running code on NXP i.MX RT1064 in RAM or FLASH.

i.MXRT1064 board with LPC845-BRK as debug probe

i.MXRT1064 board with LPC845-BRK as debug probe

Continue reading

TrustZone with ARMv8-M and the NXP LPC55S69-EVK

The ARM TrustZone is an optional secu=rity feature for Cortex-M33 which shall improve the security for embedded applications running on microcontroller as the NXP LPC55S69 (dual-core M33) on the LPC55S69-EVK.

NXP LPC55S69-EVK Board

NXP LPC55S69-EVK Board

Continue reading

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

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

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

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

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

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