Hi Reader, Embedded programmers working without an RTOS for whatever reason are frequently rolling their own solutions for multitasking. Protothreads are a de-facto default for ultra-lightweight threading but since they are stackless, they are extremely limited. Here’s a demonstration of a technique to allow cooperative multitasking by abusing the ancient setjmp/longjmp routines in C. This […]
How to detect if a debugger is attached on an STM32
Hi reader, This is just a quick how-to for the google robots to find, nothing Mooshimeter related. I didn’t see any good answers for this out there, but it’s very useful if you’re debugging firmware on an STM32 to know if a debugger is attached. If an error condition arises while a debugger is attached, […]