A while back I wrote two articles about Semihosting: “Semihosting with GNU ARM Embedded (LaunchPad) and GNU ARM Eclipse Debug Plugins” and Semihosting with Kinetis Design Studio. With using the GNU ARM Embedded (lauchpad) in my Kinetis Design Studio, time for a ‘summary’ post :-).
Tag Archives: tool chains
Freescale Processor Expert Survey
Frequent readers of this blog know: I’m using Processor Expert in most of my projects with CodeWarrior, Driver Suite or Kinetis Design Studio. With the move of Freescale to Kinetis Design Studio and the Kinetis SDK with Processor Expert, there is an opportunity for our voice to be heard in a survey Freescale now runs about configuration tools and Processor Expert.
Happy Surveying 🙂
Poor Man’s Trace: Free-of-Charge Function Entry/Exit Trace with GNU Tools
There are cases where my application runs find for days, weeks or even months, but then from time to time there is an application crash. Yes, the watchdog will recover it, but still it would be good to know what happened? One solution would be to hook up a trace probe (like the one I have described in this post: “First Steps with the P&E Tracelink“). But having such a trace probe attached all the time is first not cheap and second not always possible. So what if the application would leave ‘breadcrumbs’ behind which would tell me the flow of the program leading to the problem? I have found a functionality in the GNU tools which seems not be widely known or use, but is incredibly helpful in such cases.
So what if I could get a log like this telling me which functions get called by whom?
{ 00000E88->00000DA0 ???->DEMO_Init
} 00000E88<-00000DA0 ???<-DEMO_Init
{ 00000E8C->00000D40 ???->DEMO_Run
 { 00000D62->00000CE8 DEMO_Run:0x0022->decide
 { 00000D0E->00000C60 decide:0x0026->calcValue
 } 00000D0E<-00000C60 decide:0x0026<-calcValue
 { 00000D16->00000CA0 decide:0x002E->getValue
  { 00000CC6->00000C60 getValue:0x0026->calcValue
  } 00000CC6<-00000C60 getValue:0x0026<-calcValue
 } 00000D16<-00000CA0 decide:0x002E<-getValue
 } 00000D62<-00000CE8 DEMO_Run:0x0022<-decide
 { 00000D62->00000CE8 DEMO_Run:0x0022->decide
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:
If you have such a problem, there is a solution ….
Command Line Programming and Debugging with GDB
Eclipse with GDB is great: it comes with a graphical front end for debugging. But sometimes it is all about to download a program. Is it really necessary to launch an IDE like Eclipse to program or quickly debug a board? With the GNU Debugger (GDB), the answer is ‘no’: GDB comes with a command line debugger which is designed exactly for this: providing a command line interface for programming/downloading and debugging, bypassing any GUI (Graphical User Interface).
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:
Continue reading
Creating a Library with Kinetis Design Studio
There is no special option in Kinetis Design Studio ‘New Project Wizard’ (NPW) to create a library (or archive). But it is really easy to create a library project.
Code Coverage for Embedded Target with Eclipse, gcc and gcov
The great thing with open source tools like Eclipse and GNU (gcc, gdb) is that there is a wealth of excellent tools: one thing I had in mind to explore for a while is how to generate code coverage of my embedded application. Yes, GNU and Eclipse comes with code profiling and code coverage tools, all for free! The only downside seems to be that these tools seems to be rarely used for embedded targets. Maybe that knowledge is not widely available? So here is my attempt to change this :-).
Or: How cool is it to see in Eclipse how many times a line in my sources has been executed?
And best of all, it does not stop here….
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:
But for many include paths, this is a time-consuming process. But there is another way.
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)?







