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. 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.
When using the FreeRTOS Task List in the Eclipse based MCUXpresso IDE, it shows the list of tasks with their stack size used. But with the default FreeRTOS settings it is not able to determine the correct stack size and shows a warning icon:
I apologize: I have not been blogging much in the past weeks :-(. One reason is that I’m working on a DIY SMT/SMD Pick&Place machine which keeps me busy most of my spare time :-). I admit that this project is not finished yet, but now is the time I can give a sneak preview: a SMD/SMT pick and place machine:
I’m very happy with my 50W Laser Cutter (see “Getting Control over a 50 Watt CO2 Laser Cutter from China“). My main decision factors were (and still are): Software, software, tools and again software, and down in the list finally the hardware. Same thing for that laser cutter. After several upgrades (see “50W Laser Cutter Upgrades“), it was time replace the stock controller hardware with a new one including LCD display:
Using IP (Ethernet) based debug probes is a very handy thing: I don’t have to be directly connected to the debug probe (e.g. with the USB cable). This article explains how to use an IP-based Segger or P&E probe with the Eclipse based MCUXpresso IDE.
Windows 8 and 10 have added a ‘feature’ to scan and index devices attached to the host machine. This means that bootloaders or MSD (Mass Storage Device) programming implementations on evaluation boards developed in the Windows 7 age might not be prepared for that. Up to the point that it can impact the bootloader as outlined in “Bricking and Recovering OpenSDA Boards in Windows 8 and 10“. So far one of the easiest way to get out that situation was to use a Windows 7 machine. But if you only have a Windows 10 machine available, this article describes the needed steps to update the bootloader with Windows 10 host machines.
The map file produced by the GNU linker includes lots of information, however it is very cryptic to read. In “Listing Code and Data Size for each Source File with GNU and Eclipse” I showed how the GNU size utility can be used to report the code and data size for each object file. The Eclipse based MCUXpresso IDE comes with another nice view which shows detailed information about code and data allocation:
It’s April Fool’s Day, but be assured this is not a joke ;-): I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge. This release includes several smaller bug fixes and components have been upgraded for FreeRTOS V10.0.1.
In “Flash-Resident USB-HID Bootloader with the NXP Kinetis K22 Microcontroller” I presented how I’m using the tinyK22 (or FRDM-K22F) with a flash resident USB HID bootloader. To make sure that the loaded application is not corrupted somehow, it is important to verify it with a Cyclic redundancy Checksum (CRC). The NXP KBOOT Bootloader can verify such a CRC, but how to generate one and how to use it is not really obvious (at least to me), so this article explains how to generate that CRC.
One of the great things with the FreeRTOS operating system is that it comes with free performance analysis: It shows me how much time is spent in each task. Best of all: it shows it in a graphical way inside Eclipse too:
To solve the real hard problem of Embedded Systems development, I usually need all the data I can get from the target. The Percepio Tracealizer is such a tool which can stream application and FreeRTOS trace from the target over a Segger J-Link connection using the Segger RTT protocol. I’m using that combination a lot.
Streaming trace data that way does not need a dedicated hardware like ETM Trace. Using RTT is usually not much intrusive and affects the performance of the target in the 1-2% range (of course depending on the amount of data).
But what worried me for several weeks is that after moving to FreeRTOS V10.0.0 and the same time updating the Segger libraries, the target performance was heavily affected:
Three years ago I published “Debugging Failure: Check List and Hints” and unfortunately this article is one of the most popular ones: obviously debugging problems are very common. Debugging with GDB works usually fine, but if things are failing, then it can be hard to find the cause for it. Recently I have been asked to check some failures, so here are two more hints about what could go wrong…
Error while launching command: arm-none-eabi-gdb –version
Binary files are just a binary blob without debug information. Most debug tools and flashers are able to deal (raw) binary (see “S-Record, Intel Hex and Binary Files“). But GDB or the P&E GDB server really needs a ELF/Dwarf file which usually has all the debug information in it. This is a problem if all what I have is a binary file.
This post is about transforming a raw binary (.bin) file into an ELF/Dwarf file with adding a header to it:
The Teensy boards are great, but as they are they are not really useful for real development, as they lack proper SWD debugging. In “Modifying the Teensy 3.5 and 3.6 for ARM SWD Debugging” I have found a way to get SWD debugging working, at that time with Kinetis Design Studio and the Segger J-Link. This article is about how debug the Teensy with free MCUXpresso IDE and the $20 NXP LPC-Link2 debug probe: