Debugger Interface Configuration Options

Parent Previous Next

If the terminal window should communicate through special debugger communication port, the ‘Channel’ must be set to “Debugger”. In this case additional communication properties are set in the ‘Hardware/Options/Debug Output’ tab.

Hardware Tools, Debug output

The communication type can be shared memory or special CPU channel depending on the specific CPU. Select the supported communication type.

When ‘Shared memory’ is used, the user's program writes information into a pre-specified memory location from where the data is being read by winIDEA. The user's program can read from terminal window as well.

Some CPUs can communicate with terminal window via serial debug channel. On such CPUs ‘CPU Channel’ must be selected. In case of ARM family, the terminal window displays all information send from the CPU through debug JTAG channel. Likewise the terminal window can send back to the CPU required information via the JTAG channel.

To enable the benefits of the terminal window with shared memory, all the necessary functions have been already prepared. Three functions allow the user to send information to the terminal window and to receive the information from the terminal window. To use these functions, the file AsystTrace.c delivered with winIDEA must be compiled and linked to your application. Note that AsystTrace.c makes use of the standard string library, which must be linked to the target application.

The terminal window in winIDEA

Following functions declared in AsystTrace.h are available:

int AsystTrace(const char *pFormat,...);

This function can be used in the same way as the standard “printf” function. The output is redirected to the terminal window. If the communication buffer is full, the function does not return until there is enough place for the formatted string. The formatted string must never exceed the allocated buffer (the size is defined in AsystTrace.h).

return value: 0

int AsystKbhit(void);

return value: Returns a nonzero value if there is at least one character available from the terminal window.

char AsystGetch(void);

The function waits for the first available character from the terminal window.

return value: Returns the received character from the terminal window.