Target Deployment Technology
Target platforms can be classified into three categories, characterized by their data-retrieval method:
Standard Mode
User Mode
Breakpoint Mode
This kind of target system allows use of a regular FILE * data type and of the fopen, fprintf and fclose functions found in the standard C library. Such systems include, for example, all UNIX or Windows platforms, as well as LynxOS or QNX.
If the standard C library is usable on the target, use these regular fopen/fprintf/fclose functions for TDP data retrieval. This is by far the easiest data retrieval option.
If your target system is compliant with the Standard Mode category, data retrieval is assured.
On User Mode systems, the standard C library calls described above are not available but other calls that send characters to the host machine are available. This could be a simple putchar-like function sending a character to a serial line, or it could be a method for sending a string to a simulated I/O channel, such as in the case of a microprocessor simulator.
If your target system is using an operating system, there are usually functions that enable communication between the host machine and the target. Therefore, data retrieval capability is assured.
If your target system allows use of a standard socket library, User Mode is always possible - thus data retrieval is assured.
On breakpoint mode systems, no I/O functions are available on the target platform. This is usually the case with small target calculators, such as those used in the automotive industry, running on a microprocessor simulator or emulator with no operating system.
If no communication functions are available on the target platform, the best alternative is to use a debugger logging mechanism, assuming one exists.
Note In breakpoint mode, some compilers and linkers ignore empty functions and remove them from the final a.out binary. As the debugger must use these routines to set breakpoints, you must ensure that the linker includes these functions - any associated symbols must be in the map file. Currently, all of the priv_ functions for C and C++ contain a small amount of dummy code to avoid this issue; however, you might need to add dummy code for Ada.
When using breakpoint mode it is necessary to implement a debugger script to perform the following actions in the given order:
Download the executable on the target.
Set three break points: priv_exit, priv_close, and priv_writeln.
Start the execution
Each time the priv_writeln break point is reached, dump the atl_buffer and resume.
Quit the debugger when any other break point is reached.