McuOnEclipse Components: 7-Feb-2016 Release


New in this release:

  • Segger SystemViewer: Upgraded to V2.30, added stack high-water mark
  • Segger RTT: fixed BASEPRI issue on Cortex M4 for critical sections
  • Utility: Fixed issue with Utility module and Kinetis SDK (usage of ‘byte’)
  • USB CDC: property to specify USB device current usage, new status getter functions.
Segger SystemViewer V2.30

Segger SystemViewer V2.30

Continue reading

McuOnEclipse Release 10-Jan-2016


With the start of the new year 2016 I have published a new McuOnEclipse component release with the following major updates:

  1. Updated Segger SystemView and Real Time Transfer (RTT): added terminal functions and extra interfaces
  2. Improved USB CDC with serial number handing
  3. FreeRTOS TaskList shell command
  4. USB Stack: added MSD Host support for MCF52259, added support for K24FN120 and for the 100 MHz K20 devices
  5. New NEOMatrix component for Adafruit NeoPixel Matrix displays

    256 NeoPixel Matrix with FRDM-KL25Z

    256 NeoPixel Matrix with FRDM-KL25Z

Continue reading

McuOnEclipse Components: 22-Nov-2015 Release


A lot of good things happened in the last three weeks, so here is a new updated McuOnEclipse component release, with the following main improvements:

  1. Updated Segger RTT component
  2. New Segger SystemView component
  3. FreeRTOS ‘tasklist’ shell command
  4. FreeRTOS with support for Segger SystemView

SystemViewer

Continue reading

McuOnEclipse Components: 08-Nov-2015 Release


Time is flying fast, time for another McuOnEclipse components release on SourceForge with the following main changes and features:

  1. New component for Segger RTT makes adding a console communication interface super easy (and fast!)
  2. RTT support for the command line Shell component
  3. RTT component used for Percepio FreeRTOS Tracing
  4. Updated USB component, support for USB CDC blocking/waiting and endpoint configuration
  5. Updated FreeRTOS to V8.2.3, memory heap selection improved and setting for time slicing
  6. RingBuffer implements a Delete() method
  7. Extended Kinetis SDK support in components, added by default
Segger RTT Console

Segger RTT Console

Continue reading

Aligning S19 Records to 64-bit Boundaries


Many tool chains and linker are able to produce S19 files, such as with the GNU tools it is the ‘objcopy‘ which does this job (see “Binary (and S19) Files for the mbed Bootloader with Eclipse and GNU ARM Eclipse Plugins“). But these tools usually cannot handle the special cases. For example on the Freescale Kinetis K64F my serial bootloader (see “Serial Bootloader for the Freedom Board with Processor Expert“) had a problem with these lines in the S19 file:

Not aligned S19 file entries

Not aligned S19 file entries

Continue reading

Programming Kinetis with CodeWarrior from the DOS Shell


In “CodeWarrior Flash Programming from a DOS Shell” I showed how to program a device from the DOS shell. Because that example was for ColdFire and CodeWarrior for MCU10.2, here is the same for a Kinetis (FRDM-KL25Z) and CodeWarrior for MCU10.6. In my workspace (c:\tmp\wsp_10.6) I have a project folder (FRDM-KL25Z).

I’m using the ‘Flash Programmer’ to sneak the needed commands:

Sneaking Commands from Flasher

Sneaking Commands from Flasher

Continue reading

Overview: From Snippets to Code Generation


To build an application for a modern microcontroller today is not a simple thing. Well, it depends what ‘simple’ means. But compared to the ‘old days of 8bit micro controllers’ (which are still in use!) developing for a complex 32bit device is definitely a different thing. Not only the complexity has changed, but as well the breath of tools and helpers. In my view, the only constant is ‘change’, and I have changed the way how to develop several times in my career. In this post I present several different techniques I’m using in my development.

Processor Expert CPU View

Processor Expert CPU View

Continue reading

Improve Eclipse Performance with Increased Heap Size


I noticed that especially working with several projects in my workspace, Eclipse got sluggish and slowly responding. I have in Eclipse the Heap Monitor/Status enabled (see “Show Heap Status in Eclipse“):

Heap Status at the Limit

Heap Status at the Limit

So the used heap of the Java VM is hitting a limit of about 500 MByte, and seems to be trashing around? How to increase that heap size?

Continue reading

McuOnEclipse Components: 05-July-2015 Release


