ZigBee Chips
Contact Us | Follow Us: Twitter  YouTube

Buy Ember Products
Buy Ember Products
FAQ Categories Home | FAQ

Frequently Asked Questions

Using the xIDE single-step debugger for EM250

Categories:   Tools : xIDE   

This document discusses the typical steps in starting a debugging session for an EM250 application.

As always, make sure that the Insight Adapter is connected to the network and that all connectors are firmly attached.

  1. Be sure that the Emulator setting in the build options for your project target point to the current IP address of the InSight Adapter [ISA] you’re going to be using for the debug session.
  2. Change the preprocessor options to add DISABLE_WATCHDOG. Otherwise the EM250 will reset immediately after pausing at a breakpoint, due to the watchdog.
  3. Rebuild the project after changing these settings.
  4. Make sure that the EM250 node is powered and properly attached to the ISA noted above.
  5. Use InSight Desktop or the \“em2xx_load.exe\” utility to download the program to the EM250 via this ISA. em2xx_load.exe can be found in the xIDE installation directory (usually c:\Program Files\Ember\xIDE_EM250\SIF\bin).
  6. From a command prompt, execute “em2xx_load –Reset –sid192.168.0.1”, where 192.168.0.1 should be replaced with the IP address of the ISA used for debugging. (You can get this IP address from the properties of the adapter in ISD.) This command halts the chip’s execution so that it waits for the debugger.
  7. In xIDE, use Debug -> Attach to start a new debugging session with the chip.
  8. Set a breakpoint by clicking on a line in the code, and then use the Debug -> Run command to run to that breakpoint. Alternatively, you can just click on a line and use Debug -> Run to Cursor.
  9. When the debugger stops at the breakpoint, remove this breakpoint to allow single-stepping. (The XAP2b core used by the EM250 only supports a single hardware breakpoint, so leaving the existing breakpoint and stepping to the next line [and implicit breakpoint in itself] is not possible and will produce an error from the debugger.)
  10. Use Debug -> Step Into or Step Over to move through code execution, or set another breakpoint elsewhere in the code and choose Debug -> Run.
  1. Note that when you are ready to start the program’s execution over again (reset the chip), Step 6 above must be repeated to perform a full reset of the EM250. (Choosing the Debug -> Restart option from the xIDE menu is not sufficient to accomplish this, unfortunately.)

 

Company | Products | Buy | Applications | ZigBee | Partners | Support | Events | Contact Us | Sitemap | Follow Us: Twitter  YouTube

©2007-2012 Ember Corporation | All rights reserved | Privacy