MCUXpresso IDE: Blinky the NXP LPC800-DIP Board

During Embedded World 2017 in Nürnberg I was lucky to get a handful LPC800-DIP boards. To get all students who were lucky to get one, here is a tutorial to make that very exciting ‘blinky’ application on that board:

Blinky on the NXP LPC800-DIP

Blinky on the NXP LPC800-DIP

Continue reading

Advertisements

Using the LPCXpresso V2/V3 Boards to Debug an external Board

The MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“) has one great feature: it includes debug support for the popular LPC-Link2 debug probes. That way I have yet another powerful debug probe with extra features for ARM based boards. That LPC-Link2 circuit is present on many LPCXpresso boards from NXP. So why not using it to debug it my custom hardware?

Debugging Custom Hardware with LPCXpresso Board

Debugging Custom Hardware with LPCXpresso Board

Continue reading

Is Developing for ARM more difficult than for other Architectures?

I believe in ‘life-long-learning’. With this I continue to learn and discover new things every day. I’m writing tutorials to give something back to the community from which I have learned so much.

On top of this, I receive emails on a nearly daily basis, asking for help. Many articles have the origin in such requests or questions. I prefer questions or comments in a public forum, because that way I feel all others can benefit from it. Last week Alessandro contacted me with this:

“Hi Erich,

I hope this find you well! I’m starting to using ARM processors, but I find them quite complicated on the configuration side. I started in the past with PIC micro (PIC16) with asm, and I found them quite straightforward to be configured (clock, IO, peripherals, …). Then I moved myself on C language, and on PIC18 without any big issues.

Now I would really like join the ARM community, I see that these processors are what I’ve always looking for, on energy, calc power, peripherals, and FINALLY on IDE (editor, toolchain and utilities)… AMAZING!!!”

The topic is about how to start learning developing for ARM. Alessandro agreed to make this public, so I thought this might be a good topic for an article?

Firmware

Firmware

Continue reading

Modifying the Teensy 3.5 and 3.6 for ARM SWD Debugging

Looking for a small, inexpensive ($25-30) ARM development board (say 120-180 MHz ARM Cortex-M4 with FPU, 512kB-1MB of FLASH and 256 KByte of RAM? Then have a look at the Teensy 3.5 and Teensy 3.6 by PJRC/Paul Stoffregen:

Teensy 3.6 with NXP K64

Teensy 3.5 with NXP K64F ARM Cortex-M4F

The only problem? it is not possible to debug it :-(. At least not in the traditional sense. This article is about how to change the board to use it with any normal SWD debugging tool e.g. Eclipse and the Segger J-Link :-).

Continue reading

Tuturial: mbedTLS SSL Certificate Verification with Mosquitto, lwip and MQTT

In “Tutorial: Secure TLS Communication with MQTT using mbedTLS on top of lwip” I already used TLS for a secure communication, but I had not enabled server certificate verification. This article is about closing that gap.

MQTT running on NXP FRDM-K64F

Secure MQTT running on NXP FRDM-K64F with lwip and mbed TLS

Continue reading

Tutorial: Secure TLS Communication with MQTT using mbedTLS on top of lwip

One of the most important aspects of the ‘IoT’ world is having a secure communication. Running MQTT on lwip (see “MQTT with lwip and NXP FRDM-K64F Board“) is no exception. Despite of the popularity of MQTT and lwip, I have not been able to find an example using a secure TLS connection over raw/native lwip TCP :-(. Could it be that such an example exists, and I have not found it? Or that someone implemented it, but has not published it? Only what I have found on the internet are many others asking for the same kind of thing “running MQTT on lwip with TLS”, but there was no answer? So I have to answer my question, which seems to be a good thing anyway: I can learn new things the hard way :-).

Blockdiagram MQTT Application with TLS using lwip

Block diagram MQTT Application with TLS using lwip

Continue reading

MQTT with lwip and NXP FRDM-K64F Board

In the area of IoT (Internet of Things), one obvious need is to have a way to send and receive data with an internet protocol. MQTT (or Message Queue Telemetry Transport) is exactly like that: a light-weight Machine-to-Machine communication protocol. With the MQTT protocol a microcontroller (or ‘client’) can send data and/or subscribe to data. For example to the Adafruit.IO:

Adafruit MQTT IO Feed

Adafruit MQTT IO Feed

Continue reading

The Influence of Software and Tools on ARM Cortex-M Microcontroller Vendor Selection

For me, the available software and tools are the primary key decision factor why I select a particular silicon vendor. Without good software and tools, a microcontroller only ‘sand in plastic case’, even if it is the best microcontroller in the world. I do have several probably excellent microcontroller boards, and they are only getting touched by more durst over the months and years.

Undusted LPC824 Board

Undusted LPC824 Board

Continue reading

MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers

There are many mergers going on in the industry, and one of the largest one was in 2016 the integration of Freescale Semiconductor with NXP Semiconductors, with both providing Eclipse based IDE’s to their customer base. Consequently, the company merger triggered a merger of the IDE’s, and last week NXP has released the result: the MCUXpresso IDE.

MCUXpresso IDE

MCUXpresso IDE

Continue reading

Simulating Space on Earth: Irradiation Tests at the Paul Scherrer Institute

Space is a hostile environment. Sending hardware to space means putting it under irradiation tests: exposing the object to radiation and see what happens :-). For this, under the lead of the ETHZ (Mathematical and Physical Geodesy), we had the opportunity to put the CubETH payload board under a proton beam. The test facility is at the Paul Scherrer Institute (PSI) in Villigen, Switzerland:

