I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge. It this release more ARM Cortex devices/vendors are supported with different SDKs, plus it comes with several FreeRTOS enhancements for debugging highly optimized code.
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:
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 :-(.
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:
FreeRTOS seems to get more and more popular, and I think as well because more and more debugger and Eclipse IDE vendors add dedicated debugging support for it.
By default, the GNU Linker expects a very special naming scheme for the libraries: the library name has to be surrounded by “lib” and the “.a” extension:
But what if the library I want to use does not conform to that naming standard?
NXP has released an updated of their Eclipse based IDE for ARM Cortex-M (Kinetis and LPC) microcontroller: the version v10.0.2 build 411:
For reliable applications, I avoid using functions of the standard libraries. They are banned for most safety related applications anyway. I do not use or avoid
printf() and all the other variants, for many reasons including the ones listed in “Why I don’t like printf()“. Instead, I’m using smaller variants (see “XFormat“). Or I’m using only the thread-safe FreeRTOS heap memory allocation which exist for many good reasons.
Things get problematic if
malloc() still is pulled in, either because it is used by a middleware (e.g. TCP/IP stack) or if using C++. Dave Nadler posted a detailed article (http://www.nadler.com/embedded/newlibAndFreeRTOS.html) about how to use newlib and newlib-nano with FreeRTOS.
For a research project, we are going to send a satellite with an embedded ARM Cortex microcontroller into space early next year. Naturally, it has to work the first time. As part of all the ESA paperwork, we have to prove that we tested the hardware and software thoroughly. One pice of the that is to collect and give test coverage evidence. And there is no need for expensive tools: Free-of-charge Eclipse and GNU tools can do the job for a space mission 🙂
In “Cycle Counting on ARM Cortex-M with DWT” I have used the ARM DWT register to count the executed cycles. With the MCUXpresso IDE comes with a very useful feature: it can capture the ARM SWO (Single Wire Output) trace data. One special kind of trace data is the ‘cycle counter’ information which is sent through SWO.
Eclipse for C/C++ (CDT) offers two different ways to get out of a debug session: Terminate and Disconnect:
The terminate and disconnect behaviour is not standardized, and varies between Eclipse distributions and debug connection. This article is about how things are handled in MCUXpresso IDE, and how I can influence the behaviour.
I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following changes and updates:
- SEGGER SystemView updated to V2.42
- More components to work with MCUXpresso SDK: GenericSWSPI, FXO8500 and SimpleEvents
- SSD1351 display driver supports 128×128 pixel resolution and Adafruit 1.5″ breakout module
- Extended FreeRTOS debug helper settings
- GenericI2C: added ReadWordAddress8() and ReadWordAddress8() functions
- RingBuffer with new Getn() and Update() functions
- Utility with map(), constrain(), random() and randomSetSeed()
- XFormat: new xsnprintf(), contributed by Engin Lee
- OneWire protocol component with Maxim DS18B20 temperature sensor
- Many smaller bug fixes and enhancements
I’m using Eclipse based IDE’s to develop and debug my embedded applications. This works great, as Eclipse has all the necessary tools to edit, build and debug it. But when it comes just to download/flash a binary to the board, then things are pretty much specific to the tools used. With the advent of the new MCUXpresso IDE, here is how that Eclipse IDE can be used for this.
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?
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.
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 :-).
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:
In “MCUXpresso IDE: Importing Kinetis Design Studio Projects” I explained how Kinetis Design Studio projects can be imported and used inside the MCUXpresso IDE. Processor Expert projects can be used, but no new components added, modified or new Processor Expert projects created. To fully use Processor Expert, two plugins need to installed, and this is what this article is about.
Many of my currently active projects are using Kinetis Design Studio (KDS) V3.2.0 from NXP (I have published many of my projects on GitHub). Now with the advent of the MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“), I have migrated several projects from KDS to MCUXpresso. This post is about how to easily get KDS projects ported and running in MCUXpresso IDE.
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.