TeensyLC debug with GDB stub

Maybe the code has to be modified to first load R0-R7 directly and save them on the stack, then move (mov) a higher register into a lower register

Yes, that sounds reasonable. Spill a low register to the stack and use it as a scratch register.

So while the Cortex-M0+ has these registers, somehow they can’t be used in a store word instruction, which seems weird to me.

Looks like it’s due to the dense encoding in the Thumb-2 Instruction Set! There is just no more free bits to encode more registers :slight_smile: Some more details here

I am deferring my work on the TeensyLC (there are a few more reasons) and hope to find the time to pick this issue up later this year. I think the information here is quite helpful already, but there is no real solution right now (assuming we ignore “It’s not possible” as a solution). Hope it’s fine to leave the ticket open for so long?