Break point mode

Using Break Point mode can be summed up as the following tasks:

To do this, you must specify a break point for I/O. This means that you will no longer use the standard I/O or the user-defined I/O functions.

To disable I/O functions:

  1. Expand Library Settings, Data retrieval and error output and select Data retrieval to locate the RTRT_IO macro definition.
    In the combo-box for RTRT_IO you can select:

  2. Select RTRT_NONE. This is the typical choice when on limited target platforms with no operating system and no file system.

Dumping the Buffer

You need to dump the content of atl_buffer each time the break point on priv_writeln is encountered. The way to do this, without a file system, is to specify how to use the gdb debugger command line in the atl_exec Perl script.

The debugger documentation explains how to call gdb and how to automate the use of the debugger through a command script.

To invoke the debugger from the atl_exec:

  1. Expand Build Settings and select Execution function to locate the atl_exec Perl function.

  2. Comment the existing command line with a # character.

  3. Add the following lines to invoke gdb:

my $cmd="$TARGETDIT\\cmd\\run.cmd";

SystemP("gdb -se=$exe -command=$cmd > stdout.log");

  1. Right-click Build Settings and select Ascii File. Rename the created file to run.cmd.

  2. Copy the contents of the run_example.cmd file, provided in the example directory, into the run.cmd file.

  3. Save the TDP, update the TDP in the project, and Build the add.c node.

Converting Data to ASCII

Depending on the cross development environment, the format of the dumped data can vary largely from one target to another. In most cases, the results must be decoded and converted to ASCII data in order to be processed by the OneTest Embedded Data Splitter and Report Generators.

You need to decode the dump data to ASCII with a Perl routine by using the Perl subroutine named decode.pl.

To decode dump data to ASCII:

  1. Save the TDP, update the Configuration in OneTest Embedded and Build the add.c node.

OneTest Embedded returns an error: the dump accomplished by the debugger does not produce a plain ASCII file as expected.

  1. Look at the result file created by GDB. The relevant data is present but is represented in hex and mixed with other information.

  2. Open the decode.pl Perl script in a text editor, provided with the example.

  3. In the TDP Editor, expand Build Settings and select Execution function to locate the atl_exec Perl function.

  4. Copy-paste the contents of the decode.pl Perl script into the atl_exec Perl function after execution of gdb.

  5. Save the TDP update the TDP in the project, and Build the add.c node.

This time, everything should work as expected and you should be able to view the reports generated by the execution.

Congratulations! You have completed what is probably the most complex part building a TDP.