Printing to log from an ISR (mbed-rtos is too large for my controller)


I am trying to program a Seeed TinyBLE and I need to use the Mail class to create a logging system that will allow me to print to the log from ISRs (AFAIK I’m not supposed to use printf in an ISR, so I was going to work around that by using Mail or Queue to print from a different thread).

The problem is mbed-rtos library is too big… Is there any alternative to using the Mail or Queue classes? is there any way to separate that code so I can use it without the rest of the library?




You might try using mbed-events -! It is irq safe. You shouldn’t need the RTOS to use this library. Let me know if this suits your needs.


thanks Sarah! I will give it a shot and report back!