-1

Hi I want to use debug_print macro that will able do what printf does,but I am working with micrium(RTOS) which is not supporting printf.So Can anyone help me how to implement debug_print macro supporting micrium RTOS

Clifford
  • 88,407
  • 13
  • 85
  • 165

1 Answers1

0

It is not the responsibility of the RTOS to provide printf - your compiler's standard library does that - you may need to implement low-level support for your chose output device; what you need to do will depend on the library and/or toolchain. Most small RTOS's provide little more than scheduling, timing, synchronisation and IPC services and provide no I/O support. That does not mean of course that you cannot use the RTOS services to implement I/O support.

If your library does not provide a printf or its support is too heavyweight for your needs (some implementations require a lot of stack space, and full format specifier support can be expensive in code space on very small targets), there are plenty of lightweight implementations such as Tiny Printf.

Clifford
  • 88,407
  • 13
  • 85
  • 165