PEmicro - P&E Microcomputer Systems: Over 30 years as an Industry leader in Embedded Systems Development Tools, debug probes, and production programmers
Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service


by Juan See


The ability to view variables and memory while a target ARM device is running has been added to PEmicro’s GDB Server Plug-in for ARM devices. This Eclipse plugin can be installed in any Eclipse-based IDE and supports the debug of ARM microcontrollers via PEmicro’s Multilink, Cyclone, and OpenSDA debug hardware. The “Real Time Expressions” view, which is part of the plugin, is similar to the normal expressions view, except that it works while the part is running.

Typically when debugging a program, a user would set a breakpoint, resume the target, hit the breakpoint, step through code, check variable values and flush out any bugs that the program may have. The user would repeat this process until all bugs have been addressed. But what if the process of halting the target masks a bug? What if, in order to reproduce a particular bug, the program must be kept running while being fed a particular set of data? In those cases, having the ability to view variable values as they change without halting the target is a great asset. Also, the ability to view variable values while the target is running eliminates the need to have a physical feedback mechanism such as a blinking LED. The user can simply monitor a variable value and check for changes while the target is running to check if a particular section of code gets executed.

This new “Real Time Expressions” view feature is available in PEmicro’s GDB Server for ARM devices v2.8.1 and higher. Click to view installation instructions.

This feature is compatible with any GDB ARM Eclipse-based IDE’s, including the following:

The example below will demonstrate how to view variables while an NXP Kinetis KL25Z device is running in NXP's Kinetis Design Studio. A different example showing the NXP Kinetis K64F device can be seen on the popular MCUOnEclipse blog. All ARM Cortex devices are supported.

To open the Real Time Expressions view, please follow the instructions below:

  1. Navigate to Window -> Show View -> Other …
  2. Navigate to Show View
    Figure 1: Navigate to Show View
  3. In the “Show View” dialog, select “Real Time Expressions” under the “PE Microcomputer Systems” category:
  4. Select 'Real Time Expressions'
    Figure 2: Select 'Real Time Expressions'
  5. The “Real Time Expressions” view is shown below:
  6. 'Real Time Expressions' View
    Figure 3: 'Real Time Expressions' View

Once the Real time Expressions view is displayed, variables may be added to the view. After that, no other configuration is needed. The refresh mechanism is enabled by default when the target runs. Values that are refreshed are highlighted in blue text.

Values Highlighted in Blue
Figure 4: Values Highlighted in Blue

If there is a need to halt the refresh mechanism, pressing the “Halt” button freezes the values.

Halt Button Freezes Values
Figure 5: Halt Button Freezes Values

Pressing it again re-enables the refresh mechanism:

Clicking Halt Button Again Re-Enables Refresh
Figure 6: Clicking Halt Button Again Re-Enables Refresh

Limitations

For pointers that are constantly changing values, the values from de-referencing the same pointer may not be accurate while the device is running. This limitation is highlighted in grey:

Limitations Highlighted in Grey
Figure 7: Limitations Highlighted in Grey

Also, the “Real Time Expressions” view is not currently available for the E200 architecture, nor for Multi-Core debugging. Currently it is only available for Cortex-M devices such as NXP's Kinetis and LPC.

Conclusion

For those debugging instances where it is not ideal to halt the target, the ability to view variable values while the target is running can be very useful. The “Real Time Expressions” view can be used to track down the types of bugs that show up only when the target is running.





search in blog posts

Categories
ARM (28)  
Atmel (13)  
ColdFire Processors (46)
Corporate News (20)
Cyclone Stand Alone Programmer (66)
Cypress (11)
Development Boards (9)
Drivers (3)
DSC (11)  
Expert's Corner (6)
GDB Server (11)
GNU (3)  
H8 Microcontrollers (5)
HCS08/RS08/HC08 Micrcontrollers (41)
HCS12Z (3)  
In-Circuit Debugging (61)
In-Circuit Flash Programming (90)
In-Circuit Test (34)
Interface Library Routines (3)
Kinetis (23)
Kinetis ARM (6)
L-Series (1)
LPCxxxx (14)
M16C Microcontrollers (4)
Maxim (11)  
MC(9)S12(X) Microcontrollers (32)
Nordic Semiconductor (5)
NXP (15)  
OpenSDA (6)
OSBDM (1)  
P&E Newsletter (1)
Power Architecture Processors (32)
Production Programming (9)
Qorivva (15)
R8C Microcontrollers (5)
Renesas (5)
RL78 (3)  
RX (2)  
S12Z (14)  
S32 (8)  
SPI Memory (2)
STM32 (5)  
STMicroelectronics (10)
SWD (8)  
Texas Instruments (12)
Toshiba (12)
Trace (1)  
Tracelink (1)
USB Multilink Hardware Interfaces (26)
USB Multilink Universal (20)
USB Multilink Universal FX (18)
Video Demonstrations (3)
Windows 8 (2)



© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement