Solving the 8192 Character Command Line Limit on Windows


There is a really annoying issue with using command line tools on Windows: the maximum length of the command line passed to cmd.exe is 8192 characters (see http://blogs.msdn.com/b/oldnewthing/archive/2003/12/10/56028.aspx). So you think this is not a problem for you, as you would not pass such a long command line to cmd.exe (the DOS shell under Windows)? Well, if you are using Eclipse (as I do) which generates make files (which is the normal way), then the cmd.exe very likely is involved to call the compiler/linker/etc, indirectly with the usage of make.exe. Compiling files is usually not a problem as it does not hit that 8192 limit. However, it is likely that link phase will end up with an error:

Error in the Problems View

Error in the Problems View

If you have such a problem, there is a solution ….

Continue reading

Using the DHT11/DHT22 Temperature/Humidity Sensor with a FRDM Board


For a home automation project I need to know the room temperature and humidity percentage of the room air. Adafruit has an inexpensive DHT11 sensor from http://www.aosong.com which I decided to use for that project.

Test Setup for DHT11 Sensor

Test Setup for DHT11 Sensor

Continue reading

OpenOCD/CMSIS-DAP Debugging with Eclipse and without an IDE


OpenOCD is an open source and free-of-charge debugging solution, which is a great option here at the University of Lucerne, as students do not need to buy an expensive debugging probe. Still, I recommend to buy professional probes like the P&E or Segger ones, as they are worth every (Euro) cent. But for a ‘zero’ budget, OpenOCD with CMSIS-DAP is something to consider. And with Kinetis Design Studio using the GNU ARM Eclipse Plugins, OpenOCD is not that hard to be used. And because both Freescale and GNU ARM Eclipse offer OpenOCD Windows binaries, that connection method is in the reach of Windows users too.

FRDM-KL25Z with OpenOCD Debug

FRDM-KL25Z with OpenOCD Debug

Continue reading

McuOnEclipse Components: 22-Mar-2015 Release


There is a new release of the McuOnEclipse components available on SourceForge, with the following main changes:

  1. Shell: Fixed and improved history handling.
  2. MinIni: Option to select local/stack or global memory for buffers
  3. FreeRTOS: Ability to use the tick counter instead of dedicated timer for performance measurement.
  4. FSL_USB_Stack: Added deinitialization for USB stack.
  5. FatFsMemSDHC: added custom card detection and write protection pin handling.
  6. Multiple Bug Fixes
SourceForge McuOnEclipse

SourceForge McuOnEclipse

Continue reading

Attaching to a Running Target with Segger J-Link, GDB and Eclipse


This happens several times for me: I have a board running for a while (even for days), and then it crashes or is stuck somewhere. Yes, I usually use a watchdog do recover from that situation. But it would be good to know and debug the problem. With CodeWarrior I had the functionality in the debugger to ‘attach’ or ‘connect’ to a running (stuck/crashed) board. However, with Eclipse/Kinetis Design Studio/GDB this is a different debugger, and not possible. At connection time with the debugger the target does a reset, so I don’t know any more where the application crashed. But now I have a solution, at least with the Segger GDB :-).

Debug Hard Fault Attached Target

Debug Hard Fault Attached Target

Continue reading

Quick Way to Open Closed Project in Eclipse


Sometimes it is all about knowing the simple tricks, even if they might be obvious ;-). In my post “Eclipse Performance Improvement Tip: Close Unused Projects” I explained why it is important to close the ‘not used’ projects in the workspace to improve Eclipse performance:

Closing Project in Eclipse Workspace

Closing Project in Eclipse Workspace

Continue reading

Using Kinetis Design Studio with IAR Embedded Workbench IDE


For everyone who wants to combine the power of Eclipse and Processor Expert with the IAR Embedded Workbench IDE, here is how to get them working side by side:KDS with IAR Continue reading