Unknown's avatar

About Erich Styger

Embedded is my passion....

Solving Linker Error: “cannot move location counter backwards”

Upgrading to a newer GNU toolchain always has its risks. That’s why I always recommend to stay on a given toolchain for production code.

But sometimes one needs to upgrade, or gets a code or project that works in one environment, but not in another. Today I have run into a problem with code read-out projection:

Disabled Automatic Placement of Code Read Protection

Well, the code read-out protection is not the root of the problem, but a good example why problems could occur.

Continue reading

Integrating Solar-Surplus-Charge-Controller into EV Wallbox

Solar panels and electrical vehicles become more and more common in Switzerland. Ten years ago I installed solar panels. To use the available solar energy, the electrical vehicle charging box has been augmented with an open source charge controller. The controller monitors the building energy usage and adjusts the current using the Modbus connection to the charger.

Integrated Charger Controller into Wallbox
Continue reading

VS Code: Building the Project

In a previous article I have imported an example project. Now I want to compile and build it.

Traditionally, the build action inside VS Code is somewhat hidden. There is a keyboard shortcut, but recent additions to VS Code making the build action more accessible.

Multiple ways to start a build in Visual Studio Code
Continue reading

Stoos Ridge Hike

The ridge path linking the Fronalpstock and Klingenstock peak is one of the must stunning high trails in the central part of Switzerland. With views to many lakes and other peaks. With a duration of around 2 hours hiking time, and 400 meters up and down, it is a medium mountain hiking trail.

View from the Klingenstock down to Stoos
Continue reading

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

Laser-cut MCU-Link Pro Enclosure for the Masses

With “Adding RGBW Wings and Enclosure to a Debug Probe” I have a really shiny enclosure for the MCU-Link Pro Enclosure.

But I did not had enough time to replicate this for a full set of classroom hardware. The original card boxes from NXP showed already after one semester severe wear, so I have to setup something more robust: a box to store all the cables, and an enclosure to protect the PCB, for 40 units.

3D printing would take to much time, so I ended up with buying storage boxes and creating an laser-cut acrylic (PMMA) enclosure for the debug probe itself:

MCU-Link Pro Enclosure
Continue reading

Assigning Nicknames to Debug Probes

Dealing with and debugging distributed systems, I end up with multiple debug probes and target boards on my desk. When starting a debugging session, it can be hard to identify a debug probe by its serial number. What I do in such a situation: put a color stick on the debug probe and have it assigned a nickname.

Debug Probes with Nicknames

That nickname then shows up during the debug connection, and I’m sure I connect to the right probe and board that way.

Continue reading

VS Code: MCUXpresso Installer

VS Code is managing its extensions (see VS Code: MCUXpresso Extension). But to make it usable for embedded development, you need more tools: compiler, linker, debugger, libraries, build system, debug probe support, …

For the experts, this is not a big deal: you know where to get them, and you install them, as shown with another tutorial. But for a class full of students or newcomers to VS Code, this can be a a time consuming and daunting task.

To make the installation easier, NXP has released a ‘dependency checker and installer’ along with their VS Code extension, which makes the setup much easier and simpler.

MCUXpresso Installer
Continue reading