datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com  
Events
UBM Tech
UBM Tech

Design Article

Comment


Luis Sanchez

7/21/2012 2:16 PM EDT

Upps... thanks for the correction. I see now that it's only 32 bit and 64 bit.

More...



cmathas

7/16/2012 7:20 PM EDT

Please note that the screen shots have now been corrected to show a larger ...

More...

Integrating IDE and RTOS for ARM-based development

John Carbone, Express Logic

7/11/2012 1:45 AM EDT

Integrating an IDE and RTOS

The Application Build

Normally, to build an application, the developer would have to go through the following steps:

  • Create a new project
  • Add a source file to the project
  • Type in the source code
  • Build the RTOS library
  • Add the necessary board initialization files
  • Set compiler, linker, library, and other configuration settings
  • Build the application

 

In an IDE with tight RTOS integration, the task becomes much simpler and less error-prone. The RTOS is provided with a sample application, which includes a pre-built RTOS library, application source code, header files, initialization code, and linker directives. It is intended for debugging, with all profiling and trace operations activated, and minimal optimization.

This enables the developer to immediately scan the demo code, study the project settings, and only make changes where desired.

Breakpoints and Macros

Before running the application, the developer might set a breakpoint in the code for “thread_0.” Since this thread runs every 10ms, it provides a predictable point at which to examine the events that have transpired over that period of time.

Click here for a larger image

Each time this breakpoint is reached, the value of thread_0_counter increments by one, as shown in the debugger’s Watch Window, where expressions can be viewed. But also, the trace buffer can be uploaded automatically from target memory to the Host. This is helpful in case the developer decides to view the events. This is where the IDE’s macro capability can be used. A macro can be performed by the debugger by listing the macro in the breakpoint edit window, as shown below.

Click here for a larger image

This is a powerful capability that has many uses. In addition to executing a macro, developers can instruct the program to “continue” after encountering the breakpoint or remain stopped at the breakpoint. We also can tell the debugger not to stop for the first “n” occurrences of the breakpoint, and stop on the “n+1”. Also, a Boolean expression or condition can be evaluated and used to determine whether to stop at the breakpoint. These features give the developer tools to use to help examine what is happening at a particular point in the program

RTOS Awareness

Many IDEs offer RTOS Awareness, but all RTOS Awareness implementations are not the same. In addition to tracking all application threads and kernel objects (semaphores, mutexes, queues, etc.), IAR Embedded Workbench for ARM also displays the RTOS Execution Profiling information. In our example, it provides a view of all threads. This is just one of several views available. Note the tabs for other views.

Click here for a larger image

Event Trace

An event trace can be a most useful tool for understanding the behavior of a real-time system. While stopped at a breakpoint, we can easily view the events with a single mouse-click, thanks to another IDE capability – the ability to launch an external tool.

In this case, the external tool we launch is TraceX, which runs on the Host and provides a timescale view of system events and it can be used to measure the time between events. This provides a valuable measurement tool for determining the time taken to progress from one point of a program to another. As shown below, the highlighted span is 172.5 microseconds. By highlighting the start and stop events of interest, developers have a handy means of examining not just what was done, but how long it took.

Click here for a larger image

Summary

An IDE that is tightly integrated with an RTOS can simplify many of the otherwise tedious operations that a developer must perform in order to run and debug an application. Beyond assuring correctness, this information enables developers to optimize the performance of the application, and to make tradeoffs between responsiveness and throughput, which are often opposing goals.

About the author

John Carbone is vice president of marketing for Express Logic. He has 35 years experience in real-time computer systems and software, ranging from embedded system developer and FAE to vice president of sales and marketing. Mr. Carbone has a BS degree in mathematics from Boston College.

 





GeorgeSand

7/12/2012 9:07 AM EDT

It is impossible to see anything on those pictures.

Sign in to Reply



cmathas

7/16/2012 7:20 PM EDT

Please note that the screen shots have now been corrected to show a larger option. Thank you for your patience and for taking the time to comment.

Sign in to Reply



cmathas

7/12/2012 1:01 PM EDT

You're right. New graphics have been requested. Stay tuned.

Sign in to Reply



Luis Sanchez

7/15/2012 2:59 AM EDT

I didn't know that an RTOS could be synchronized through the IDE.
ARM MCU's are all over the place. From 8 bit to 32 bit. Learning about the ARM architecture is a good idea to ensure landing a job or atleast keep the current one. Hope we can get better graphic soo,!

Sign in to Reply



KB3001

7/15/2012 7:47 AM EDT

"ARM MCU's are all over the place. From 8 bit to 32 bit. "

?

Sign in to Reply



Luis Sanchez

7/21/2012 2:16 PM EDT

Upps... thanks for the correction. I see now that it's only 32 bit and 64 bit.

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)