typedef struct { const char *name; uint32_t stack_words; uint32_t high_water_words; } stack_report_t; static void task_stack_report(void) { for (;;) { stack_report_t report = rtos_stack_report_current(); cos_lpc51u68_uart0_puts("stack "); cos_lpc51u68_uart0_puts(report.name); cos_lpc51u68_uart0_puts(" free "); cos_lpc51u68_uart0_put_hex32(report.stack_words - report.high_water_words); cos_lpc51u68_uart0_puts("\r\n"); rtos_delay_ticks(1000u); } }