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

Advertisements

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

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

Thanks to Erich and FRDM-K64F!! :)

It has been a long time since I wrote my last blog. I really want to apologize to you all for the delay, but I was busy with another project about the competitive analysis of Freescale with our competitors. I hope I can provide you guys later with some important findings from my research.

Well as far as my project for neopixels using FRDM-K64F is concerned, Erich wrote the wonderful tutorial for all of us to turn on the NeoMatrix. I tried my hands on that and I was indeed able to turn on the board but not in the way I wanted it to. 😦 So, it turns out that I got few LEDs turning blue or some turning green. I asked Erich about it and I got to know that it is because I screwed up with the timing signals. I was using an oscilloscope and not a logic analyzer but Erich’s recommendation was to use the Logic Analyzer. This was the result of my experiment following Erich’s tutorials.

https://mcuoneclipse.com/2015/08/01/tutorial-adafruit-ws2812b-neopixels-with-the-freescale-frdm-k64f-board-part-1-hardware/

IMG_1246

The Hardware

Continue reading

Board Take-Over: Using Segger J-Link to Debug NXP

So NXP has announced that they want to take over Freescale (see this press release). In an earlier post I experimented how Freescale tools could be used in NXP tools, see “Merging NXP LPCXpresso IDE with Freescale Kinetis Design Studio, Processor Expert and Kinetis SDK“. Just for fun, I want to do the acquisition the other way round: Using Freescale (now NXP) software and tools to build and debug the LPC824 from NXP :-).

Debugging the NXP LPC824 with Freescale J-Link Lite

Debugging the NXP LPC824 with Freescale based J-Link Lite

Continue reading

Part 2: Barbecue Beef Brisket Texas Style – The Rub

It’s 5:15am, and started the fire in the smoker. Until it warms up, time to apply the rub to the brisket.

I have learned that Brisket is the national food of the Republic of Texas. I decided that this time I will do the rub differently: salting the meat the day before (see “Part 1: Barbecue Beef Brisket Texas Style – The Meat and the Salt“), and applying the rub (without any salt) just before putting the meat into the smoker. I’m using a variation of Texas “Dalmatian Rub”: salt (applied before), coarsely cracked black pepper with a few spices.

Rub Ingredients

Rub Ingredients

Continue reading

Translating for the world …

English is not my first language, but I use it in this blog because that way I can reach a broader audience. If I would use Swiss German, only a few would be able to understand what I write about: “Wänn I würd schwiizerdütsch bruuche, dänn chönt wohl chuum öpper das hie läse” ;-).

Google Translate is not prefect, but still it does a fair job of translating web pages. I have added now a Google translate button to this blog side bar. Click on it and have the web page translated to the language of your choice. Try it out:

GoogleTranslate

💡 If you are speaking Portuguese and want to learn about the Freescale FRDM-KL25Z board, then check out https://hardwarizando.wordpress.com/2015/08/11/introducao-a-kl25z-codewarrior-processor-expert-e-interrupcoes-periodicas/

Happy Translating 🙂

PS: some of the translations by Google are sooooo funny 🙂

Sneak Preview: Profiling Bare Metal Microcontroller Applications with GNU gprof

I’m working on a conference paper and presentation, and tonight I had a break-through :-). So how cool is this: Profiling with GNU gprof a bare-metal embedded Cortex-M application (Freescale Kinetis K64F running the Freescale Kinetis SDK) in Eclipse:

Freescale Kinetis Microcontroller Application Profiling

Freescale Kinetis Microcontroller Application Profiling

Continue reading