Using Multiple Memory Regions with the FreeRTOS Heap

ARM Cortex-M microcontrollers can have multiple memory controllers. This is a good thing as it allows the hardware to do multiple parallel memory read/writes. However this makes the memory map more complicated for the software: it divides the memory into different regions and memory segments.  This article is about how to enable FreeRTOS to use multiple memory blocks for a virtual combined memory heap:

FreeRTOS with Segmented Heap Memory

FreeRTOS with Segmented Heap Memory

Continue reading

Advertisements

WiFi OLED Mini Weather Station with ESP8266

I’m convinced that this ‘Internet of Things’ thing-thing is not real. Pure marketing and buz words without any added value, right? The IoT hype is so bizar: it must be originated by aliens which have taken over the brains of all the Pointy-haired Bosses of the world? There is no useful application or use case out there!

But wait! There *is* actually good use case, at least for the geeks of this world. We all love clocks as we want to know the time, and we all love the weather forecast so we can plan accordingly. At least I usually do :-).

SQUIX ESP8266 Mini Weather Station

SQUIX ESP8266 Mini Weather Station

Continue reading

Using the GNU Linker Script to know the FLASH and RAM Areas in the Application

Sometimes it is handy to know in the running application the start address, end address and the size of a linked section, e.g. to know the boundaries of RAM or FLASH areas. This means that from the application code I can get access to knowledge of the GNU linker:

Information about Linker Sections

Information about Linker Sections

Continue reading

Recovering and Updating the NXP OpenSDA Bootloader with P&E Multilink and MCUXpresso IDE

Many of the NXP OpenSDA boot loaders are vulnerable to Windows 8.x or Windows 10: write accesses of Windows can confuse the factory bootloader and make the debug firmware and bootloader useless. In this post I show how to recover the bootloader using MCUXpresso IDE and the P&E Universal Multilink.

Using P&E Multilink Universal to restore the OpenSDA Bootloader on NXP FRDM-K22F Board

Using P&E Multilink Universal to restore the OpenSDA Bootloader on NXP FRDM-K22F Board

Continue reading

Tutorial: Porting BLE+NRF Kinetis Design Studio Project to MCUXpresso IDE

The tools and IDE market is constantly changing. Not only there is every year at least one new major Eclipse IDE release, the commercial tool chain and IDE vendors are constantly changing the environment too. For any ARM Cortex-M development, the combination of Eclipse with the GNU tool chain provided by ARM Inc. is the golden standard. But this does not mean that things can be easily moved from one IDE package to another.

While moving between Eclipse versions and GNU versions is usually not a big deal at all, moving between the Eclipse build tool integration is usually not simple. While the GNU MCU Eclipse plugins are widely used (see Breathing with Oxygen: DIY ARM Cortex-M C/C++ IDE and Toolchain with Eclipse Oxygen), the Eclipse based IDEs from the silicon vendors or commercial Eclipse toolchain vendors are using  their own GNU toolchain integration. Which means the project files are not compatible :-(.

NXP FRDM-KW41Z Board

NXP FRDM-KW41Z Board

Continue reading

Tuning a Laser Cutter and Determine the Maximum Usable Laser Power

The question has been: If I buy such a 50 Watt cheap laser cutter from China, how many Watts does it really have? I have read all these stories that usually what is advertised is only the theoretical maximum I could get, and will not be realistic at all. This article is about how I tuned the machine and how much I got out of it.

Different Laser Power

Different Laser Power

Continue reading

Laser Engraving for a Card Box

We are creating a new course (PRG-G) at the Lucerne University. This course teaches C programming and is part of the new curriculum in EE (Electrical Engineering). Every student will receive a microcontroller board on an extension board as give-away, in a custom card box for the board and cable. To make things a bit more exciting, why not laser engrave that box? That gives me a perfect excuse to experiment with the laser cutter 🙂

Laser Engraved Card Box

Laser Engraved Card Box

Continue reading

Why you should not use Arduino for Professional Work

Have a read at http://embedded.fm/blog/2017/8/12/dont-use-arduino-for-professional-work.

I love the Arduino ecosystem, and it is great for getting something up and running quickly for a ‘proof of concept’. But it stops at that point.

I think it should be obvious why Arduino (code and libraries) should not be used for professional work. Especially the lack of proper debugging support makes it nearly impossible to solve the problems of the real world.’printf()’ style of debugging is simple, but it is a huge waste of time. I have seen too many student projects failing because the inability to properly debug the system and solve the problems.

Even equally important for professional work is the topic of IP and licensing. Be aware of the licensing terms and conditions as pointed out by above article. If not, your product easily get GPL’d which might not want you want.

Arduino

Arduino

Happy Arduinoing 🙂

Using Eclipse with its local Version of Java Virtual Machine

Eclipse is probably the most used and de-facto standard IDE for any development for ARM Cortex or any other devices. It is very easy these days to construct an unlimited and unrestricted IDE (see “Breathing with Oxygen: DIY ARM Cortex-M C/C++ IDE and Toolchain with Eclipse Oxygen“). Up to the point that I can pack it into a .zip file and pass it around e.g. in a class room environment, so no installer at all is needed with the exception of the debug probe USB drivers. As Eclipse is using a Java Virtual Machine (VM), it is a good idea to bundle the VM with the IDE, and this article is about how to do this.

Eclipse Oxygen running with its own Java Virtual Machine

Eclipse Oxygen running with its own Java Virtual Machine

Continue reading

Getting Control over a 50 Watt CO2 Laser Cutter from China

There are people around me who think I’m crazy. And they are probably right. Who else would buy a machine from someone he does not know. I have to pay upfront. It is not clear how things will get delivered, what gets delivered, or if it gets delivered at all. Up to the point I can lose the money I have spent. Best of all: that machine is dangerous enough to potentially kill me. And it has the potential to put my home on fire too. Well, that sounds like an exciting weekend project, or not?

Weekend Box

60 kg Weekend Project Box arrived on the front door

Continue reading

Adding CMSIS-SVD Files to EmbSysRegView 0.2.6.r192 and Eclipse

In “EmbSysRegView 0.2.6 for Eclipse Neon and Oxygen” I have described how to add CMSIS-SVD register detail files to Eclipse using the EmbSysRegView plugin.

But what I need to add vendor or any other SVD files to it? Here is how:

EmbSys Registers View

EmbSys Registers View

Continue reading

Building Eclipse and MCUXpresso IDE Projects from the Command Line

Eclipse as IDE takes care about compiling and building all my source files. But in an automated build system I would like to build it from the command line too. While using make files (see “Tutorial: Makefile Projects with Eclipse“) is an option, there is another easy way to build Eclipse projects from the command line:

Building MCUXpresso IDE from Command Line

Building MCUXpresso IDE from Command Line

Continue reading