The header file <cross_studio_io.h> defines functions that enable the target program to perform input and output using Debug I/O Services.

These functions are closely modelled on the standard C <stdio.h> functions and are provided for use in a development context. These functions rely on a host debugger to be connected to the target and as such cannot be used in an end application.

Many of these functions are compiled with the same names as the standard C function that they are emulating. These functions are put into a library called libc_debugio_impl that can be selected in preference to libc_targetio_impl using the linker project property IO Library Name.

Output functions
debug_printf (printf) | Formatted output to the Debug I/O Terminal
debug_vprintf (vprintf) | Formatted output to the Debug I/O Terminal
debug_putchar (putchar) | Write one character to the Debug I/O Terminal
debug_puts (puts) | Write string to the Debug I/O Terminal
Input functions
debug_getch (getch) | Read one character from the Debug I/O Terminal without waiting for ENTER to be pressed
debug_getchar (getchar) | Read one character from the Debug I/O Terminal
debug_getd | Read a double floating value from the Debug I/O Terminal
debug_getf | Read a floating value from the Debug I/O Terminal
debug_geti | Read an integer from the Debug I/O Terminal
debug_getl | Read a long integer from the Debug I/O Terminal
debug_getll | Read a long long integer from the Debug I/O Terminal
debug_gets (gets) | Read a string from the Debug I/O Terminal
debug_getu | Read an unsigned integer from the Debug I/O Terminal
debug_getul | Read an unsigned long integer from the Debug I/O Terminal
debug_getull | Read an unsigned long long integer from the Debug I/O Terminal
debug_kbhit | Poll to see if a character is available from the Debug I/O Terminal
debug_scanf (scanf) | Formatted input from the Debug I/O Terminal
debug_vscanf (vscanf) | Formatted input from the Debug I/O Terminal
File functions
debug_clearerr (clearerr) | Clear error flags associated with a file
debug_fclose (fclose) | Close a file
debug_feof (feof) | Test for end of file
debug_ferror (ferror) | Test a file for errors
debug_fflush (fflush) | Flush a file
debug_fgetc (fgetc) | Read one character from a file
debug_fgetpos (fgetpos) | Get current position in a file
debug_fgets (fgets) | Read a string from a file
debug_filesize | Get the size of a file
debug_fopen (fopen) | Open a file
debug_fprintf (fprintf) | Formatted output to a file
debug_fputc (fputc) | Write one character to a file
debug_fputs (fputs) | Write a string to a file
debug_fread (fread) | Read from a file
debug_freopen (freopen) | Reopen a file
debug_fscanf (fscanf) | Formatted input from a file
debug_fseek (fseek) | Position a file
debug_fsetpos (fsetpos) | Set position in a file
debug_ftell (ftell) | Get position in a file
debug_fwrite (fwrite) | Write to a file
debug_remove (remove) | Remove a file
debug_rename (rename) | Rename a file
debug_rewind (rewind) | Reposition to start of a file
debug_tmpfile (tmpfile) | Open a temporary file
debug_tmpnam (tmpnam) | Generate a temporary filename
debug_ungetc (ungetc) | Push a character back to a file stream
debug_vfprintf (vfprintf) | Formatted output to a file
debug_vfscanf (vfscanf) | Formatted input from a file
Debug functions
debug_getargs | Get command line arguments to memory
debug_break | Stop execution
debug_exit (abort) | Stop debugging
debug_runtime_error | Stop execution and display a runtime error string
Miscellaneous functions
debug_getenv (getenv) | Returns the value of an environment variable
debug_perror (perror) | Outputs the last error to the Debug I/O Terminal
debug_system (system) | Executes a command
debug_time (time) | Returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC)