VS Code: MCUXpresso SDK Repository

In a previous article I have installed the MCUXpresso extension and used the MCUXpresso Installer to install the necessary development tools.

In this article I’m going to import the SDK.

Import Repository in VS Code
Continue reading

Tutorial: Creating and using ROM Libraries with GNU Build Tools

You might never heard about ROM Libraries, and you are probably not alone. Some might thing that this refers to the boot ROM modern MCUs have built in, which is kinda close. But the thing here is about to build your own (possibly constant) ROM library, program it to your device of choice, and then use it from the application running on the device.

So the concept is to have a (fixed, stable) part with code and data on your device, which can be used by a (possibly changing) application: Think about a stable LoRaWAN network stack in the ROM, with a changing application using it: Would that not be cool?

ROM Library Concept

This not only adds flexibility, but as well allows smaller updates, as only a part of the program has to be changed or updated.

The question is: how to create and use such a ROM Library with the normal GNU build tools?

Continue reading

MCUXpresso IDE 11.5.0

I’m now in the middle of the university fall semester exam season with writing exams and grading student work, and the same time the new semester courses need to be prepared. With the global silicon and board shortage, this will be again a challenge to equip all the labs with the needed infrastructure. The good thing is that there is no shortage on software and tools side of the infrastructure: NXP released last week their new flagship Eclipse based IDE: the MCUXpresso IDE 11.5.0. Time to check it out for the upcoming lectures and classes….

NXP MCUXpresso IDE Version 11.5.0

Spoiler Alert: It has a new view for FreeRTOS lovers, plus new features for energy/power measurements!

Continue reading

LoRaWAN with NXP LPC55S16 and ARM Cortex-M33

LoRaWAN is getting more an more popular, both for terrestrial and increasingly with low-orbit satellite systems. The ‘Long Range’ in ‘LoRa’ makes it an ideal solution for low-power and low data rate applications. For a university research project we selected the Semtech SX1261/62 transceiver together with the NXP LPC55S16 mikrocontroller. Because the board used for that project is not available for the public (yet), I share here how you can run the LoRaWAN stack with the NXP LPC55S16-EVK.

LoRaWAN with Semtech SX126x and NXP LPC55S16
Continue reading

MCUXpresso IDE 11.4.0

University exam grading are all done now and results are in the system, and it is already time to prepare for the fall semester. I always try to use the latest and greatest tools in my courses, and the NXP MCUXpresso IDE 11.4.0 just came out. So time to have a look and explore the changes and features.

Debugging with NXP MCUXpresso IDE 11.4.0
Continue reading

Placing Code in Sections with managed GNU Linker Scripts

Managed linker scripts are great on one side: the simplify the otherwise complex GNU linker script handling. On the other side it requires knowledge how to tweak them in case ‘non-standard’ behavior is needed.

Continue reading

Touch & Build: Auto-Update of Firmware Date and Time

It is very valuable to have a date and time information in the binary. That way for example using a shell I can check the version of the firmware running on a device, or it can be printed on a console or UART as needed.

Firmware Date and Time

Firmware Date and Time

Continue reading

MetaClockClock Build Instructions

If you are not aware (yet?): it looks like the COVID pandemic caused a global silicon and microcontroller shortage with lead times >50 weeks in some cases. The microcontroller I have used for the MetaClockClock build (see “New MetaClockClock V3 finished with 60 Clocks” and “MetaClockClock V4 for the Year 2021“) is affected by this too, but I had luck and still enough microcontrollers to build a few more boards.

So I still have enough for building a new variant with it (not finished yet). While everyone else is waiting for the devices to arrive, here are more details and instructions for your own build.

MetaClockClock Temperature Display

MetaClockClock Temperature Display

Continue reading

“java.net.SocketException: Connection reset”: Check your Windows Updates!

One of the most frustrating part developing embedded applications is if the debug connection fails somehow: with all the different factors like operating system, virtual machines, USB ports and hubs, debug probe and firmware a ‘connection failed’ is my nightmare. And this is probably the most frustrating parts for my students (and myself!)

I do have a growing list of tips & tricks in “Debugging Failure: Check List and Hints“, so check this list. What I just have added is an entry for

java.net.SocketException: Connection reset

It occurred for a few students when they wanted to use the on-board CMSIS-DAP LinkServer debug connection on the NXP LPC845-BRK.

NXP LPC845-BRK Board

NXP LPC845-BRK Board

Continue reading

Tutorial: GNU Coverage with MCUXpresso IDE

If you are developing Linux or desktop applications with GNU tools, you  very likely are familiar with gcov: the GNU coverage tool. It collects data what parts of the code gets executed and represents that in different formats, great to check what is really used in the application code or what has been covered during multiple test runs.

Coverage Information with gcov

Coverage Information with gcov

line never executed

line never executed

GNU coverage is possible for resource constraint embedded systems too: it still needs some extra RAM and code space, but very well spent for gathering metrics and improves the firmware quality. As I wrote in “MCUXpresso IDE V11.3.0 for 2021” things are now easier to use, so here is a short tutorial how to use it.

Continue reading