Hello Robert Lewis,
please check IO Debug (chapter 23) in IO MQX guide, There's example to redirect standard output using _io_set_handle function. I'll paste it here:
FILE_PTR fh_ptr;
if(NULL == (fh_ptr = fopen("iodebug:", NULL))) {
printf("Cannot open the debug output\n");
} else {
_io_set_handle(IO_STDOUT, fh_ptr);
printf("This is printed to the debug output\n");
}
fflush(stdout);
if (fh_ptr != NULL) {
fclose(fh_ptr);
}
Taken from comments which are above the function _io_set_handle:
| * | This function changes the address of a default I/O handle, and returns |
| * | the previous one. If an incorrect type is given, or the I/O handle was |
| * | uninitialized, 0 is returned. |
Function io_set_handle is located in source/io/io_shand.c.
Regards,
c0170