I know: A new McuOnEclipse Processor Expert components release was long overdue. But I have been extremely busy in the last months, but now the university semester is over, and I have finally some spare time to catch up on a lot of things. So here we go: there is a new component release available on SourceForge (https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/): Components 2015-07-05.zip

McuOneEclipse Components on SourceForge

McuOneEclipse Components on SourceForge

Continue reading

Editing Compiler Include (or other) Settings in Eclipse


So now I have carefully set up my compiler include paths in Eclipse to tell the GNU compiler where to find my header files:

Include Paths

Include Paths

The question is: how can I apply these settings to another project?

Continue reading

CRC Checksum Generation with ‘SRecord’ Tools for GNU and Eclipse


One of the things missing for Embedded in the GNU linker is that it cannot generate a CRC checksum. Luckily, there is the solution of using SRecord:

SRecord 1.64 Web Page

SRecord 1.64 Web Page

Continue reading

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

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

Adding Multiple Include Paths to Build Settings in Eclipse


In Eclipse and CDT, I need to tell the compiler where it has to search for the header files. The normal way is to go to the compiler settings (menu Project > Properties > C/C++ Build > Settings) and then add the include paths, one by one, using the ‘+’ icon:

Adding Include Path

Adding Include Path (shown using the GNU ARM Eclipse plugin)

But for many include paths, this is a time-consuming process. But there is another way.

Continue reading

Adding ‘Show in Windows Explorer’ to Eclipse


In CodeWarrior there was a very useful feature in the CodeWarrior Projects view: with a context menu I can open that folder/file in Windows Explorer:

Show In Windows Explorer in CodeWarrior Projects View

Show In Windows Explorer in CodeWarrior Projects View

However, this feature is missing in Eclipse, so how to add this functionality?

Continue reading

Tutorial: How to Erase the FLASH with the GNU GDB debugger


I have several applications where I store application specific information in the microcontroller FLASH memory (see “Configuration Data: Using the Internal FLASH instead of an external EEPROM“). I have run into issues recently with the Segger J-Link GDB server as by default it does *not* erase all the FLASH memory. So the question is: How can I erase all (or part) of the FLASH memory with GDB (e.g. in Kinetis Design Studio or in Eclipse)?

Memory Monitor with Erased Flash

Memory Monitor with Erased Flash

Continue reading

Processor Expert Value Proposals


The cool thing with Processor Expert is that it gives me guidance through the settings. And there is a nice (rather hidden feature) which proposes me values I can enter:

:idea: First, switch to the non-Tabs (classic) view, as the classic view is using the screen real estate better, and shows you *all* the information needed, and does not hide some (see https://community.freescale.com/thread/334117).

So if you have some values to correct because other settings have changed:

Values to Enter

Values to Enter

Continue reading

Export and Import Processor Expert Component Settings


When I create a new Processor Expert project for a board I already have the components configured, then an easy way to transfer components from one project to another is to copy-paste the components. In the ‘source’ project I select the components I want to use, choose Copy (or CTRL+C shortcut on Windows):

Copy of Processor Expert Components

Copy of Processor Expert Components

Continue reading

Unlocking and Erasing FLASH with Segger J-Link


When using a bootloader (see “Serial Bootloader for the Freedom Board with Processor Expert“), then I usually protect the bootloader FLASH areas, so it does not get accidentally erased by the application ;-). When programming my boards with the P&E Multilink, then the P&E firmware will automatically unlock and erase the chip. That’s not the same if working with the Segger J-Link, as it but requires extra steps.

Protected FLASH Pages with Processor Expert

Protected FLASH Pages with Processor Expert

Continue reading

Emulating Eclipse ‘Run’ with ‘Debug’ Configuration


Student: “Professor, my application does not work!”
Professor: “What is the problem?”
Student: “I don’t know, but the LED on my board is not blinking.”
Professor: “Can you step through the port initialization sequence and check if the clocks are initialized correctly?”
Student: “I have pressed the ‘Run’ button, I’m not debugging”.
Professor: “Why are you not debugging?”
Student: “I always do a ‘Run’, and I do ‘Debug’ only if needed.”
Professor: “Ahhhhhhrrrrgggg!”

 

Run and Debug in Eclipse

Run and Debug in Eclipse

Clearly, I’m not immune to the ‘déformation professionelle‘. I very rarely use ‘Run’, because it simply does not offer much value compared to ‘Debug’ during development. If using ‘Run’ and then there is a problem, I have to ‘Debug’ anyway, why not ‘Debug’ from the beginning? It is simply not an efficient way to work for me. Or I’m missing something?

Continue reading