i have several inline assembly functions wrapped in C.
They implement atomic / read-modfy-write style
Creating a good case Test i got done.
But now i am struggling to produce a reliable and reproducible bad case test. I want to test the "exclusive store failed" paths in all functions.
Is there any way i can induce a Fail to the exclusive store upon the exclusive load?
Testing by Debugger to manually manipulate the Program Counter could be a way, but I prefer to
Id prefer to manipulate something in Memory to have a "minimal" effect...
My initial Tests to first:
simply halt execution between load and store exclusive,
accessing RAM via debugger,
did not result in a failing Store Exclusive....
Is there some approach to this?
My Plan-B is to Brute Force it, by repeatedly calling the functions and trying to generate a lot IRQs to interrupt in the critical moment.
But that seems hardly reliable and reproducible....
If you can instrument your code, you might add a "WFI" before "STREX" and thn use an interrupt. Or use "CLREX"
View all questions in Cortex-M / M-Profile forum