Need a quick way how to attach a LED, a push button and two resistors to the Raspberry Pi header? One way is to use some ‘flying’ wires. Or to use three pieces of lasercut plywood for a nice looking Raspy extension board:
I’m pleased to announce a new release of the McuOnEclipse components, available on SourceForge. This release includes several bug fixes, extra support for the NXP S32 Design Studio and SDK and includes FreeRTOS V10.1.1.
Unit testing is a common practice for host development. But for embedded development this still seems mostly a ‘blank’ area. Mostly because embedded engineers are not used to unit testing, or because the usual framework for unit testing requires too many resources on an embedded target?
What I have used is the μCUnit framework which is a small and easy to use framework, targeting small microcontroller applications.
Most embedded projects need an user input device. For the NXP i.MX RT1050-EVK board I have recently added a 480×272 full color touch LCD (see “Adding a Rocktech Capacitive Touch LCD to the NXP i.MX RT1052 EVK“). I have looked at different commercially available GUI libraries, but none of them really were matching my expectations: either very expensive or closed source, or an overkill for small LCDs and projects. But then I have found LittlevGL: free-of-charge, open source, easy to use, well documented and has everything I need. And it really looks gorgeous 🙂
NXP has just released the 10.2.1 update of their flagship Eclipse based IDE. While the number increase from 10.2.0 to 10.2.1 indicates a minor release, there are a several things which make me move over to that new release.
My usual workflow is: edit – build – debug and repeat. And this for the same project again and again. So here are a few tips how to make these iterations faster with Eclipse. One thing is to use the F11 shortcut to debug the last launched/debugged application:
The McuOnEclipse GitHub repository hosts many Processor Expert projects and is very popular (cloned more than 1000 times, thank you!). Processor Expert is a powerful framework which generates driver and configuration code, simplifying application development for a wide range of microcontroller and families. But Processor Expert won’t be developed further by NXP and is not part of MCUXpresso IDE. While it is possible to install Processor Expert into MCUXpresso IDE 10.2, how can these projects used ini an IDE *without* Processor Expert? This article describes how to port an existing Processor Expert project into the NXP MCUXpresso IDE.
Ported Project with FRDM-K64F using Adafruit SSD1351 and Processor Expert
By default, the NXP S32K144EVB and microcontroller is using a 5V supply voltage and logic levels which is great for noisy environment or any 5V devices. Many of my displays and sensors use 3.3V logic levels, so I would have to use a level shifter from 5V to 3.3V. There is another way: to change the board for 3.3V logic levels so I can use directly things like a SSD1306 display.
S32K144EVB with OLED SSD1306 using 3.3V Logic Levels
“There is no ‘S’ for Security in IoT” has indeed some truth. With all the connected devices around us, security of code should be a concern for every developer. “Preventing Reverse Engineering: Enabling Flash Security” shows how to prevent external read-out of critical code from device. What some microcontroller have built in is yet another feature: ‘Execute-Only-Sections‘ or ‘Execute-Only-Memory‘. What it means is that only instruction fetches are allowed in this area. No read access at all. Similar like ‘read-only’ ‘execute-only’ it means that code can be executed there, but no other access from that memory is allowed.
In this article I describe the challenges for a toolchain like the GNU gcc, and how to compile and link code for such an execute-only memory.
NXP not only sells general purpose microcontroller, but as well a portfolio of automotive devices which includes the S32K which is ARM Cortex based. For this device family, they offer the S32 Design Studio (or S32DS) with its own Eclipse distribution and SDK. The interesting part is that the S32DS includes Processor Expert (which is a bit different from the ‘mainstream’ Processor Expert). It comes with its own components for the S32K SDK which includes a component for FreeRTOS. But that component in S32DS 2018.R1 comes with an old V8.2.1 FreeRTOS component:
FreeRTOS 8.2.1 in S32DS 2018.R1
So what to do if I want to use the latest FreeRTOS (currently 10.0.1) with all the bells and whistles?
I’m pleased to announce that a new release of the McuOnEclipse components is available on SourceForge. This release includes several smaller bug fixes and initial component support for the NXP S32 Design Studio and SDK.
To support my talk next week at the Embedded Computing Conference 2018, I have put together a video with the hardware features of that Pick&Place based on OpenPnP machine based on NXP LPC1769 and NXP Kinetis K22. Below is a picture of the current machine:
By default, the GNU compiler (gcc) optimizes each compilation unit (source file) separately. This is effective, but misses the opportunity to optimize across compilation units. Here is where the Link Time Optimization (LTO, option -flto) can help out: with a global view it can optimize one step further.
The other positive side effect is that the linker can flag possible issues like the one below which are not visible to the compiler alone:
type of '__SP_INIT' does not match original declaration [enabled by default]
Hardware Timers are essential to most embedded applications: I use them mostly for triggering actions at a given frequency, such as acquiring data from a sensor. With using an RTOS I can do a similar thing using a task: the task will run with a given frequency and I can periodic work in it. However, using a task might be too much overhead doing this. The good news is that there is a much more efficient way to do this in FreeRTOS with Software Timers. And this is what this tutorial is about: how to use Software Timers with FreeRTOS.