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

Lakeside View

Image

It was a very warm (32°C) and beautiful summer Sunday. Spent some time at the ‘house lake’. The picture shows a view over Lake Lauerz to my home village on the other side:

Lake View

Lake View over Lake Lauerz (click to enlarge)

Far to the left the Rigi, with the Rossberg in the middle. On the left of the Rossberg is the rock slide area from 1806 (see “Hacking the Heating System for Cooling – Geothermal Drilling with extra Benefits“). On the right the Spiegelberg and then far to the right part of the Mythen.

Happy Laking 🙂

Updating Segger Tools in Eclipse Kinetis Design Studio

Segger releases often new application and firmware updates. If I install an IDE like the Freescale Kinetis Design Studio, it comes with that firmware version available at that time. How to take advantage of a new Segger release?

Segger Download Page

Segger Download Page

Continue reading

Batch Programming with GDB: Segger J-Link and P&E Multilink

I need to program several boards with a firmware: a number too small for serious batch/factory programming, but a number too high doing this with the debugger. I want this:

  1. Connect the board with the debug probe and power it
  2. Run a script to flash the program and run it
  3. Disconnect and restart step 1.
First set of sensor nodes with two programming adapters

Need to program a few boards…

Continue reading

Tutorial: Using GNU Profiling (gprof) with ARM Cortex-M

I have published a Sneak Preview how GNU gprof profiling looks for an embedded target ARM Cortex-M in an earlier post:

Freescale Kinetis Microcontroller Application Profiling

Freescale Kinetis Microcontroller Application Profiling

This tutorial explains how to profile an embedded application (no RTOS needed) on ARM Cortex-M devices with GNU gprof. Additionally I explain the inner workings to generate the data necessary for gprof.

Continue reading

Sunday and Rain is Coming …

Image

It is Sunday morning, and the sun shines into the valley of Schwyz. It looks like it could be a beautiful Sunday, but the weather forecast predicts clouds and rain for the afternoon. So I make a panorama shot to the west to my home village and the Rigi mountain int the background. Rain is coming soon…

Talkessel Schwyz

Talkessel Steinen (click to enlarge)

Happy Sundaying 🙂

Debugging STM32F103RB NUCLEO Board with Segger J-Link

The STMicroelectronics STM32F103 (ARM Cortex-M3) Nucleo boards include the on-board ST-Link v2 circuit which allows to debug the board. This circuit is similar to the OpenSDA circuit found on Freescale boards. Unlike the Freescale OpenSDA, the ST-Link is only the ST-Link: it is not possible to load a P&E Multilink or Segger J-Link or firmware on it. Luckily, the ST-Link has a SWD connector, but this connector is a non-standard one. So how can I debug that board with an Eclipse based environment with GNU ARM Eclipse plugins and a Segger J-Link?

Connected J-Link with Nucleo Board

Connected J-Link with Nucleo Board

Continue reading

GNU Static Stack Usage Analysis

Stack overflows are a big problem: If I see a system crash, the first thing usually is I try to increase the stack size to see if the problem goes away. The GNU linker can check if my global variables fit into RAM. But it cannot know how much stack I need. So how cool would it be to have a way to find out how much stack I need?

Static Stack Usage Analysis with GNU

Static Stack Usage Analysis with GNU

And indeed, this is possible with the GNU tools (e.g. I’m using it with the GNU ARM Embedded (launchpad) 4.8 and 4.9 compilers :-). But it seems that this ability is not widely known?

Continue reading

Using the Freescale Freedom (FRDM-KL43Z) to Debug other Boards

In “Unboxing the Freescale FRDM-KL43Z Board” I was using the FRDM-KL43Z board the first time. The FRDM-KL43Z board has an on-board debug interface (Kinetis K20, OpenSDA). In this post I show how to use the FRDM-KL43Z board to debug another ARM board.

FRDM-KL43Z Board debugging custom (tinyK20) Board

FRDM-KL43Z Board debugging custom (tinyK20) Board

Continue reading