Control Room at PSI

Control Room at PSI

Continue reading

Tutorial: Using Eclipse with NXP MCUXpresso SDK v2 and Processor Expert

To me, software and tools are by far more important than the microcontroller. Because the silicon is a ‘one time kind of thing’, where the software has to be maintained and working over a longer time. And at least my software usually needs to be ported to a new device, so portability and available software and tools are critical to me.

The combination of MCUXpresso SDK (formerly Kinetis SDK) and Processor Expert is unfortunately not supported by NXP. But I have found a way to get them work together in a nice way, and this article is about making that combination possible :-).

SDKv2 Project with Processor Expert

SDKv2 Project with Processor Expert which is supposed not to work together

Continue reading

Embedded World Nürnberg 2017 Impressions: MCUXpresso, Hexiwear, NTAG, LPC800-DIP and Alan Hawse

This year I managed to attend the Embedded World in Nürnberg/Germany after missing the 2016 show. And 2017 has been a blast! With more than 1000 exhibitors and >30’000 visitors it was huge! There were too many exciting things, so I just pick a few: NXP demonstrated the new MCUXpresso Software and Tools with a new Eclipse Neon based IDE, lots of IoT and Hexiwear, the tiny LPC800-DIP board, and I have met Alan Hawse in person!

Impresson from the Show (embeddedworld 2017)

Continue reading

What is “Realtime Debugging”?

Questions from students or readers of my articles are a great source for all kind of articles. And here is the ‘question of this week’: “What is realtime debugging”?

It’s a good question because the topic of ‘realtime’ and ‘debugging’ was a topic in the lectures this week. So this question gives me the opportunity to combine the two things of ‘realtime’ and ‘debugging’, I love it :-).

Debugging Setup

Debugging Setup

Continue reading

Percepio FreeRTOS Tracealyzer Plugin for Eclipse

Good news for everyone using Eclipse, FreeRTOS and Percepio Tracealyzer: Percepio has released an Eclipse plugin which makes snapshot tracing very easy and convenient using the a GNU gdb debugger in Eclipse like Kinetis Design Studio:

Eclipse with Percepio Tracealizer

Eclipse with Percepio Tracealyzer

Continue reading

eSOMiMX6-micro: NXP i.MX6 System on Module

An interesting trend in the industry are SOM (System on Module): a high performance processor typically running Linux, Windows or Android with all the memory and necessary power logic gets put on a small module. The key benefit is that I don’t need to worry about the complex ball grid routing and the DDR memory connections/lines: all these problems are solved on a small module which then I can use in my design. It seems that NXP i.MX application processors are getting popular in this domain, and after looking at the Toradex Colibri modules, I have an i.MX6 module on my desk from e-con Systems:

eSOMiMX6-micro Top Side

eSOMiMX6-micro Top Side

Continue reading

P&E ARM Cortex-M Debugging with FreeRTOS Thread Awareness and Real Time Expressions for GDB and Eclipse

P&E has a new version of their GDB/Eclipse debug plugins available on their Eclipse update site, and it comes with to great features: Real Time Expressions (show variables while target is running) and  FreeRTOS thread awareness 🙂

FreeRTOS Thread Awareness

FreeRTOS Thread Awareness

Continue reading

Remote Board Debugging: J-Link Remote Server with Eclipse

For a CubeSat project we only have a single board available. But multiple universities and developers need to have access to that board for developing and debugging the firmware. We cannot easily ship around the board: that takes a lot of time and during shipment nobody can use the board.

There is a nice feature in the Segger J-Link software which allows to share the debug connection over the network: the J-Link Remote Server. It even works nicely between different networks without complicated firewall setup:

Connected in Tunnel Mode

Connected in Tunnel Mode

Continue reading

Zephyr: Thoughts and First Steps on the ARM Cortex-M4F with gcc, gdb and Eclipse

The concept of Linux (Open Source, broad developer base and broad usage) is a success story. While there is a lot of diversity (and freedom) in the Linux world, Linux is Linux and again Linux :-). And the world has (mostly) standardized on Linux and its variants on the high embedded system side.

On the other side, the ‘middle and lower end’ Embedded world is fragmented and in many aspects proprietary. So it was no surprise to me when the Linux Foundation announced the ‘Zephyr’ project back in February 2016:

“The Linux Foundation Announces Project to Build Real-Time Operating System for Internet of Things Devices. Open source Zephyr™ Project aims to deliver an RTOS; opens call for developers to help advance project for the smallest footprint IoT devices.

Ζεφυρος (Zephyros) is the Greek good of spring and the west wind. Obviously this inspired the logo for the Zephyr project:

Zephyr logo

Zephyr logo (Source: https://www.zephyrproject.org/)

Continue reading

Reprogramming the Mikroelektronika Hexiwear Dockingstation

The Hexiwear docking station would have a nice feature: it has embedded a debug circuit (OpenSDA). That way I would not need an external debug probe to debug the Hexiwear. However, a debug probe is required to reprogram the docking station itself:

Repgrogramming the Mikroelektronika Docking Station

Repgrogramming the Mikroelektronika Docking Station

Continue reading

Debugging ARM Cortex-M0+ HardFaults

To me, one of the most frustrating things working with ARM Cortex-M cores are the hard fault exceptions. I have lost several hours this week debugging and tracking an instance of a hard fault on an ARM Cortex-M0+ device.

Next assembly step will cause a hard fault

Next assembly step will cause a hard fault

Continue reading