Executing code in development targets only, Using the debug error log tab, Setting debugger options – Echelon IzoT NodeBuilder User Manual

Page 259

Advertising
background image

In the Address field, enter the address to start writing in. In the Count field, enter the number of
bytes to write. In the Byte field, enter a two digit hexadecimal value. Click OK to write the value
in Byte a number of times equal to Count starting at the address in Address. You are returned to
the Peek/Poke Memory dialog.

4. Click Close to return to the NodeBuilder debugger.

Executing Code in Development Targets Only

You can designate code for execution in development targets only. This lets you build simultaneously
to development and release targets and include test code that executes on the development targets only.
To have one or more lines of code execute on development targets only, put the statement #ifdef
_DEBUG
before the code, and the statement #endif after the statement. The following code sample
demonstrates how to do this:

#ifdef _DEBUG

//Test code. Executes on development targets only

<test code>

#endif

You can not define network variables or configuration properties or make any changes to the external
interface inside the #ifdef clause. This is because both release and development targets have the same
program ID.

The _DEBUG macro is predefined for development targets, but not for the release targets. To edit the
predefined macros for a development target, right-click Development folder in the Project pane, and
then click Settings on the shortcut menu. The NodeBuilder Device Template Target Properties
dialog opens with the Compiler tab selected. Enter a symbol in the Defines: property, which can be
tested using the ifdef directive.

Using the Debug Error Log Tab

When you start a debugging session, the Debug Error Log tab is added to the results pane. This tab
provides rudimentary tracing capabilities and debugging timing-related problems in the debugger when
a debug session is in progress. You can use the Neuron C error_log() function to output specific error
codes to the debug tab in response to specific events. See the Neuron C Programmer’s Guide and
Neuron C Reference Guide for more information about the error_log() function.

Setting Debugger Options

You can set options for the NodeBuilder debugger following these steps:

1. Click Project, click Settings, and then click the Debugger tab in the NodeBuilder Project

Properties dialog. Alternatively, you can right-click the Project folder at the top of the Project
pane and then click Settings on the shortcut menu.

IzoT NodeBuilder FX User's Guide

245

Advertising