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

It gives me information about how many times a function is called, and an estimate how much time is spent in each. I was waiting for soooooo long time to have something like this possible and in my hand! And best of all: free-of-charge and open source :-): all what is needed is an ARM Cortex-M (e.g. Freescale Kinetis) board, GNU with Eclipse or Kinetis Design Studio and a Segger J-Link for semi-hosting. It is using the GNU ARM Embedded Launchpad tools and it runs right now on a Freescale FRDM-K64F board, but any other board/device will do it too.

So after gcov (Coverage) I have gprof (Profiling) running on Kinetis :-).

Now I need to clean up the project and sources, write my paper, presentation and write a blog article about this. And a few hours of sleep…..

Happy Profiling 🙂

PS: Note to myself: next time submitting a paper proposal to a conference. *First* implement that cool idea so you *know* it is going to work, and *then* submit that cool idea to the conference. NOT the other way round ;-).

7 thoughts on “Sneak Preview: Profiling Bare Metal Microcontroller Applications with GNU gprof

    • Hi Carl,
      Yes, it should. What you need is an ARM Cortex with GNU tools (GNU ARM Embedded (launchpad) is what I use). Plus a debug probe with full semihosting support (I use Segger J-Link). I’m late with writing my article about it (I underestimated the level of details and needed time for it), but I should have it ready somewhat this week.

      Like

  1. Pingback: Tutorial: Using GNU Profiling (gprof) with ARM Cortex-M | MCU on Eclipse

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.